ARTPushChannelSubscriptionsProtocol
Objective-C
@protocol ARTPushChannelSubscriptionsProtocol
Swift
protocol ARTPushChannelSubscriptionsProtocol
The protocol upon which the ARTPushChannelSubscriptions is implemented.
-
Subscribes a device, or a group of devices sharing the same
clientIdto push notifications on a channel.Declaration
Objective-C
- (void)save:(nonnull ARTPushChannelSubscription *)channelSubscription callback:(nonnull ARTCallback)callback;Swift
func save(_ channelSubscription: ARTPushChannelSubscription, callback: @escaping ARTCallback)Parameters
channelSubscriptionAn
ARTPushChannelSubscriptionobject.callbackA success or failure callback function.
-
Retrieves all channels with at least one device subscribed to push notifications. Returns a
ARTPaginatedResultobject, containing an array of channel names.Declaration
Objective-C
- (void)listChannels:(nonnull ARTPaginatedTextCallback)callback;Swift
func listChannels(_ callback: @escaping ARTPaginatedTextCallback)Parameters
callbackA callback for retriving an
ARTPaginatedResultobject with an array of channel names. -
Retrieves all push channel subscriptions matching the filter
paramsprovided. Returns aARTPaginatedResultobject, containing an array ofARTPushChannelSubscriptionobjects.Declaration
Objective-C
- (void)list:(nonnull NSStringDictionary *)params callback:(nonnull ARTPaginatedPushChannelCallback)callback;Swift
func list(_ params: [String : String], callback: @escaping ARTPaginatedPushChannelCallback)Parameters
paramsAn object containing key-value pairs to filter subscriptions by. Can contain
channel,clientId,deviceIdand alimiton the number of devices returned, up to 1,000.callbackA callback for retriving an
ARTPaginatedResultobject with an array ofARTPushChannelSubscriptionobjects. -
Unsubscribes a device, or a group of devices sharing the same
clientIdfrom receiving push notifications on a channel.Declaration
Objective-C
- (void)remove:(nonnull ARTPushChannelSubscription *)subscription callback:(nonnull ARTCallback)callback;Swift
func remove(_ subscription: ARTPushChannelSubscription, callback: @escaping ARTCallback)Parameters
subscriptionAn
ARTPushChannelSubscriptionobject.callbackA success or failure callback function.
-
Unsubscribes all devices from receiving push notifications on a channel that match the filter
paramsprovided.Declaration
Objective-C
- (void)removeWhere:(nonnull NSStringDictionary *)params callback:(nonnull ARTCallback)callback;Swift
func removeWhere(_ params: [String : String], callback: @escaping ARTCallback)Parameters
paramsAn object containing key-value pairs to filter subscriptions by. Can contain
channel, and optionally eitherclientIdordeviceId.callbackA success or failure callback function.