Class: AgentAdmit::Config
- Inherits:
-
Object
- Object
- AgentAdmit::Config
- Defined in:
- lib/agentadmit/config.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#token_prefix_access ⇒ Object
Returns the value of attribute token_prefix_access.
-
#token_prefix_connection ⇒ Object
Returns the value of attribute token_prefix_connection.
-
#verify_url ⇒ Object
Returns the value of attribute verify_url.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/agentadmit/config.rb', line 14 def initialize @app_id = ENV.fetch("AGENTADMIT_APP_ID", "") @api_key = ENV.fetch("AGENTADMIT_API_KEY", "") @verify_url = ENV.fetch("AGENTADMIT_VERIFY_URL", "https://api.agentadmit.com/v1/verify") @api_url = ENV.fetch("AGENTADMIT_API_URL", "https://api.agentadmit.com") @token_prefix_access = "ag_at_" @token_prefix_connection = "ag_ct_" # Max retries on HTTP 429 before raising RateLimitError. Default: 3. @max_retries = ENV.fetch("AGENTADMIT_MAX_RETRIES", "3").to_i end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def api_key @api_key end |
#api_url ⇒ Object
Returns the value of attribute api_url.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def api_url @api_url end |
#app_id ⇒ Object
Returns the value of attribute app_id.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def app_id @app_id end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def max_retries @max_retries end |
#token_prefix_access ⇒ Object
Returns the value of attribute token_prefix_access.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def token_prefix_access @token_prefix_access end |
#token_prefix_connection ⇒ Object
Returns the value of attribute token_prefix_connection.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def token_prefix_connection @token_prefix_connection end |
#verify_url ⇒ Object
Returns the value of attribute verify_url.
10 11 12 |
# File 'lib/agentadmit/config.rb', line 10 def verify_url @verify_url end |