-
public class ChannelBase.PresenceEnables the retrieval of the current and historic presence set for a channel.
-
-
Method Summary
Modifier and Type Method Description PaginatedResult<PresenceMessage>get(Array<Param> params)Retrieves the current members present on the channel and the metadata for each member,such as their io.ably.lib.types.PresenceMessage.Action and ID. voidgetAsync(Array<Param> params, Callback<AsyncPaginatedResult<PresenceMessage>> callback)Asynchronously retrieves the current members present on the channel and the metadata for each member,such as their io.ably.lib.types.PresenceMessage.Action and ID. PaginatedResult<PresenceMessage>history(Array<Param> params)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. voidhistoryAsync(Array<Param> params, Callback<AsyncPaginatedResult<PresenceMessage>> callback)Asynchronously 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. -
-
Method Detail
-
get
PaginatedResult<PresenceMessage> get(Array<Param> params)
Retrieves the current members present on the channel and the metadata for each member,such as their io.ably.lib.types.PresenceMessage.Action and ID. Returns a PaginatedResult object,containing an array of PresenceMessage objects.
Spec: RSPa
- Parameters:
params- the request params:limit (RSP3a) - An upper limit on the number of messages returned.
-
getAsync
void getAsync(Array<Param> params, Callback<AsyncPaginatedResult<PresenceMessage>> callback)
Asynchronously retrieves the current members present on the channel and the metadata for each member,such as their io.ably.lib.types.PresenceMessage.Action and ID. Returns a PaginatedResult object,containing an array of PresenceMessage objects.
Spec: RSPa
- Parameters:
params- the request params:limit (RSP3a) - An upper limit on the number of messages returned.callback- A Callback returning AsyncPaginatedResult object containing an array of PresenceMessage objects.
-
history
PaginatedResult<PresenceMessage> history(Array<Param> params)
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.
Spec: RSP4a
- Parameters:
params- the request params:start (RSP4b1) - The time from which messages are retrieved, specified as milliseconds since the Unix epoch.
-
historyAsync
void historyAsync(Array<Param> params, Callback<AsyncPaginatedResult<PresenceMessage>> callback)
Asynchronously 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.
Spec: RSP4a
- Parameters:
params- the request params:start (RSP4b1) - The time from which messages are retrieved, specified as milliseconds since the Unix epoch.callback- A Callback returning AsyncPaginatedResult object containing an array of PresenceMessage objects.
-
-
-
-