-
public class PushBase.ChannelSubscriptionsEnables device push channel subscriptions.
-
-
Method Summary
Modifier and Type Method Description PushBase.ChannelSubscriptionsave(PushBase.ChannelSubscription subscription)Subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel. voidsaveAsync(PushBase.ChannelSubscription subscription, Callback<PushBase.ChannelSubscription> callback)Asynchronously subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel. PaginatedResult<PushBase.ChannelSubscription>list(Array<Param> params)Retrieves all push channel subscriptions matching the filter params provided. voidlistAsync(Array<Param> params, Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback)Asynchronously retrieves all push channel subscriptions matching the filter params provided. voidremove(PushBase.ChannelSubscription subscription)Unsubscribes a device, or a group of devices sharing the same clientId from receiving push notifications on a channel. voidremoveAsync(PushBase.ChannelSubscription subscription, CompletionListener listener)Asynchronously unsubscribes a device,or a group of devices sharing the same clientId from receiving push notifications on a channel. voidremoveWhere(Array<Param> params)Unsubscribes all devices from receiving push notifications on a channel that match the filter params provided. voidremoveWhereAsync(Array<Param> params, CompletionListener listener)Asynchronously unsubscribes all devices from receiving push notifications on a channel that match the filter params provided. PaginatedResult<String>listChannels(Array<Param> params)Retrieves all channels with at least one device subscribed to push notifications. voidlistChannelsAsync(Array<Param> params, Callback<AsyncPaginatedResult<String>> callback)Asynchronously retrieves all channels with at least one device subscribed to push notifications. -
-
Method Detail
-
save
PushBase.ChannelSubscription save(PushBase.ChannelSubscription subscription)
Subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel.Returns a ChannelSubscription object.
Spec: RSH1c3
- Parameters:
subscription- A ChannelSubscription object.
-
saveAsync
void saveAsync(PushBase.ChannelSubscription subscription, Callback<PushBase.ChannelSubscription> callback)
Asynchronously subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel.Returns a ChannelSubscription object.
Spec: RSH1c3
- Parameters:
subscription- A ChannelSubscription object.callback- A callback returning ChannelSubscription object describing the new or updated subscriptions.
-
list
PaginatedResult<PushBase.ChannelSubscription> list(Array<Param> params)
Retrieves all push channel subscriptions matching the filter params provided.Returns a PaginatedResult object, containing an array of ChannelSubscription objects.
Spec: RSH1c1
- Parameters:
params- An object containing key-value pairs to filter subscriptions by.Can contain channel, clientId, deviceId and a limit on the number of devices returned, up to 1,000.
-
listAsync
void listAsync(Array<Param> params, Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback)
Asynchronously retrieves all push channel subscriptions matching the filter params provided.Returns a PaginatedResult object, containing an array of ChannelSubscription objects.
Spec: RSH1c1
- Parameters:
params- An object containing key-value pairs to filter subscriptions by.Can contain channel, clientId, deviceId and a limit on the number of devices returned, up to 1,000.callback- A callback returning AsyncPaginatedResult object containing an array of ChannelSubscription objects.
-
remove
void remove(PushBase.ChannelSubscription subscription)
Unsubscribes a device, or a group of devices sharing the same clientId from receiving push notifications on a channel.
Spec: RSH1c4
- Parameters:
subscription- A ChannelSubscription object.
-
removeAsync
void removeAsync(PushBase.ChannelSubscription subscription, CompletionListener listener)
Asynchronously unsubscribes a device,or a group of devices sharing the same clientId from receiving push notifications on a channel.
Spec: RSH1c4
- Parameters:
subscription- A ChannelSubscription object.listener- A listener to be notified of success or failure.
-
removeWhere
void removeWhere(Array<Param> params)
Unsubscribes all devices from receiving push notifications on a channel that match the filter params provided.
Spec: RSH1c5
- Parameters:
params- An object containing key-value pairs to filter subscriptions by.Can contain channel, and optionally either clientId or deviceId.
-
removeWhereAsync
void removeWhereAsync(Array<Param> params, CompletionListener listener)
Asynchronously unsubscribes all devices from receiving push notifications on a channel that match the filter params provided.
Spec: RSH1c5
- Parameters:
params- An object containing key-value pairs to filter subscriptions by.Can contain channel, and optionally either clientId or deviceId.listener- A listener to be notified of success or failure.
-
listChannels
PaginatedResult<String> listChannels(Array<Param> params)
Retrieves all channels with at least one device subscribed to push notifications.Returns a PaginatedResult object, containing an array of channel names.
Spec: RSH1c2
- Parameters:
params- An object containing key-value pairs to filter channels by.Can contain a limit on the number of channels returned, up to 1,000.
-
listChannelsAsync
void listChannelsAsync(Array<Param> params, Callback<AsyncPaginatedResult<String>> callback)
Asynchronously retrieves all channels with at least one device subscribed to push notifications.Returns a PaginatedResult object, containing an array of channel names.
Spec: RSH1c2
- Parameters:
params- An object containing key-value pairs to filter channels by.Can contain a limit on the number of channels returned, up to 1,000.callback- A AsyncPaginatedResult callback returning object containing an array of channel names.
-
-
-
-