Class: Dogapi::V1::MetadataService

Inherits:
APIService show all
Defined in:
lib/dogapi/v1/metadata.rb

Constant Summary collapse

API_VERSION =
'v1'

Instance Attribute Summary

Attributes inherited from APIService

#api_key, #application_key

Instance Method Summary collapse

Methods inherited from APIService

#connect, #handle_redirect, #handle_response, #initialize, #prepare_params, #prepare_request, #request, #should_set_api_and_app_keys_in_params?, #suppress_error_if_silent

Constructor Details

This class inherits a constructor from Dogapi::APIService

Instance Method Details

#get(metric_name) ⇒ Object



12
13
14
# File 'lib/dogapi/v1/metadata.rb', line 12

def get(metric_name)
  request(Net::HTTP::Get, "/api/#{API_VERSION}/metrics/#{metric_name}", nil, nil, false)
end

#update(metric_name, options = {}) ⇒ Object



16
17
18
# File 'lib/dogapi/v1/metadata.rb', line 16

def update(metric_name, options = {})
  request(Net::HTTP::Put, "/api/#{API_VERSION}/metrics/#{metric_name}", nil, options, true)
end