Module: ResoWebApi

Defined in:
lib/reso_web_api.rb,
lib/reso_web_api/client.rb,
lib/reso_web_api/errors.rb,
lib/reso_web_api/version.rb,
lib/reso_web_api/resources.rb,
lib/reso_web_api/base_client.rb,
lib/reso_web_api/authentication/access.rb,
lib/reso_web_api/authentication/middleware.rb,
lib/reso_web_api/authentication/token_auth.rb,
lib/reso_web_api/authentication/auth_strategy.rb

Defined Under Namespace

Modules: Authentication, Errors, Resources Classes: BaseClient, Client, Error, NetworkError

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.client(options = {}) ⇒ Object


10
11
12
# File 'lib/reso_web_api.rb', line 10

def self.client(options = {})
  Thread.current[:reso_web_api_client] ||= ResoWebApi::Client.new(options)
end

.loggerObject


19
20
21
22
23
24
25
# File 'lib/reso_web_api.rb', line 19

def self.logger
  if @logger.nil?
    @logger = Logger.new(STDOUT)
    @logger.level = Logger::INFO
  end
  @logger
end

.logger=(logger) ⇒ Object


27
28
29
# File 'lib/reso_web_api.rb', line 27

def self.logger=(logger)
  @logger = logger
end

.resetObject


14
15
16
17
# File 'lib/reso_web_api.rb', line 14

def self.reset
  reset_configuration
  Thread.current[:reso_web_api_client] = nil
end