Class: PagingIterator

PagingIterator(response, client) → {void}

Asynchronous iterator for paged collections

Constructor

new PagingIterator(response, client) → {void}

Parameters:
Name Type Description
response Object The original API response
client BoxClient An API client to make further requests
Source:
Throws:
Will throw when collection cannot be paged
Type
Error
Returns:
Type
void

Classes

PagingIterator

Methods

(static) isIterable(response) → {boolean}

Determine if a response is iterable
Parameters:
Name Type Description
response Object The API response
Source:
Returns:
Whether the response is iterable
Type
boolean

(static) isIterable(response) → {boolean}

Determine if a response is iterable
Parameters:
Name Type Description
response Object The API response
Source:
Returns:
Whether the response is iterable
Type
boolean

_getData() → {Promise}

Fetch the next page of results
Source:
Returns:
Promise resolving to iterator state
Type
Promise

_getData() → {Promise}

Fetch the next page of results
Source:
Returns:
Promise resolving to iterator state
Type
Promise

getNextMarker() → {string|int}

Fetch the next marker
Source:
Returns:
String that is the next marker or int that is the next offset
Type
string | int

getNextMarker() → {string|int}

Fetch the next marker
Source:
Returns:
String that is the next marker or int that is the next offset
Type
string | int

next() → {Promise}

Fetch the next page of the collection
Source:
Returns:
Promise resolving to iterator state
Type
Promise

next() → {Promise}

Fetch the next page of the collection
Source:
Returns:
Promise resolving to iterator state
Type
Promise