import { ServicePage } from "https://deno.land/x/dynablox_opencloud@v0.2.2/src/helpers/ServicePaging.ts";
Service paging.
Constructors
Construct a new service paging helper.
Type Parameters
Properties
The data returned from the last call. If it is undefined, then getCurrentPage()
has not been called yet.
Data tranformer to be read by external sources.
The next page function to refer to for parameters.
The function to paginate.
The current parameters as of current request.
The previous page function to refer to for parameters.
The service to call pageFunction
from.
The returned from the last call. If it is undefined, then getCurrentPage()
has not been called yet.
This data is either modified or the original data from the API response.
Methods
Re-fetch the current page and replaces current data wirh new data.
Paginate to the next page. If nextPageFunction
returns undefined
, it will error. Otherwise, it will go on with the request.
Paginate to the previous page. It will error if previousPageFunction
was never supplied. If preivousPageFunction
returns undefined
, it will error. Otherwise, it will go on with the request.
Get if there is a next page.
Get if there is a previous page.
Async iterator implementation for the data.