Class: PagerDuty::Service

Inherits:
Common::Client::Base show all
Defined in:
lib/pagerduty/service.rb

Direct Known Subclasses

ExternalServices::Service, MaintenanceClient

Constant Summary collapse

STATSD_KEY_PREFIX =
'api.pagerduty'

Instance Method Summary collapse

Methods inherited from Common::Client::Base

#config, configuration, #connection, #delete, #get, #post, #put, #raise_backend_exception, #raise_not_authenticated, #request, #sanitize_headers!, #service_name

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata

Instance Method Details

#headersObject (private)



15
16
17
# File 'lib/pagerduty/service.rb', line 15

def headers
  { 'Authorization' => "Token token=#{Settings.maintenance.pagerduty_api_token}" }
end

#perform(method, path, body = nil) ⇒ Object



9
10
11
# File 'lib/pagerduty/service.rb', line 9

def perform(method, path, body = nil)
  super(method, path, body, headers)
end