Skip to main content
Each response includes an items array and an optional nextPageToken. Pass that token back on the next list request to fetch the following page. Iterating a Page directly yields only the current page’s items; use Page.autoPagingIter to walk every page automatically.

Constructor

Parameters

T[]
required
string | undefined
required
required

Returns

Page<T>

Properties

T[]
required
Items returned for this page.
string
Opaque token for the next page, or undefined when there are no more results.

Methods

iterator

Iterate over the current page’s items only.

Returns

Iterator<T>

autoPagingIter()

Async-iterate over all items across every page, fetching additional pages as needed.

Returns

AsyncGenerator<T> An async generator yielding every item in the result set.

getNextPage()

Fetch the next page using Page.nextPageToken.

Returns

Promise<Page<T>> The following page of results.

hasNextPage()

Whether another page of results is available.

Returns

boolean true when Page.nextPageToken is set.