Class: Dogapi::V1::ServiceCheckService

Inherits:
APIService
  • Object
show all
Defined in:
lib/dogapi/v1/service_check.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

#service_check(check, host, status, options = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/dogapi/v1/service_check.rb', line 12

def service_check(check, host, status, options = {})
  body = {
    'check' => check,
    'host_name' => host,
    'status' => status
  }.merge options

  request(Net::HTTP::Post, "/api/#{API_VERSION}/check_run", nil, body, true)
end