Class: ElevenlabsClient::Endpoints::AgentsPlatform::Workspace
- Inherits:
-
Object
- Object
- ElevenlabsClient::Endpoints::AgentsPlatform::Workspace
- Defined in:
- lib/elevenlabs_client/endpoints/agents_platform/workspace.rb
Instance Method Summary collapse
-
#create_secret(name:, value:, type: "new") ⇒ Hash
POST /v1/convai/secrets Create a new secret for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/create-secret.
-
#delete_secret(secret_id) ⇒ Hash
DELETE /v1/convai/secrets/:secret_id Delete a workspace secret if it's not in use Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/delete-secret.
-
#get_dashboard_settings ⇒ Hash
(also: #dashboard_settings)
GET /v1/convai/settings/dashboard Retrieve Convai dashboard settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/get-dashboard-settings.
-
#get_secrets ⇒ Hash
(also: #secrets)
GET /v1/convai/secrets Get all workspace secrets for the user Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/get-secrets.
-
#get_settings ⇒ Hash
(also: #settings)
GET /v1/convai/settings Retrieve Convai settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/get-settings.
-
#initialize(client) ⇒ Workspace
constructor
A new instance of Workspace.
-
#update_dashboard_settings(charts: nil) ⇒ Hash
PATCH /v1/convai/settings/dashboard Update Convai dashboard settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/update-dashboard-settings.
-
#update_secret(secret_id, name:, value:, type: "update") ⇒ Hash
PATCH /v1/convai/secrets/:secret_id Update an existing secret for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/update-secret.
-
#update_settings(**options) ⇒ Hash
PATCH /v1/convai/settings Update Convai settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/update-settings.
Constructor Details
#initialize(client) ⇒ Workspace
Returns a new instance of Workspace.
7 8 9 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#create_secret(name:, value:, type: "new") ⇒ Hash
POST /v1/convai/secrets Create a new secret for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/create-secret
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 53 def create_secret(name:, value:, type: "new") raise ArgumentError, "name is required" if name.nil? || name.to_s.strip.empty? raise ArgumentError, "value is required" if value.nil? || value.to_s.strip.empty? body = { type: type, name: name, value: value } @client.post("/v1/convai/secrets", body) end |
#delete_secret(secret_id) ⇒ Hash
DELETE /v1/convai/secrets/:secret_id Delete a workspace secret if it's not in use Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/delete-secret
95 96 97 98 99 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 95 def delete_secret(secret_id) raise ArgumentError, "secret_id is required" if secret_id.nil? || secret_id.to_s.strip.empty? @client.delete("/v1/convai/secrets/#{secret_id}") end |
#get_dashboard_settings ⇒ Hash Also known as: dashboard_settings
GET /v1/convai/settings/dashboard Retrieve Convai dashboard settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/get-dashboard-settings
106 107 108 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 106 def get_dashboard_settings @client.get("/v1/convai/settings/dashboard") end |
#get_secrets ⇒ Hash Also known as: secrets
GET /v1/convai/secrets Get all workspace secrets for the user Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/get-secrets
41 42 43 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 41 def get_secrets @client.get("/v1/convai/secrets") end |
#get_settings ⇒ Hash Also known as: settings
GET /v1/convai/settings Retrieve Convai settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/get-settings
16 17 18 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 16 def get_settings @client.get("/v1/convai/settings") end |
#update_dashboard_settings(charts: nil) ⇒ Hash
PATCH /v1/convai/settings/dashboard Update Convai dashboard settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/update-dashboard-settings
116 117 118 119 120 121 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 116 def update_dashboard_settings(charts: nil) body = {} body[:charts] = charts if charts @client.patch("/v1/convai/settings/dashboard", body) end |
#update_secret(secret_id, name:, value:, type: "update") ⇒ Hash
PATCH /v1/convai/secrets/:secret_id Update an existing secret for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/update-secret
75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 75 def update_secret(secret_id, name:, value:, type: "update") raise ArgumentError, "secret_id is required" if secret_id.nil? || secret_id.to_s.strip.empty? raise ArgumentError, "name is required" if name.nil? || name.to_s.strip.empty? raise ArgumentError, "value is required" if value.nil? || value.to_s.strip.empty? body = { type: type, name: name, value: value } @client.patch("/v1/convai/secrets/#{secret_id}", body) end |
#update_settings(**options) ⇒ Hash
PATCH /v1/convai/settings Update Convai settings for the workspace Documentation: https://elevenlabs.io/docs/api-reference/conversational-ai/workspace/update-settings
31 32 33 34 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/workspace.rb', line 31 def update_settings(**) body = .compact @client.patch("/v1/convai/settings", body) end |