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?
Returns the API token necessary to gain access.
24 |
# File 'lib/lws/config.rb', line 24 property :api_token |
#api_token_middleware ⇒ Faraday::Middleware?
Returns the API token middleware that provides the API token to the request at runtime.
29 |
# File 'lib/lws/config.rb', line 29 property :api_token_middleware |
#caching_object ⇒ #read, #write
Returns an object that can cache request results.
33 |
# File 'lib/lws/config.rb', line 33 property :caching_object, default: nil |
#endpoints ⇒ Hash{Symbol=>String}
Returns a mapping of application endpoint overrides (default: {}).
38 |
# File 'lib/lws/config.rb', line 38 property :endpoints, default: {} |
#environment ⇒ Symbol
Returns the (default) API environment (default: :production).
43 |
# File 'lib/lws/config.rb', line 43 property :environment, default: :production |
#http_debug ⇒ Boolean
Returns whether to show HTTP debug messages (default: false).
47 |
# File 'lib/lws/config.rb', line 47 property :http_debug, default: false |
#http_debug_headers ⇒ Boolean
Returns whether to show HTTP headers in the debug messages (default: false).
52 |
# File 'lib/lws/config.rb', line 52 property :http_debug_headers, default: false |
#json_debug ⇒ Boolean
Returns whether to show JSON debug messages (default: false).
56 |
# File 'lib/lws/config.rb', line 56 property :json_debug, default: false |
#logger ⇒ #fatal, ...
Returns the logger object (Rails logger, Logger, etc.).
61 |
# File 'lib/lws/config.rb', line 61 property :logger |
#stubbing ⇒ String
Returns the path to a directory with stubbing fixtures (setting this enables the default stubs).
66 |
# File 'lib/lws/config.rb', line 66 property :stubbing |