Class: ElevenlabsClient::Endpoints::AgentsPlatform::Secrets
- Inherits:
-
Object
- Object
- ElevenlabsClient::Endpoints::AgentsPlatform::Secrets
- Defined in:
- lib/elevenlabs_client/endpoints/agents_platform/secrets.rb
Instance Method Summary collapse
-
#create(name:, value:, type: "new") ⇒ Hash
POST /v1/convai/secrets Create a new secret in ElevenLabs Documentation: https://elevenlabs.io/docs/api-reference/convai/secrets/create.
-
#delete(secret_id) ⇒ Hash
DELETE /v1/convai/secrets/secret_id Delete a secret from ElevenLabs Documentation: https://elevenlabs.io/docs/api-reference/convai/secrets/delete.
-
#initialize(client) ⇒ Secrets
constructor
A new instance of Secrets.
-
#list ⇒ Hash
GET /v1/convai/secrets List all secrets from ElevenLabs Documentation: https://elevenlabs.io/docs/api-reference/convai/secrets/list.
Constructor Details
#initialize(client) ⇒ Secrets
Returns a new instance of Secrets.
7 8 9 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/secrets.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#create(name:, value:, type: "new") ⇒ Hash
POST /v1/convai/secrets Create a new secret in ElevenLabs Documentation: https://elevenlabs.io/docs/api-reference/convai/secrets/create
29 30 31 32 33 34 35 36 37 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/secrets.rb', line 29 def create(name:, value:, type: "new") endpoint = "/v1/convai/secrets" request_body = { type: type, name: name, value: value } @client.post(endpoint, request_body) end |
#delete(secret_id) ⇒ Hash
DELETE /v1/convai/secrets/secret_id Delete a secret from ElevenLabs Documentation: https://elevenlabs.io/docs/api-reference/convai/secrets/delete
45 46 47 48 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/secrets.rb', line 45 def delete(secret_id) endpoint = "/v1/convai/secrets/#{secret_id}" @client.delete(endpoint) end |
#list ⇒ Hash
GET /v1/convai/secrets List all secrets from ElevenLabs Documentation: https://elevenlabs.io/docs/api-reference/convai/secrets/list
16 17 18 19 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/secrets.rb', line 16 def list endpoint = "/v1/convai/secrets" @client.get(endpoint) end |