diff --git a/lib/dogapi/v1/monitor.rb b/lib/dogapi/v1/monitor.rb index 467f235c..6aaacc32 100644 --- a/lib/dogapi/v1/monitor.rb +++ b/lib/dogapi/v1/monitor.rb @@ -16,10 +16,15 @@ def monitor(type, query, options = {}) request(Net::HTTP::Post, "/api/#{API_VERSION}/monitor", nil, body, true) end - def update_monitor(monitor_id, query, options) - body = { - 'query' => query, - }.merge options + def update_monitor(monitor_id, query = nil, options = {}) + body = {}.merge options + unless query.nil? + body = { + 'query' => query + }.merge body + warn '[DEPRECATION] query param is not required anymore and should be set to nil.'\ + ' To update the query, set it in the options parameter instead' + end request(Net::HTTP::Put, "/api/#{API_VERSION}/monitor/#{monitor_id}", nil, body, true) end diff --git a/lib/dogapi/version.rb b/lib/dogapi/version.rb index 6295e730..f5e37e12 100644 --- a/lib/dogapi/version.rb +++ b/lib/dogapi/version.rb @@ -1,3 +1,3 @@ module Dogapi - VERSION = '1.36.0' + VERSION = '1.37.0' end