So far I have this retrieves a placement using Id:

    $campaignCriterionService = 
$adwords['adWordsServices']->get($adwords['session'], 
AdGroupCriterionService::class);

    // Create a selector to select all campaign criteria for the specified
    // campaign.
    $selector = new Selector();
    $selector->setFields(['Id', 'AdGroupId', 'CriteriaType', 'KeywordText', 
'DisplayName']);
    $selector->setPredicates([
        new Predicate('Id', PredicateOperator::EQUALS, ['412515468868'])
    ]);
    $selector->setPaging(new Paging(0, self::PAGE_LIMIT));

    $totalNumEntries = 0;
    do {
      // Retrieve campaign criteria one page at a time, continuing to 
request
      // pages until all campaign criteria have been retrieved.
      $page = $campaignCriterionService->get($selector);

      // Print out some information for each campaign criterion.
      if ($page->getEntries() !== null) {
        $totalNumEntries = $page->getTotalNumEntries();
        foreach ($page->getEntries() as $campaignCriterion) {
          $data[] = array(
              "id"   => $campaignCriterion->getCriterion()->getId(),
              "type" => $campaignCriterion->getCriterion()->getType()
          );
        }
      }

      $selector->getPaging()->setStartIndex(
          $selector->getPaging()->getStartIndex() + self::PAGE_LIMIT);
    } while ($selector->getPaging()->getStartIndex() < $totalNumEntries);

    $message = "Number of results found: ".$totalNumEntries;
    return array(
      "status"  => "success",
      "message" => $message,
      "data"    => $data
    );

I do not know which field is it used.

WHat I want to do: 

Select placement where url is equals to 'example.com'


<https://lh3.googleusercontent.com/-KL37flLwv-4/WnvqZ_jHU4I/AAAAAAAAADI/ZxaP3FIQw7Maxo0tCCcKsb9Di6mgmD2xQCLcBGAs/s1600/Screen%2BShot%2B2018-02-08%2Bat%2B2.12.35%2BPM.png>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/10e4164f-4760-45c0-bce2-763348bf80ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to