class Opsgenie::Client
Constants
- ROOT_PATH
Public Class Methods
api_key()
click to toggle source
# File lib/opsgenie/client.rb, line 29 def api_key raise ConfigurationError.new("Missing API key. Use `Opsgenie.configure(api_key: YOUR_API_KEY)` to set the API key") if Config.opsgenie_api_key.nil? Config.opsgenie_api_key end
auth_header()
click to toggle source
# File lib/opsgenie/client.rb, line 21 def auth_header {"Authorization" => "GenieKey #{api_key}"} end
get(path)
click to toggle source
# File lib/opsgenie/client.rb, line 6 def get(path) url = [ ROOT_PATH, version, path, ].join("/") HTTParty.get(url, headers) end
headers()
click to toggle source
# File lib/opsgenie/client.rb, line 15 def headers { headers: auth_header, } end
version()
click to toggle source
# File lib/opsgenie/client.rb, line 25 def version "v2" end