Enables the presence set to be entered and subscribed to, and the historic presence set to be retrieved for a channel.

Hierarchy

Constructors

Properties

syncComplete: boolean

Indicates whether the presence set synchronization between Ably and the clients on the channel has been completed. Set to true when the sync is complete.

Methods

  • Enters the presence set for the channel, passing a data payload. A clientId is required to be present on a channel.

    Parameters

    • Optional data: any

      The data payload or PresenceMessage associated with the presence member.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Enters the presence set for the channel. A clientId is required to be present on a channel.

    Parameters

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Enters the presence set of the channel for a given clientId. Enables a single client to update presence on behalf of any number of clients using a single connection. The library must have been instantiated with an API key or a token bound to a wildcard clientId.

    Parameters

    • clientId: string

      The ID of the client to enter into the presence set.

    • Optional data: any

      The data payload or PresenceMessage associated with the presence member.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Enters the presence set of the channel for a given clientId. Enables a single client to update presence on behalf of any number of clients using a single connection. The library must have been instantiated with an API key or a token bound to a wildcard clientId.

    Parameters

    • clientId: string

      The ID of the client to enter into the presence set.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Leaves the presence set for the channel. A client must have previously entered the presence set before they can leave it.

    Parameters

    • Optional data: any

      The data payload or PresenceMessage associated with the presence member.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Leaves the presence set for the channel. A client must have previously entered the presence set before they can leave it.

    Parameters

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Leaves the presence set of the channel for a given clientId. Enables a single client to update presence on behalf of any number of clients using a single connection. The library must have been instantiated with an API key or a token bound to a wildcard clientId.

    Parameters

    • clientId: string

      The ID of the client to leave the presence set for.

    • Optional data: any

      The data payload or PresenceMessage associated with the presence member.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Leaves the presence set of the channel for a given clientId. Enables a single client to update presence on behalf of any number of clients using a single connection. The library must have been instantiated with an API key or a token bound to a wildcard clientId.

    Parameters

    • clientId: string

      The ID of the client to leave the presence set for.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Updates the data payload for a presence member. If called before entering the presence set, this is treated as an ENTER event.

    Parameters

    • Optional data: any

      The data payload or PresenceMessage object to update for the presence member.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

  • Updates the data payload for a presence member using a given clientId. Enables a single client to update presence on behalf of any number of clients using a single connection. The library must have been instantiated with an API key or a token bound to a wildcard clientId.

    Parameters

    • clientId: string

      The ID of the client to update in the presence set.

    • Optional data: any

      The data payload or PresenceMessage object to update for the presence member.

    • Optional callback: errorCallback

      A function which will be called upon completion of the operation. If the operation succeeded, then the function will be called with null. If it failed, the function will be called with information about the error.

    Returns void

Generated using TypeDoc