Class: Page

Page

One page of results returned from an API request. With any given page object, the next page of results in the query set can be requested.


new Page(data, client, memberPath, method)

Create a page object

Parameters:
Name Type Description
data Object

API response for a single page of data.

client Client

Chain Client.

memberPath String

key-path pointing to module implementing the desired query method.

method String

is the name of the query method on the member.

Members


cursor :String

String encoding the query object to request the next page of items.

Type:
  • String

items :Array

Array of Sequence objects. Available types are documented in the global namespace.

Type:
  • Array

lastPage :Boolean

Indicator that there are more results to load if true.

Type:
  • Boolean

Methods


nextPage()

Fetch the next page of data for the query specified in this object.

Returns:

A promise resolving to a Page object containing the requested results.

Type
Promise.<Page>