Re: Get all account TextAds via API

2016-08-10 Thread Vadim Galanov
Hi Anthony, thanks for your reply. I just found that my API version 
(201601) is deprecated so maybe this is the problem. I'll try to migrate to 
the newest version and check my issue. Thanks!

среда, 10 августа 2016 г., 20:56:47 UTC+3 пользователь Anthony Madrigal 
написал:
>
> Hi Vadim,
>
> The code you provided should give you all your ads, regardless of campaign 
> since there is no predicate to filter certain campaigns. This should also 
> give you only enabled ads. Are the ads in your other campaigns enabled?
>
> If so, could you please *reply privately to author *your SOAP request and 
> response so that I can take a further look?
>
> Regards,
> Anthony
> AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8ff8fb83-105a-4d75-b9c2-3ae5f2ad5a1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Get all account TextAds via API

2016-08-10 Thread 'Anthony Madrigal' via AdWords API Forum
Hi Vadim,

The code you provided should give you all your ads, regardless of campaign 
since there is no predicate to filter certain campaigns. This should also 
give you only enabled ads. Are the ads in your other campaigns enabled?

If so, could you please *reply privately to author *your SOAP request and 
response so that I can take a further look?

Regards,
Anthony
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/51af4172-9094-4611-a5eb-05e20dc7074a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Get all account TextAds via API

2016-08-10 Thread Vadim Galanov
HI all, I'm trying to get All ads from my Adwords account via the API 
(PHP). I'm using *AdGroupAdService:*

$adGroupAdService = $user->GetService('AdGroupAdService', 
self::ADWORDS_VERSION);

$selector = new Selector();
$selector->fields = [
 'Headline',
 'Id',
 'CreativeFinalUrls',
];
$selector->ordering[] = new OrderBy('Headline', 'ASCENDING');
$selector->predicates[] = new Predicate('Status', 'IN', array('ENABLED'));

$selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE);
$result = [];
do
{
$page = $adGroupAdService->get($selector);
if (isset($page->entries))
{
foreach ($page->entries as $adGroupAd)
{
$result[$adGroupAd->ad->id . '#' . $adGroupAd->adGroupId] = [
'title' => $adGroupAd->ad->headline . 
"({$adGroupAd->ad->description1} ...)",
'url' => $adGroupAd->ad->finalUrls[0],
];
}
}
else
{
print "No text ads were found.\n";
}
$selector->paging->startIndex += 
AdWordsConstants::RECOMMENDED_PAGE_SIZE;
} while ($page->totalNumEntries > $selector->paging->startIndex);

And I have only ads from one account's campaign. When trying to find ads 
from any other campaigns, API returns nothing.
How to get *All *ads from account from all ads and groups?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/687795ed-4deb-4a75-a8c7-9e3a27b8316d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.