Skip to content

PageToken

Defined in: packages/aip/src/pagination/pagetoken.ts:31

PageToken is a page token that uses an offset to delineate which page to fetch.

new PageToken(offset, requestChecksum): PageToken

Defined in: packages/aip/src/pagination/pagetoken.ts:42

number

number

PageToken

offset: number

Defined in: packages/aip/src/pagination/pagetoken.ts:35

Offset of the page.


requestChecksum: number

Defined in: packages/aip/src/pagination/pagetoken.ts:40

RequestChecksum is the checksum of the request that generated the page token.

next(pageSize): PageToken

Defined in: packages/aip/src/pagination/pagetoken.ts:52

Returns the next page token for the given page size.

number

the page size to advance by

PageToken


previous(pageSize): PageToken

Defined in: packages/aip/src/pagination/pagetoken.ts:64

Returns the previous page token for the given page size.

If the previous page token would have a negative offset, a page token with offset 0 will be returned.

number

the page size to go back by

PageToken


toString(): string

Defined in: packages/aip/src/pagination/pagetoken.ts:71

String returns a string representation of the page token.

string