class Ably::Realtime::Channel::PushChannel
Enables devices to subscribe to push notifications for a channel.
Attributes
Public Class Methods
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 8 def initialize(channel) raise ArgumentError, "Unsupported channel type '#{channel.class}'" unless channel.kind_of?(Ably::Realtime::Channel) @channel = channel end
Public Instance Methods
Retrieves all push subscriptions for the channel. Subscriptions can be filtered using a params object. Returns a {Ably::Models::PaginatedResult} object containing an array of {Ably::Models::PushChannelSubscription} objects.
@spec RSH7e
@note This is unsupported in the Ruby library
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 59 def get_subscriptions(*args) raise_unsupported end
Subscribes all devices associated with the current device’s clientId to push notifications for the channel.
@spec RSH7b
@note This is unsupported in the Ruby library
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 31 def subscribe_client_id(*args) raise_unsupported end
Subscribes the device to push notifications for the channel.
@spec RSH7a
@note This is unsupported in the Ruby library
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 22 def subscribe_device(*args) raise_unsupported end
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 13 def to_s "<PushChannel: name=#{channel.name}>" end
Unsubscribes all devices associated with the current device’s clientId from receiving push notifications for the channel.
@spec RSH7d
@note This is unsupported in the Ruby library
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 49 def unsubscribe_client_id(*args) raise_unsupported end
Unsubscribes the device from receiving push notifications for the channel.
@spec RSH7c
@note This is unsupported in the Ruby library
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 40 def unsubscribe_device(*args) raise_unsupported end
Private Instance Methods
# File lib/submodules/ably-ruby/lib/ably/realtime/channel/push_channel.rb, line 64 def raise_unsupported raise Ably::Exceptions::PushNotificationsNotSupported, 'This device does not support receiving or subscribing to push notifications. All PushChannel methods are unavailable' end