Sha256: c9a947ce5b8e4a2c1e696b68c3605d4b294e2fdcd803d35e43dab70dc9505ce7

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

require 'dogapi-demo'

module DogapiDemo
  class V1

    class ServiceCheckService < DogapiDemo::APIService

      API_VERSION = 'v1'

      def service_check(check, host, status, options = {})
        begin
          params = {
            :api_key => @api_key,
            :application_key => @application_key
          }

          body = {
            'check' => check,
            'host_name' => host,
            'status' => status
          }.merge options

          request(Net::HTTP::Post, "/api/#{API_VERSION}/check_run", params, body, true)
        rescue Exception => e
          suppress_error_if_silent e
        end
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dogapi-demo-0.1.0 lib/dogapi-demo/v1/service_check.rb