I have to retrieve data from the Adwords using Adword's API.
I succeed to retrieve the accounts, the campaigns, the adgroups, the ads, and keywords with the all the necessary attributes etc.
I have a problem with retrieving the site-links.
I try to do that for a campaign which is an active campaign with 100 sitelinks (6 of them are selected).
Following this documentation I use CampaignAdExtensionService and select CampaignAdExtensionService field. Here is my code in ruby (let's say the campaign_id is 12345678):
campaign_srv = @api.service(:CampaignAdExtensionService, get_api_version())
campaign_id = 12345678 # for example
selector = {
:fields => ['CampaignId', 'DestinationUrl', 'DisplayText'],
:predicates => {:field => "CampaignId", :operator => "IN", :values => Array(campaign_id)},
:paging => {:start_index => 0, :number_results => 5000}
}
page = campaign_srv.get(selector)
Running this code I get a hash object that doesn't contain any sitelink:
page.to_json = "{"total_num_entries":1,"page_type":"CampaignAdExtensionPage","entries":[{"campaign_id":12345678,"ad_extension":{"id":76543210,"ad_extension_type":"LocationSyncExtension","email":"mail*@domain*.com","icon_media_id":1000,"should_sync_url":false,"xsi_type":"LocationSyncExtension"},"stats":{"network":"ALL","stats_type":"CampaignAdExtensionStats"}}]}"
What is the way to retrieve all the sitelinks of the campaign?