Class: FizzyApiClient::Configuration
- Inherits:
-
Object
- Object
- FizzyApiClient::Configuration
- 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
-
#account_slug ⇒ Object
Returns the value of attribute account_slug.
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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.account_slug = ENV["FIZZY_ACCOUNT"] end |
Instance Attribute Details
#account_slug ⇒ Object
Returns the value of attribute account_slug.
9 10 11 |
# File 'lib/fizzy_api_client/configuration.rb', line 9 def account_slug @account_slug end |
#api_token ⇒ Object
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_url ⇒ Object
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 |
#logger ⇒ Object
Returns the value of attribute logger.
10 11 12 |
# File 'lib/fizzy_api_client/configuration.rb', line 10 def logger @logger end |
#open_timeout ⇒ Object
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 |
#timeout ⇒ Object
Returns the value of attribute timeout.
10 11 12 |
# File 'lib/fizzy_api_client/configuration.rb', line 10 def timeout @timeout end |
#user_agent ⇒ Object
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 |