Module: AmadeusDiscover::Config
- Defined in:
- lib/amadeus_discover/config.rb
Overview
Global configuration for Clients.
Constant Summary collapse
- @@credentials =
Credentials to be used by default to authenticate client requests.
Must be a Hash with valid credentials, client ID and grant type. Ex:
{ username: '{username}', password: '{password}', client_id: 'content-partner-api', grant_type: 'password' }
{}
- @@connection =
A Faraday::Connection to be used by default to query the API.
Will be reconfigured on client’s initialization to use the correct request and response middlewares, depending on the queried endpoint. Use this to specify API host you want to query, a Faraday adapter, or logger or instrumentation middleware to integrate Amadeus Discover in your application.
nil
Class Method Summary collapse
- .connection ⇒ Object
- .connection=(connection) ⇒ Object
- .credentials ⇒ Object
- .credentials=(credentials) ⇒ Object
Class Method Details
.connection ⇒ Object
39 40 41 |
# File 'lib/amadeus_discover/config.rb', line 39 def connection @@connection end |
.connection=(connection) ⇒ Object
43 44 45 |
# File 'lib/amadeus_discover/config.rb', line 43 def connection=(connection) @@connection = connection end |
.credentials ⇒ Object
31 32 33 |
# File 'lib/amadeus_discover/config.rb', line 31 def credentials @@credentials end |
.credentials=(credentials) ⇒ Object
35 36 37 |
# File 'lib/amadeus_discover/config.rb', line 35 def credentials=(credentials) @@credentials = credentials end |