Class: Ably::Realtime::Push
- Inherits:
-
Object
- Object
- Ably::Realtime::Push
- Defined in:
- lib/ably/realtime/push.rb,
lib/ably/realtime/push/admin.rb,
lib/ably/realtime/push/device_registrations.rb,
lib/ably/realtime/push/channel_subscriptions.rb
Overview
Class providing push notification functionality
Defined Under Namespace
Classes: Admin, ChannelSubscriptions, DeviceRegistrations
Instance Attribute Summary collapse
- #client ⇒ Object readonly
Instance Method Summary collapse
-
#activate(*arg) ⇒ Object
Activates the device for push notifications with FCM or APNS, obtaining a unique identifier from them.
-
#admin ⇒ Ably::Realtime::Push::Admin
A Admin object.
-
#deactivate(*arg) ⇒ Object
Deactivates the device from receiving push notifications with Ably and FCM or APNS.
-
#initialize(client) ⇒ Push
constructor
A new instance of Push.
Constructor Details
#initialize(client) ⇒ Push
Returns a new instance of Push.
10 11 12 |
# File 'lib/ably/realtime/push.rb', line 10 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
8 9 10 |
# File 'lib/ably/realtime/push.rb', line 8 def client @client end |
Instance Method Details
#activate(*arg) ⇒ Object
This is unsupported in the Ruby library
Activates the device for push notifications with FCM or APNS, obtaining a unique identifier from them. Subsequently registers the device with Ably and stores the deviceIdentityToken in local storage.
31 32 33 |
# File 'lib/ably/realtime/push.rb', line 31 def activate(*arg) raise_unsupported end |
#admin ⇒ Ably::Realtime::Push::Admin
A Admin object.
20 21 22 |
# File 'lib/ably/realtime/push.rb', line 20 def admin @admin ||= Admin.new(self) end |
#deactivate(*arg) ⇒ Object
This is unsupported in the Ruby library
Deactivates the device from receiving push notifications with Ably and FCM or APNS.
41 42 43 |
# File 'lib/ably/realtime/push.rb', line 41 def deactivate(*arg) raise_unsupported end |