Hi,

You need to iterate through the list, and when you find an object of
type GeoTargetList, then examine its target field to retrieve all geo
targets. See the documentation of GeoTargetList for more details.

http://code.google.com/apis/adwords/v2009/docs/reference/CampaignTargetService.GeoTargetList.html

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Aug 28, 4:06 pm, aBsTrAcT <m.hassan...@gmail.com> wrote:
> Hi,
> I am using Adwords php lib for v201003. I need to get listing of all
> Campaign Target lists.
> In the examples section of php lib, I am using
> GetAllCampaignTargets.php.
> It only shows the types of Targets.
> code is:
>
> $user = new AdWordsUser();
> $campaignTargetService = $user->GetCampaignTargetService('v201003');
> $campaignId = (float) '11111';
> $selector = new CampaignTargetSelector();
> $selector->campaignIds = array($campaignId);
> $page = $campaignTargetService->get($selector);
>   if (isset($page->entries)) {
>     print_r($page->entries)
>   }
>
> Output is something like this:
> [1] => DemographicTargetList Object
>         (
>             [targets] =>
>             [campaignId] => 130071
>             [TargetListType] => DemographicTargetList
>             [_parameterMap:private] => Array
>                 (
>                     [TargetList.Type] => TargetListType
>                 )
>         )
>     [2] => GeoTargetList Object
>         (
>             [targets] =>
>             [campaignId] => 130071
>             [TargetListType] => GeoTargetList
>             [_parameterMap:private] => Array
>                 (
>                     [TargetList.Type] => TargetListType
>                 )
>         )
>
> How can I get complete list of all geo targets?
>
> Thanks.

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