How very *not*-elegant... But it works perfectly. You're a life-saver!

Cheers,
Tal Ater
t...@talater.com


On Wednesday, July 11, 2012 2:54:43 PM UTC+3, Dorian Kind wrote:
>
> Hi Tal,
>
> The ImageAd type inherits the field "id" from type Ad, which you can use 
> in your selector's predicate as "Id" (notice the different capitalization). 
> <
> https://developers.google.com/adwords/api/docs/reference/latest/AdGroupAdService.ImageAd
> >
>
> Cheers,
> Dorian
>
> On Monday, July 9, 2012 5:19:58 PM UTC+2, Tal Ater wrote:
>>
>> After creating a new ImageAd, I save its id to my database, and can then 
>> later use that id with adToCopyImageFrom.
>>
>> How can I retrieve ImageAds from the API by that ImageAd id? Do I use the 
>> selector and predicates? Is there another way to fetch data besides the 
>> selector/predicate?
>>
>> I managed to select it on the ImageCreativeName, but not the ImageAd Id:
>>
>>       $service = $this->user->GetService('AdGroupAdService', 
>> self::API_VERSION);
>>
>>       $selector = new GoogleApiAdsAdWords_Selector();
>>       $selector->fields = array('MediaId', 'Width', 'Height', 'Name');
>>
>>       // Create predicates.
>>       $selector->predicates[] =
>>         new GoogleApiAdsAdWords_Predicate('ImageCreativeName', 'EQUALS', 
>> array($adwordsId));
>>
>>       $page = $service->get($selector);
>>
>>
>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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

Reply via email to