Class: Firebase::Admin::Messaging::MulticastMessage
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::MulticastMessage
- Defined in:
- lib/firebase/admin/messaging/multicast_message.rb
Overview
A multicast message that can be sent via Firebase Cloud Messaging.
Contains payload information as well as recipient information. In particular, the message must contain exactly one of token, topic or condition fields.
Instance Attribute Summary collapse
-
#android ⇒ AndroidConfig?
An AndroidConfig (optional).
-
#apns ⇒ APNSConfig?
An APNSConfig (optional).
-
#condition ⇒ String?
The FCM condition to which the message should be sent (optional).
-
#data ⇒ Hash<String, String>?
A hash of data fields (optional).
-
#fcm_options ⇒ FCMOptions?
An FCMOptions (optional).
-
#notification ⇒ Notification?
A Notification (optional).
-
#tokens ⇒ Array<String>?
Registration token of the device to which the message should be sent (optional).
-
#topic ⇒ String?
Name of the FCM topic to which the message should be sent (optional).
Instance Method Summary collapse
-
#initialize(data: nil, notification: nil, android: nil, apns: nil, fcm_options: nil, tokens: nil, topic: nil, condition: nil) ⇒ MulticastMessage
constructor
Initializes a Message.
Constructor Details
#initialize(data: nil, notification: nil, android: nil, apns: nil, fcm_options: nil, tokens: nil, topic: nil, condition: nil) ⇒ MulticastMessage
Initializes a Firebase::Admin::Messaging::Message.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 61 def initialize( data: nil, notification: nil, android: nil, apns: nil, fcm_options: nil, tokens: nil, topic: nil, condition: nil ) self.data = data self.notification = notification self.android = android self.apns = apns self. = self.tokens = tokens self.topic = topic self.condition = condition end |
Instance Attribute Details
#android ⇒ AndroidConfig?
19 20 21 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 19 def android @android end |
#apns ⇒ APNSConfig?
23 24 25 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 23 def apns @apns end |
#condition ⇒ String?
40 41 42 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 40 def condition @condition end |
#data ⇒ Hash<String, String>?
11 12 13 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 11 def data @data end |
#fcm_options ⇒ FCMOptions?
27 28 29 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 27 def end |
#notification ⇒ Notification?
15 16 17 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 15 def notification @notification end |
#tokens ⇒ Array<String>?
31 32 33 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 31 def tokens @tokens end |
#topic ⇒ String?
36 37 38 |
# File 'lib/firebase/admin/messaging/multicast_message.rb', line 36 def topic @topic end |