Skip to main content

Pagination

The SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.

Auto-pagination

To iterate through all results across all pages, use the autoPager() method, which automatically fetches more pages as needed. When using the synchronous client, the method returns an Iterable
When using the asynchronous client, the method returns an AsyncStreamResponse:

Manual pagination

To access individual page items and manually request the next page, use the items(), hasNextPage(), and nextPage() methods: