Class: Operto::Config
- Inherits:
-
Object
- Object
- Operto::Config
- Defined in:
- lib/operto/config.rb,
sig/operto.rbs
Overview
Injected by the host app (see the Operto.configure initializer): the API credentials, a cache, and a token store. Keeping these out of the gem is what makes it host-agnostic.
Instance Attribute Summary collapse
-
#base_url ⇒ ::String
Returns the value of attribute base_url.
-
#client_id ⇒ ::String?
Returns the value of attribute client_id.
-
#secret ⇒ ::String?
Returns the value of attribute secret.
-
#token_store ⇒ Object
Duck-typed: the host may inject its own store (see MemoryTokenStore).
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 |
# File 'lib/operto/config.rb', line 8 def initialize @base_url = 'https://teams-api.operto.com/api/v1/'.freeze @token_store = MemoryTokenStore.new end |
Instance Attribute Details
#base_url ⇒ ::String
Returns the value of attribute base_url.
6 7 8 |
# File 'lib/operto/config.rb', line 6 def base_url @base_url end |
#client_id ⇒ ::String?
Returns the value of attribute client_id.
6 7 8 |
# File 'lib/operto/config.rb', line 6 def client_id @client_id end |
#secret ⇒ ::String?
Returns the value of attribute secret.
6 7 8 |
# File 'lib/operto/config.rb', line 6 def secret @secret end |
#token_store ⇒ Object
Duck-typed: the host may inject its own store (see MemoryTokenStore).
22 23 24 |
# File 'sig/operto.rbs', line 22 def token_store @token_store end |