Module: IdbusApi::Default
- Extended by:
- Api::DefaultOptions
- Defined in:
- lib/idbus_api/default.rb
Overview
Default configuration options for Client
Constant Summary collapse
- API_ENDPOINT =
Default API endpoint
"https://api.idbus.com".freeze
- API_VERSION =
Default API version
"v1".freeze
- USER_AGENT =
Default User Agent header string
"Idbus API Ruby Gem #{IdbusApi::VERSION}".freeze
Class Method Summary collapse
-
.access_token ⇒ String
Default access token from ENV.
-
.access_token_prefix ⇒ String
Default access token prefix.
-
.api_endpoint ⇒ String
Default API endpoint from ENV or API_ENDPOINT.
-
.api_version ⇒ String
Default API version from ENV or API_VERSION.
- .connection_options ⇒ Hash
-
.user_agent ⇒ String
Default User-Agent header string from ENV or USER_AGENT Default User-Agent header string from ENV or USER_AGENT.
Class Method Details
.access_token ⇒ String
Default access token from ENV
23 24 25 |
# File 'lib/idbus_api/default.rb', line 23 def access_token ENV['IDBUS_ACCESS_TOKEN'] end |
.access_token_prefix ⇒ String
Default access token prefix
29 30 31 |
# File 'lib/idbus_api/default.rb', line 29 def access_token_prefix "Token" end |
.api_endpoint ⇒ String
Default API endpoint from ENV or API_ENDPOINT
35 36 37 |
# File 'lib/idbus_api/default.rb', line 35 def api_endpoint ENV['IDBUS_API_ENDPOINT'] || API_ENDPOINT end |
.api_version ⇒ String
Default API version from ENV or API_VERSION
41 42 43 |
# File 'lib/idbus_api/default.rb', line 41 def api_version ENV['IDBUS_API_VERSION'] || API_VERSION end |
.connection_options ⇒ Hash
47 48 49 50 51 52 53 |
# File 'lib/idbus_api/default.rb', line 47 def { :headers => { :user_agent => user_agent } } end |
.user_agent ⇒ String
Default User-Agent header string from ENV or USER_AGENT Default User-Agent header string from ENV or USER_AGENT
59 60 61 |
# File 'lib/idbus_api/default.rb', line 59 def user_agent ENV['IDBUS_USER_AGENT'] || USER_AGENT end |