class DogapiDemo::V1::SnapshotService

Constants

API_VERSION

Public Instance Methods

snapshot(metric_query, start_ts, end_ts, event_query=nil) click to toggle source
   # File lib/dogapi-demo/v1/snapshot.rb
10 def snapshot(metric_query, start_ts, end_ts, event_query=nil)
11   begin
12     params = {
13       :api_key => @api_key,
14       :application_key => @application_key,
15       :metric_query => metric_query,
16       :start => start_ts,
17       :end => end_ts,
18       :event_query => event_query
19     }
20 
21     request(Net::HTTP::Get, "/api/#{API_VERSION}/graph/snapshot", params, nil, false)
22   rescue Exception => e
23     suppress_error_if_silent e
24   end
25 end