Class: Pushwoosh::PushNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/pushwoosh/push_notification.rb

Constant Summary collapse

STRING_BYTE_LIMIT =
205

Instance Method Summary collapse

Constructor Details

#initialize(auth_hash = {}) ⇒ PushNotification

Returns a new instance of PushNotification.



13
14
15
# File 'lib/pushwoosh/push_notification.rb', line 13

def initialize(auth_hash = {})
  @auth_hash = auth_hash
end

Instance Method Details

#notify_all(message, other_options = {}) ⇒ Object



17
18
19
20
# File 'lib/pushwoosh/push_notification.rb', line 17

def notify_all(message, other_options = {})
  other_options.merge!(content: limited_content(message))
  create_message(other_options)
end

#notify_devices(message, devices, other_options = {}) ⇒ Object



22
23
24
25
# File 'lib/pushwoosh/push_notification.rb', line 22

def notify_devices(message, devices, other_options = {})
  other_options.merge!(content: limited_content(message), devices: devices)
  create_message(other_options)
end