Class: FizzyApiClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/fizzy_api_client/configuration.rb

Constant Summary collapse

DEFAULT_BASE_URL =
"https://app.fizzy.do"
DEFAULT_TIMEOUT =
30
DEFAULT_OPEN_TIMEOUT =
10

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
19
20
# File 'lib/fizzy_api_client/configuration.rb', line 12

def initialize
  @api_token = ENV["FIZZY_API_TOKEN"]
  @base_url = ENV["FIZZY_BASE_URL"] || DEFAULT_BASE_URL
  @timeout = DEFAULT_TIMEOUT
  @open_timeout = DEFAULT_OPEN_TIMEOUT
  @user_agent = "FizzyApiClient/#{VERSION}"
  @logger = nil
  self. = ENV["FIZZY_ACCOUNT"]
end

Instance Attribute Details

#account_slugObject

Returns the value of attribute account_slug.



9
10
11
# File 'lib/fizzy_api_client/configuration.rb', line 9

def 
  @account_slug
end

#api_tokenObject

Returns the value of attribute api_token.



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

def api_token
  @api_token
end

#base_urlObject

Returns the value of attribute base_url.



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

def base_url
  @base_url
end

#loggerObject

Returns the value of attribute logger.



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

def logger
  @logger
end

#open_timeoutObject

Returns the value of attribute open_timeout.



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

def open_timeout
  @open_timeout
end

#timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

#user_agentObject

Returns the value of attribute user_agent.



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

def user_agent
  @user_agent
end