*v201402* function GetAdGroupsExample(AdWordsUser $user, $campaignId) { // Get the service, which loads the required classes. $adGroupService = $user->GetService('AdGroupService', ADWORDS_VERSION);
// Create selector. $selector = new Selector(); $selector->fields = array('Id', 'Name'); $selector->ordering[] = new OrderBy('Name', 'ASCENDING'); // Create predicates. $selector->predicates[] = new Predicate('CampaignId', 'IN', array($campaignId)); // Create paging controls. $selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE); do { // Make the get request. $page = $adGroupService->get($selector); // Display results. if (isset($page->entries)) { foreach ($page->entries as $adGroup) { printf("Ad group with name '%s' and ID '%s' was found.\n", $adGroup->name, $adGroup->id); } } else { print "No ad groups were found.\n"; } // Advance the paging index. $selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE; } while ($page->totalNumEntries > $selector->paging->startIndex); } ------------------ I'm trying to get 100 results at the time Thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.