Class: LWS::Config
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- LWS::Config
- Defined in:
- lib/lws/config.rb
Overview
Either the API token or API token middleware needs to be configured for the library to work properly!
The LWS API configuration class
This class represents the configuration that is used for connecting to LWS.
Instance Attribute Summary collapse
-
#api_token ⇒ String?
The API token necessary to gain access.
-
#api_token_middleware ⇒ Faraday::Middleware?
The API token middleware that provides the API token to the request at runtime.
-
#caching_object ⇒ #read, #write
An object that can cache request results.
-
#endpoints ⇒ Hash{Symbol=>String}
A mapping of application endpoint overrides (default: {}).
-
#environment ⇒ Symbol
The (default) API environment (default:
:production
). -
#http_debug ⇒ Boolean
Whether to show HTTP debug messages (default:
false
). -
#http_debug_headers ⇒ Boolean
Whether to show HTTP headers in the debug messages (default:
false
). -
#json_debug ⇒ Boolean
Whether to show JSON debug messages (default:
false
). -
#logger ⇒ #fatal, ...
The logger object (Rails logger, Logger, etc.).
-
#stubbing ⇒ String
The path to a directory with stubbing fixtures (setting this enables the default stubs).
Instance Attribute Details
#api_token ⇒ String?
24 |
# File 'lib/lws/config.rb', line 24 property :api_token |
#api_token_middleware ⇒ Faraday::Middleware?
29 |
# File 'lib/lws/config.rb', line 29 property :api_token_middleware |
#caching_object ⇒ #read, #write
33 |
# File 'lib/lws/config.rb', line 33 property :caching_object, default: nil |
#endpoints ⇒ Hash{Symbol=>String}
38 |
# File 'lib/lws/config.rb', line 38 property :endpoints, default: {} |
#environment ⇒ Symbol
43 |
# File 'lib/lws/config.rb', line 43 property :environment, default: :production |
#http_debug ⇒ Boolean
47 |
# File 'lib/lws/config.rb', line 47 property :http_debug, default: false |
#http_debug_headers ⇒ Boolean
52 |
# File 'lib/lws/config.rb', line 52 property :http_debug_headers, default: false |
#json_debug ⇒ Boolean
56 |
# File 'lib/lws/config.rb', line 56 property :json_debug, default: false |
#logger ⇒ #fatal, ...
61 |
# File 'lib/lws/config.rb', line 61 property :logger |
#stubbing ⇒ String
66 |
# File 'lib/lws/config.rb', line 66 property :stubbing |