Module: SentryApi

Extended by:
Configuration
Defined in:
lib/sentry-api.rb,
lib/sentry-api/api.rb,
lib/sentry-api/error.rb,
lib/sentry-api/client.rb,
lib/sentry-api/request.rb,
lib/sentry-api/version.rb,
lib/sentry-api/page_links.rb,
lib/sentry-api/configuration.rb,
lib/sentry-api/objectified_hash.rb,
lib/sentry-api/paginated_response.rb

Defined Under Namespace

Modules: Configuration, Error Classes: API, Client, ObjectifiedHash, PageLinks, PaginatedResponse, Request

Constant Summary collapse

VERSION =
"0.3.4"

Constants included from Configuration

Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.actionsArray<Symbol>

Returns an unsorted array of available client methods.

Returns:

  • (Array<Symbol>)


40
41
42
43
# File 'lib/sentry-api.rb', line 40

def self.actions
  hidden = /endpoint|auth_token|default_org_slug|get|post|put|delete|validate|set_request_defaults|httparty/
  (SentryApi::Client.instance_methods - Object.methods).reject { |e| e[hidden] }
end

.client(options = {}) ⇒ Sentry::Client

Alias for Sentry::Client.new

Returns:

  • (Sentry::Client)


17
18
19
# File 'lib/sentry-api.rb', line 17

def self.client(options={})
  SentryApi::Client.new(options)
end

.http_proxy(address = nil, port = nil, username = nil, password = nil) ⇒ Object

Delegate to HTTParty.http_proxy



33
34
35
# File 'lib/sentry-api.rb', line 33

def self.http_proxy(address=nil, port=nil, username=nil, password=nil)
  SentryApi::Request.http_proxy(address, port, username, password)
end

.method_missing(method, *args, &block) ⇒ Object

Delegate to Sentry::Client



22
23
24
25
# File 'lib/sentry-api.rb', line 22

def self.method_missing(method, *args, &block)
  return super unless client.respond_to?(method)
  client.send(method, *args, &block)
end

Instance Method Details

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Delegate to Sentry::Client

Returns:

  • (Boolean)


28
29
30
# File 'lib/sentry-api.rb', line 28

def respond_to_missing?(method_name, include_private = false)
  client.respond_to?(method_name) || super
end