Class: SentryApi::API

Inherits:
Request show all
Defined in:
lib/sentry-api/api.rb

Direct Known Subclasses

Client

Instance Attribute Summary

Attributes inherited from Request

#auth_token, #default_org_slug, #endpoint

Instance Method Summary collapse

Methods inherited from Request

decode, #delete, #get, parse, #post, #put, #set_request_defaults, #upload, #validate

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API.

Raises:

  • (Error:MissingCredentials)


9
10
11
12
13
14
15
# File 'lib/sentry-api/api.rb', line 9

def initialize(options={})
  options = SentryApi.options.merge(options)
  (Configuration::VALID_OPTIONS_KEYS).each do |key|
    send("#{key}=", options[key]) if options[key]
  end
  set_request_defaults
end