Class: Fog::Rackspace::Monitoring::Notifications

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/monitoring/notifications.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/fog/rackspace/models/monitoring/notifications.rb', line 12

def all(options={})
  data = service.list_notifications(options).body
  marker = data['metadata']['next_marker']

  load(data['values'])
end

#get(notification_id) ⇒ Object



19
20
21
22
23
24
# File 'lib/fog/rackspace/models/monitoring/notifications.rb', line 19

def get(notification_id)
  data = service.get_notification(notification_id).body
  new(data)
rescue Fog::Rackspace::Monitoring::NotFound
  nil
end