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 =
"0.0.4"
Class Method Summary collapse
- .api_key ⇒ Object
- .api_key=(api_key) ⇒ Object
- .broadcast!(alert, scheduled_at = nil) ⇒ Object
- .notify!(alert, user_identifers, scheduled_at = nil) ⇒ Object
Class Method Details
.api_key ⇒ Object
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 |
.broadcast!(alert, scheduled_at = nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/cloud_five_push.rb', line 14 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_identifers, scheduled_at = nil) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/cloud_five_push.rb', line 22 def self.notify!(alert, user_identifers, scheduled_at = nil) notification = CloudFivePush::Notification.new notification.alert = alert notification.user_identifiers = user_identifiers notification.scheduled_at = scheduled_at notification.notify! end |