perhaps helpful, an example to retrieve an ad by id in java:

public static String[] AD_FIELDS = {"Id", "AdGroupId", "Status",
"Url", "DisplayUrl", "Headline", "Description1", "Description2",
                        "CreativeApprovalStatus", "DisapprovalReasons",
"TrademarkDisapproved"};

            Selector selector = new Selector();
            selector.setFields(AD_FIELDS);
            Predicate[] predicates = new Predicate[3];
            Predicate predicate = new Predicate();
            predicate.setField("AdGroupId");
            predicate.setOperator(PredicateOperator.EQUALS);
            predicate.setValues(new String[]{agrId} );
            predicates[0] = predicate;

            predicate = new Predicate();
            predicate.setField("Id");
            predicate.setOperator(PredicateOperator.EQUALS);
            predicate.setValues(new String[]{id} );
            predicates[1] = predicate;

            predicate = new Predicate();
            predicate.setField("Status");
            predicate.setOperator(PredicateOperator.IN);
            predicate.setValues(new String[]{"ENABLED", "PAUSED",
"DISABLED"} );
            predicates[2] = predicate;

            selector.setPredicates(predicates);

            AdGroupAdPage page = adgroupService.get( selector );

HTH -
mm

On May 6, 7:43 am, "Pete Lavetsky (AdWords API Guru)"
<[email protected]> wrote:
> $selector = new AdGroupAdSelector();
> $selector->adIds = array( $adIds );
>
> $page = $adGroupAdService->get($selector);
>
> if (isset($page->entries)) {
>     foreach ($page->entries as $adGroupAd) {
>       printf("Ad with id '%s', type '%s', and status '%s' was found.
> \n",
>           $adGroupAd->ad->id, $adGroupAd->ad->AdType, $adGroupAd->status);
>     }
> } else {
>
>     print "No ads were found.\n";
>
> }
>
> Pete
>
> On May 5, 4:02 pm, lowlevelbass <[email protected]> wrote:
>
> > Thanks for your help jstedman.  I'm digging into the docs you provided.  No
> > luck yet, but I'm getting closer with your help.  Thanks for your quick
> > response.
>
>

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

Reply via email to