Module: Bugsnag::Api

Defined in:
lib/bugsnag/api.rb,
lib/bugsnag/api/error.rb,
lib/bugsnag/api/client.rb,
lib/bugsnag/api/version.rb,
lib/bugsnag/api/client/errors.rb,
lib/bugsnag/api/client/events.rb,
lib/bugsnag/api/client/pivots.rb,
lib/bugsnag/api/client/trends.rb,
lib/bugsnag/api/configuration.rb,
lib/bugsnag/api/client/comments.rb,
lib/bugsnag/api/client/projects.rb,
lib/bugsnag/api/client/releases.rb,
lib/bugsnag/api/client/stability.rb,
lib/bugsnag/api/client/currentuser.rb,
lib/bugsnag/api/client/eventfields.rb,
lib/bugsnag/api/client/collaborators.rb,
lib/bugsnag/api/client/organizations.rb

Overview

Static access to a Bugsnag API Client

Defined Under Namespace

Classes: AccountCredentialsRequired, BadGateway, BadRequest, Client, ClientError, Configuration, Conflict, Error, Forbidden, InternalServerError, MethodNotAllowed, MissingContentType, NotAcceptable, NotFound, NotImplemented, RateLimitExceeded, ServerError, ServiceUnavailable, Unauthorized, UnprocessableEntity, UnsupportedMediaType, UserCredentialsRequired

Constant Summary collapse

VERSION =
"3.0.0"

Class Method Summary collapse

Class Method Details

.clientBugsnag::Api::Client

Get the static API client. Note that using the static API client may not work as expected in a multithreaded environment (e.g. when using the #paginate or #last_response instance methods)

Returns:



29
30
31
# File 'lib/bugsnag/api.rb', line 29

def client
  @client ||= Bugsnag::Api::Client.new
end

.configurationBugsnag::Api::Configuration

Get the static client's configuration options

Returns:



19
20
21
# File 'lib/bugsnag/api.rb', line 19

def configuration
  client.configuration
end

.configure(&block) ⇒ Object

Set configuration options using a block



12
13
14
# File 'lib/bugsnag/api.rb', line 12

def configure(&block)
  client.configure(&block) if block_given?
end

.reset!Bugsnag::Api::Client

Reset the static API client

Returns:



36
37
38
# File 'lib/bugsnag/api.rb', line 36

def reset!
  @client = nil
end