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.
Enters the presence set for the channel, passing a data
payload. A clientId
is required to be present on a channel.
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.
Enters the presence set for the channel. A clientId
is required to be present on a channel.
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.
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
.
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.
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
.
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.
Retrieves the current members present on the channel and the metadata for each member, such as their PresenceAction and ID. Returns an array of PresenceMessage objects.
Optional
params: RealtimePresenceParams
A set of parameters which are used to specify which presence members should be retrieved.
Optional
callback: realtimePresenceGetCallback
A function which, upon success, will be called with an array of PresenceMessage objects. Upon failure, the function will be called with information about the error.
Retrieves the current members present on the channel and the metadata for each member, such as their PresenceAction and ID. Returns an array of PresenceMessage objects.
Optional
callback: realtimePresenceGetCallback
A function which, upon success, will be called with an array of PresenceMessage objects. Upon failure, the function will be called with information about the error.
Retrieves a PaginatedResult object, containing an array of historical PresenceMessage objects for the channel. If the channel is configured to persist messages, then presence messages can be retrieved from history for up to 72 hours in the past. If not, presence messages can only be retrieved from history for up to two minutes in the past.
Optional
params: RealtimeHistoryParams
A set of parameters which are used to specify which presence messages should be retrieved.
Optional
callback: paginatedResultCallback<PresenceMessage>
A function which, upon success, will be called with a PaginatedResult object containing an array of PresenceMessage objects. Upon failure, the function will be called with information about the error.
Retrieves a PaginatedResult object, containing an array of historical PresenceMessage objects for the channel. If the channel is configured to persist messages, then presence messages can be retrieved from history for up to 72 hours in the past. If not, presence messages can only be retrieved from history for up to two minutes in the past.
Optional
callback: paginatedResultCallback<PresenceMessage>
A function which, upon success, will be called with a PaginatedResult object containing an array of PresenceMessage objects. Upon failure, the function will be called with information about the error.
Leaves the presence set for the channel. A client must have previously entered the presence set before they can leave it.
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.
Leaves the presence set for the channel. A client must have previously entered the presence set before they can leave it.
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.
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
.
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.
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
.
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.
Registers a listener that is called each time a PresenceMessage matching a given PresenceAction, or an action within an array of PresenceAction
s, is received on the channel, such as a new member entering the presence set.
A PresenceAction or an array of PresenceAction
s to register the listener for.
Optional
listener: messageCallback<PresenceMessage>
An event listener function.
Optional
callbackWhenAttached: errorCallback
A function which will be called upon completion of the channel attach()
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.
Registers a listener that is called each time a PresenceMessage is received on the channel, such as a new member entering the presence set.
An event listener function.
Optional
callbackWhenAttached: errorCallback
A function which will be called upon completion of the channel attach()
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.
Deregisters a specific listener that is registered to receive PresenceMessage on the channel for a given PresenceAction.
A specific PresenceAction to deregister the listener for.
An event listener function.
Deregisters a specific listener that is registered to receive PresenceMessage on the channel for a given array of PresenceAction objects.
An array of PresenceAction objects to deregister the listener for.
An event listener function.
Deregisters any listener that is registered to receive PresenceMessage on the channel for a specific PresenceAction
A specific PresenceAction to deregister the listeners for.
Deregisters any listener that is registered to receive PresenceMessage on the channel for an array of PresenceAction objects
An array of PresenceAction objects to deregister the listeners for.
Deregisters a specific listener that is registered to receive PresenceMessage on the channel.
An event listener function.
Deregisters all listeners currently receiving PresenceMessage for the channel.
Updates the data
payload for a presence member. If called before entering the presence set, this is treated as an ENTER event.
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.
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
.
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.
Generated using TypeDoc
Enables the presence set to be entered and subscribed to, and the historic presence set to be retrieved for a channel.