Module: CloudFivePush

Defined in:
lib/cloud_five_push.rb,
lib/cloud_five_push/version.rb,
lib/cloud_five_push/notification.rb

Defined Under Namespace

Classes: Notification

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.api_keyObject



10
11
12
# File 'lib/cloud_five_push.rb', line 10

def self.api_key
  @api_key
end

.api_key=(api_key) ⇒ Object



6
7
8
# File 'lib/cloud_five_push.rb', line 6

def self.api_key=(api_key)
  @api_key = api_key
end

.aps_environmentObject



19
20
21
# File 'lib/cloud_five_push.rb', line 19

def self.aps_environment
  @aps_environment
end

.aps_environment=(aps_environment) ⇒ Object



15
16
17
# File 'lib/cloud_five_push.rb', line 15

def self.aps_environment=(aps_environment)
  @aps_environment = aps_environment
end

.broadcast!(alert, scheduled_at = nil) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/cloud_five_push.rb', line 23

def self.broadcast!(alert, scheduled_at = nil)
  notification = CloudFivePush::Notification.new
  notification.broadcast = true
  notification.alert = alert
  notification.scheduled_at = scheduled_at
  notification.notify!
end

.notify!(alert, user_identifiers, scheduled_at = nil) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/cloud_five_push.rb', line 31

def self.notify!(alert, user_identifiers, scheduled_at = nil)
  notification = CloudFivePush::Notification.new
  notification.alert = alert
  notification.user_identifiers = user_identifiers
  notification.scheduled_at = scheduled_at
  notification.notify!
end