A Promise to a response that can be awaited like normal, but at the risk of not getting all results due to API limits. In which case a nextCursor field is returned to request the next page. Helper methods are provided to abstract away the pagination.
Example using client.timeseries.list
with a per-request limit of 1000:
const response = client.timeseries.list({ filter: { assetIds: [ASSET_ID] }, limit: 1000 });
You can get up to 1000 elements with normal await:
const { items, nextCursor } = await response;
You can use autoPagingToArray
to get more items than the per-request limit.
E.g. an array of up to 5000 items:
const timeseries = await response.autoPagingToArray({ limit: 5000 });
You may also specify { limit: Infinity }
to get all results.
You can also iterate through all items (unless you break out of the loop) like so:
for await (const value of response) {
// do something to value
}
The url to send the user to in order to log out
External Id provided by client. Should be unique within the project.