import PagedResponse from '@simbachain/libsimba-js/src/simba/pagedresponse.js'
PagedResponse
Wrapper for paged responses
Constructor Summary
Public Constructor | ||
public |
constructor(data: Object, url: URL, simba: SimbaBase) Wrapper for paged responses |
Member Summary
Public Members | ||
public |
results: * |
|
public |
simba: * |
|
public |
url: * |
Private Members | ||
private |
_count: * |
|
private |
_next_page: * |
|
private |
|
Method Summary
Public Methods | ||
public |
Returns the result count |
|
public |
Returns the current page number |
|
public |
Returns the actual data |
|
public |
async next(): Promise<PagedResponse> | null Grab the next page |
|
public |
Returns the next page number |
|
public |
async previous(): Promise<PagedResponse> | null Grab the previous page |
|
public |
Returns the previous page number |
Public Constructors
Public Members
public results: * source
public simba: * source
public url: * source
Private Members
private _count: * source
private _next_page: * source
private _previous_page: * source
Public Methods
public async next(): Promise<PagedResponse> | null source
Grab the next page
Return:
Promise<PagedResponse> | null | Null if there's no next page |
public async previous(): Promise<PagedResponse> | null source
Grab the previous page
Return:
Promise<PagedResponse> | null | Null if there's no next page |