Class: Dogapi::V1::HostsService

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

Overview

Hosts API

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

#search(options = {}) ⇒ Object



13
14
15
# File 'lib/dogapi/v1/hosts.rb', line 13

def search(options = {})
  request(Net::HTTP::Get, "/api/#{API_VERSION}/hosts", options, nil, true)
end

#totalsObject



17
18
19
# File 'lib/dogapi/v1/hosts.rb', line 17

def totals
  request(Net::HTTP::Get, "/api/#{API_VERSION}/hosts/totals", nil, nil, true)
end