Interface HttpPaginatedResponse<T>

A superset of PaginatedResult which represents a page of results plus metadata indicating the relative queries available to it. HttpPaginatedResponse additionally carries information about the response to an HTTP request.

Type Parameters

  • T = any

Hierarchy

Properties

errorCode: number

The error code if the X-Ably-Errorcode HTTP header is sent in the response.

errorMessage: string

The error message if the X-Ably-Errormessage HTTP header is sent in the response.

headers: any

The headers of the response.

items: T[]

Contains the current page of results; for example, an array of InboundMessage or PresenceMessage objects for a channel history request.

statusCode: number

The HTTP status code of the response.

success: boolean

Whether statusCode indicates success. This is equivalent to 200 <= statusCode < 300.

Methods

  • Returns a new PaginatedResult for the first page of results.

    Returns Promise<PaginatedResult<T>>

    A promise which, upon success, will be fulfilled with a page of results for message and presence history, stats, and REST presence requests. Upon failure, the promise will be rejected with an ErrorInfo object which explains the error.

  • Returns true if there are more pages available by calling next and returns false if this page is the last page available.

    Returns boolean

    Whether or not there are more pages of results.

  • Returns true if this page is the last page and returns false if there are more pages available by calling next available.

    Returns boolean

    Whether or not this is the last page of results.

  • Returns a new PaginatedResult loaded with the next page of results. If there are no further pages, then null is returned.

    Returns Promise<null | PaginatedResult<T>>

    A promise which, upon success, will be fulfilled with a page of results for message and presence history, stats, and REST presence requests. Upon failure, the promise will be rejected with an ErrorInfo object which explains the error.

Generated using TypeDoc