Class: AgentAdmit::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/agentadmit/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_keyObject

Returns the value of attribute api_key.



10
11
12
# File 'lib/agentadmit/config.rb', line 10

def api_key
  @api_key
end

#api_urlObject

Returns the value of attribute api_url.



10
11
12
# File 'lib/agentadmit/config.rb', line 10

def api_url
  @api_url
end

#app_idObject

Returns the value of attribute app_id.



10
11
12
# File 'lib/agentadmit/config.rb', line 10

def app_id
  @app_id
end

#max_retriesObject

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_accessObject

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_connectionObject

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_urlObject

Returns the value of attribute verify_url.



10
11
12
# File 'lib/agentadmit/config.rb', line 10

def verify_url
  @verify_url
end