In the old AdWords API, the SelectorBuilder can specify offset/limit to fetch a specified page of entity results(
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.