PagedResult interface
An interface that describes how to communicate with the service.
Properties
by |
a function to implement the |
first |
Link to the first page of results. |
get |
A method that returns a page of results. |
to |
A function to extract elements from a page. |
Property Details
byPage
a function to implement the byPage
method on the paged async iterator. The default is
one that sets the maxPageSizeParam
from settings.maxPageSize
.
byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>
Property Value
(settings?: TPageSettings) => AsyncIterableIterator<TPage>
firstPageLink
Link to the first page of results.
firstPageLink: TLink
Property Value
TLink
getPage
A method that returns a page of results.
getPage: (pageLink: TLink, maxPageSize?: number) => Promise<undefined | { nextPageLink?: TLink, page: TPage }>
Property Value
(pageLink: TLink, maxPageSize?: number) => Promise<undefined | { nextPageLink?: TLink, page: TPage }>
toElements
A function to extract elements from a page.
toElements?: (page: TPage) => unknown[]
Property Value
(page: TPage) => unknown[]