lib/sysdig/alert_notifications.rb in sysdig-0.2.4 vs lib/sysdig/alert_notifications.rb in sysdig-0.3.0
- old
+ new
@@ -4,8 +4,14 @@
def all(options={})
to = options[:to] || Time.now
from = options[:from] || Time.at(Time.now.to_i - 86400) # 1 day
- load(service.get_notifications(from, to).body.fetch("notifications"))
+ load(service.get_alert_notifications(from, to).body.fetch("notifications"))
+ end
+
+ def get(identity)
+ new(
+ service.get_alert_notification(identity).body.fetch("notification")
+ )
end
end