Hi all,
I want to use API to delete *disapproved* AdGroups. So I want to ask the
list first. The following code doesn't return me *any results* (and any
error aswell). But I received many email with the list of disapproved
AdGroup, so *they are but I can get by API*. Where I am wrong?
Maybe something in this code?
......
$user->SetClientId('XXX-XXX-XXXX');
$adGroupService = $user->GetService('AdGroupAdService', 'v201109');
$selector = new Selector();
$selector->fields = array('AdGroupId');
$selector->ordering[] = new OrderBy('AdGroupId', 'ASCENDING');
$selector->predicates[] = new Predicate('CreativeApprovalStatus', 'IN',
array('DISAPPROVED'));
$selector->paging = new Paging(0, $page_size);
do {
$page = $adGroupService->get($selector);
var_dump($page);
.........
$selector->paging->startIndex += $page_size;
} while ($page->totalNumEntries > $selector->paging->startIndex);
Client ID is the same Account ID reported in e-mail.
Thank you
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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