Home Reference Source Test
public class | source

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
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 constructor(data: Object, url: URL, simba: SimbaBase) source

Wrapper for paged responses

Params:

NameTypeAttributeDescription
data Object

The response

url URL

The URL that provided the response

simba SimbaBase

The SimbaBase instance that requested the response

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 count(): number source

Returns the result count

Return:

number

public current_page(): number source

Returns the current page number

Return:

number

public data(): Object source

Returns the actual data

Return:

Object

public async next(): Promise<PagedResponse> | null source

Grab the next page

Return:

Promise<PagedResponse> | null

Null if there's no next page

public next_page(): number source

Returns the next page number

Return:

number

public async previous(): Promise<PagedResponse> | null source

Grab the previous page

Return:

Promise<PagedResponse> | null

Null if there's no next page

public previous_page(): number source

Returns the previous page number

Return:

number