Hello,
I am interested to get the first 10 keywords in querying google adwords
api.
How must be defined the selector in php to display this result?
Example code:
//start code
function InsertKeywordsIntoDBTypePlacement(AdWordsUser $user) {
// Get the service, which loads the required classes.
$adGroupCriterionService = $user->GetService('AdGroupCriterionService',
ADWORDS_VERSION);
$adwaccid = getAdWId($user);
// Create selector.
$selector = new Selector();
$selector->fields = array('KeywordText', 'KeywordMatchType', 'Id',
'ActiveViewCpmEnabled', 'AdGroupId', 'AgeRangeType',
'AppPaymentModelType', 'ApprovalStatus', 'BidModifier',
'BidType', 'BiddingStrategyId', 'BiddingStrategyName',
'BiddingStrategySource', 'BiddingStrategyType', 'CaseValue',
'ChannelId', 'ChannelName', 'CpcBid', 'CpcBidSource',
'CpmBid', 'CpmBidSource', 'CriteriaCoverage', 'CriteriaSamples',
'CriteriaType', 'CriterionUse', 'DestinationUrl',
'DisapprovalReasons', 'DisplayName', 'EnhancedCpcEnabled',
'ExperimentBidMultiplier',
'ExperimentDataStatus', 'ExperimentDeltaStatus', 'ExperimentId',
'FinalAppUrls', 'FinalMobileUrls', 'FinalUrls',
'FirstPageCpc', 'GenderType', 'IsKeywordAdRelevanceAcceptable',
'IsLandingPageQualityAcceptable', 'Labels',
'MobileAppCategoryId', 'Parameter', 'ParentCriterionId',
'PartitionType', 'Path', 'PlacementUrl', 'QualityScore',
'Status', 'SystemServingStatus', 'TopOfPageCpc',
'TrackingUrlTemplate', 'UrlCustomParameters', 'UserInterestId',
'UserInterestName', 'UserListId', 'UserListMembershipStatus',
'UserListName', 'VerticalId', 'VerticalParentId', 'VideoId', 'VideoName' );
$selector->ordering[] = new OrderBy('KeywordText', 'ASCENDING');
// Create predicates.
//$selector->predicates[] = new Predicate('AdGroupId', 'IN',
array($adGroupId));
$selector->predicates[] =
new Predicate('CriteriaType', 'IN', array('PLACEMENT'));
//!!!!!HERE>>>>> it is not correct .....???? how to do this?
$selector->limit[] = new withLimit('10');
//<<<<<<
$keywordselection = $adGroupCriterionService->get($selector);
etc....
}
//end code
Thank you!
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/10aee880-eb66-4b0e-9e32-e740c6379829%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.