Tank you!
I tried both solutions, but i didn't get any result yet. I'm using
pagination, but I'm checking if there is more pages when I call the API.
This is my wrapper for get service API:
def get_from_adwords_account(adwords_client, service_name, fields,
predicates=None):
adwords_service = adwords_client.GetService(service_name,
version=settings.API_VERSION)
items = []
offset = 0
PAGE_SIZE = settings.PAGE_SIZE
selector = {
'fields': fields,
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
}
if predicates:
selector['predicates'] = predicates
more_pages = True
while more_pages:
page = adwords_service.get(selector)
if 'entries' in page:
for entry in page['entries']:
items.append(entry)
offset += PAGE_SIZE
selector['paging']['startIndex'] = str(offset)
more_pages = offset < int(page['totalNumEntries'])
return items
However, I changed my PAGE_SIZE to 10000 to check if there is some problem
in the pagination logic. I had the same result (with filter: The result is
empty; without filter: The result does not contain any SITELINK).
Is there something that I can do to get the sitelink for this account? It
is very strange, because this same code and logic works in others accounts
in our MCC.
Best Regards.
Eduardo Cesar
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/45268c88-8cfe-47c0-b77d-385112444ab2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.