Interface Channel

Enables messages to be published and historic messages to be retrieved for a channel.

Hierarchy

  • Channel

Properties

Methods

Properties

name: string

The channel name.

presence: Presence

A Presence object.

push: PushChannel

A PushChannel object.

Methods

  • Retrieves a PaginatedResult object, containing an array of historical InboundMessage objects for the channel. If the channel is configured to persist messages, then messages can be retrieved from history for up to 72 hours in the past. If not, messages can only be retrieved from history for up to two minutes in the past.

    Parameters

    • Optional params: RestHistoryParams

      A set of parameters which are used to specify which messages should be retrieved.

    Returns Promise<PaginatedResult<InboundMessage>>

    A promise which, upon success, will be fulfilled with a PaginatedResult object containing an array of InboundMessage objects. Upon failure, the promise will be rejected with an ErrorInfo object which explains the error.

  • Publishes an array of messages to the channel.

    Parameters

    Returns Promise<void>

    A promise which resolves upon success of the operation and rejects with an ErrorInfo object upon its failure.

  • Publishes a message to the channel.

    Parameters

    Returns Promise<void>

    A promise which resolves upon success of the operation and rejects with an ErrorInfo object upon its failure.

  • Publishes a single message to the channel with the given event name and payload.

    Parameters

    • name: string

      The name of the message.

    • data: any

      The payload of the message.

    • Optional options: PublishOptions

      Optional parameters, such as quickAck sent as part of the query string.

    Returns Promise<void>

    A promise which resolves upon success of the operation and rejects with an ErrorInfo object upon its failure.

Generated using TypeDoc