In the old AdWords API, the SelectorBuilder can specify offset/limit to 
fetch a specified page of entity 
results(https://ads-developers.googleblog.com/2014/02/adwords-api-java-selector-builder.html).
 

For example, if my campaign has 2000 ads, I want to list the ads from 501 
to 600, then I make the  SelectorBuilder builder = new SelectorBuilder() 
.fields("Id", "Name") .orderAscBy("Id") .offset(500) .limit(100) .build()

But in the GoogleAds API, the  GoogleAdsService.SearchStream would return a 
stream of all results. To get a custom page (with specified offset), we 
need to manually read the stream and handle it on client side; If we use 
GoogleAdsService.Search, then it does not support "offset" but can only 
specify the pageSize, so we still need iterate the pages and calculate the 
"desired page of results".

May I ask if there's a better way to achieve this? or any equivalent 
solution in GoogleAds API as the AdWords API's SelectorBuilder.

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/39cacdad-2044-4d64-be56-6809e4d8082cn%40googlegroups.com.
  • Ca... Zhong Li
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Zhong Li
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to