Class: Daytona::Config
- Inherits:
-
Object
- Object
- Daytona::Config
- Defined in:
- lib/daytona/config.rb
Constant Summary collapse
- API_URL =
'https://app.daytona.io/api'
Instance Attribute Summary collapse
-
#api_key ⇒ String?
API key for authentication with the Daytona API.
-
#api_url ⇒ String?
URL of the Daytona API.
-
#jwt_token ⇒ String?
JWT token for authentication with the Daytona API.
-
#organization_id ⇒ String?
Organization ID for authentication with the Daytona API.
-
#target ⇒ String?
Target environment for sandboxes.
Instance Method Summary collapse
-
#initialize(api_key: ENV.fetch('DAYTONA_API_KEY', nil), jwt_token: ENV.fetch('DAYTONA_JWT_TOKEN', nil), api_url: ENV.fetch('DAYTONA_API_URL', API_URL), organization_id: ENV.fetch('DAYTONA_ORGANIZATION_ID', nil), target: ENV.fetch('DAYTONA_TARGET', nil)) ⇒ Config
constructor
Initializes a new Daytona::Config object.
Constructor Details
#initialize(api_key: ENV.fetch('DAYTONA_API_KEY', nil), jwt_token: ENV.fetch('DAYTONA_JWT_TOKEN', nil), api_url: ENV.fetch('DAYTONA_API_URL', API_URL), organization_id: ENV.fetch('DAYTONA_ORGANIZATION_ID', nil), target: ENV.fetch('DAYTONA_TARGET', nil)) ⇒ Config
Initializes a new Daytona::Config object.
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/daytona/config.rb', line 39 def initialize( api_key: ENV.fetch('DAYTONA_API_KEY', nil), jwt_token: ENV.fetch('DAYTONA_JWT_TOKEN', nil), api_url: ENV.fetch('DAYTONA_API_URL', API_URL), organization_id: ENV.fetch('DAYTONA_ORGANIZATION_ID', nil), target: ENV.fetch('DAYTONA_TARGET', nil) ) @api_key = api_key @jwt_token = jwt_token @api_url = api_url @target = target @organization_id = organization_id end |
Instance Attribute Details
#api_key ⇒ String?
API key for authentication with the Daytona API
10 11 12 |
# File 'lib/daytona/config.rb', line 10 def api_key @api_key end |
#api_url ⇒ String?
URL of the Daytona API
20 21 22 |
# File 'lib/daytona/config.rb', line 20 def api_url @api_url end |
#jwt_token ⇒ String?
JWT token for authentication with the Daytona API
15 16 17 |
# File 'lib/daytona/config.rb', line 15 def jwt_token @jwt_token end |
#organization_id ⇒ String?
Organization ID for authentication with the Daytona API
25 26 27 |
# File 'lib/daytona/config.rb', line 25 def organization_id @organization_id end |
#target ⇒ String?
Target environment for sandboxes
30 31 32 |
# File 'lib/daytona/config.rb', line 30 def target @target end |