Sha256: 774b3a40689070c9a4665c9a70e8aadfc67b55443b87f260d075510ddf58810e
Contents?: true
Size: 1.82 KB
Versions: 8
Compression:
Stored size: 1.82 KB
Contents
module Ably::Rest class Channel # A push channel used for push notifications # Each PushChannel maps to exactly one Rest Channel # class PushChannel attr_reader :channel def initialize(channel) raise ArgumentError, "Unsupported channel type '#{channel.class}'" unless channel.kind_of?(Ably::Rest::Channel) @channel = channel end def to_s "<PushChannel: name=#{channel.name}>" end # Subscribe local device for push notifications on this channel # # @note This is unsupported in the Ruby library def subscribe_device(*args) raise_unsupported end # Subscribe all devices registered to this client's authenticated client_id for push notifications on this channel # # @note This is unsupported in the Ruby library def subscribe_client_id(*args) raise_unsupported end # Unsubscribe local device for push notifications on this channel # # @note This is unsupported in the Ruby library def unsubscribe_device(*args) raise_unsupported end # Unsubscribe all devices registered to this client's authenticated client_id for push notifications on this channel # # @note This is unsupported in the Ruby library def unsubscribe_client_id(*args) raise_unsupported end # Get list of subscriptions on this channel for this device or authenticate client_id # # @note This is unsupported in the Ruby library def get_subscriptions(*args) raise_unsupported end private def raise_unsupported raise Ably::Exceptions::PushNotificationsNotSupported, 'This device does not support receiving or subscribing to push notifications. All PushChannel methods are unavailable' end end end end
Version data entries
8 entries across 8 versions & 2 rubygems