Module: BWStatusBoardAPI::Default
- Defined in:
- lib/bw_status_board_api/default.rb
Overview
Default module
Constant Summary collapse
- ADAPTER =
Faraday.default_adapter
- API_ENDPOINT =
'http://argus:3000/api/'- USER_AGENT =
"BWStatusBoardAPI Ruby Gem #{BWStatusBoardAPI::VERSION}".freeze
Class Method Summary collapse
- .adapter ⇒ Object
- .api_endpoint ⇒ Object
- .connection_options ⇒ Object
- .debug ⇒ Object
- .logger ⇒ Object
- .options ⇒ Object
- .performance ⇒ Object
- .user_agent ⇒ Object
- .verify_ssl ⇒ Object
Class Method Details
.adapter ⇒ Object
21 22 23 |
# File 'lib/bw_status_board_api/default.rb', line 21 def adapter ENV['BWStatusBoardAPI_ADAPTER'] || ADAPTER end |
.api_endpoint ⇒ Object
25 26 27 |
# File 'lib/bw_status_board_api/default.rb', line 25 def api_endpoint ENV['BWStatusBoardAPI_API_ENDPOINT'] || API_ENDPOINT end |
.connection_options ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/bw_status_board_api/default.rb', line 29 def { headers: { user_agent: user_agent }, request: { params_encoder: Faraday::FlatParamsEncoder } } end |
.debug ⇒ Object
40 41 42 |
# File 'lib/bw_status_board_api/default.rb', line 40 def debug ENV['BWStatusBoardAPI_DEBUG'] || false end |
.logger ⇒ Object
44 45 46 |
# File 'lib/bw_status_board_api/default.rb', line 44 def logger nil end |
.options ⇒ Object
17 18 19 |
# File 'lib/bw_status_board_api/default.rb', line 17 def Hash[BWStatusBoardAPI::Configuration.keys.map { |key| [key, send(key)] }] end |
.performance ⇒ Object
48 49 50 |
# File 'lib/bw_status_board_api/default.rb', line 48 def performance Allotment.results end |
.user_agent ⇒ Object
52 53 54 |
# File 'lib/bw_status_board_api/default.rb', line 52 def user_agent ENV['BWStatusBoardAPI_USER_AGENT'] || USER_AGENT end |
.verify_ssl ⇒ Object
56 57 58 |
# File 'lib/bw_status_board_api/default.rb', line 56 def verify_ssl ENV['BWStatusBoardAPI_VERIFY_SSL'] || false end |