class Dogapi::V1::AlertService
Constants
- API_VERSION
Public Instance Methods
alert(query, options = {})
click to toggle source
# File lib/dogapi/v1/alert.rb 12 def alert(query, options = {}) 13 body = { 14 'query' => query, 15 }.merge options 16 17 request(Net::HTTP::Post, "/api/#{API_VERSION}/alert", nil, body, true) 18 end
delete_alert(alert_id)
click to toggle source
# File lib/dogapi/v1/alert.rb 32 def delete_alert(alert_id) 33 request(Net::HTTP::Delete, "/api/#{API_VERSION}/alert/#{alert_id}", nil, nil, false) 34 end
get_alert(alert_id)
click to toggle source
# File lib/dogapi/v1/alert.rb 28 def get_alert(alert_id) 29 request(Net::HTTP::Get, "/api/#{API_VERSION}/alert/#{alert_id}", nil, nil, false) 30 end
get_all_alerts()
click to toggle source
# File lib/dogapi/v1/alert.rb 36 def get_all_alerts 37 request(Net::HTTP::Get, "/api/#{API_VERSION}/alert", nil, nil, false) 38 end
mute_alerts()
click to toggle source
# File lib/dogapi/v1/alert.rb 40 def mute_alerts 41 request(Net::HTTP::Post, "/api/#{API_VERSION}/mute_alerts", nil, nil, false) 42 end
unmute_alerts()
click to toggle source
# File lib/dogapi/v1/alert.rb 44 def unmute_alerts 45 request(Net::HTTP::Post, "/api/#{API_VERSION}/unmute_alerts", nil, nil, false) 46 end
update_alert(alert_id, query, options)
click to toggle source
# File lib/dogapi/v1/alert.rb 20 def update_alert(alert_id, query, options) 21 body = { 22 'query' => query, 23 }.merge options 24 25 request(Net::HTTP::Put, "/api/#{API_VERSION}/alert/#{alert_id}", nil, body, true) 26 end