Module: SptyAPI

Defined in:
lib/spty_api.rb,
lib/spty_api/version.rb,
lib/spty_api/authorization.rb,
lib/spty_api/configuration.rb

Defined Under Namespace

Modules: HTTP Classes: Authorization, Configuration

Constant Summary collapse

VERSION =
"0.0.5"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.authorizationObject

Returns the value of attribute authorization.



8
9
10
# File 'lib/spty_api.rb', line 8

def authorization
  @authorization
end

.configurationObject

Returns the value of attribute configuration.



8
9
10
# File 'lib/spty_api.rb', line 8

def configuration
  @configuration
end

Class Method Details

.client_authorizeObject



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

def client_authorize
  self.authorization ||= Authorization.new(type: 'client_credentials')
end

.configure {|configuration| ... } ⇒ Object

Yields:



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

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
end

.resetObject



19
20
21
22
# File 'lib/spty_api.rb', line 19

def reset
  self.configuration = nil
  self.authorization = nil
end