Class: Deepgram::OnPrem::Client
- Inherits:
-
Management::Client
- Object
- Base
- Management::Client
- Deepgram::OnPrem::Client
- Defined in:
- lib/deepgram/on_prem.rb
Overview
The Client class within the OnPrem module extends the Management::Client class to handle operations specific to on-premise deployments within the Deepgram platform.
Instance Method Summary collapse
-
#create_credential(comments:, scopes:, provider:, project_id:) ⇒ Hash
Creates a new credential within a project with the specified details.
-
#credentials(project_id:) ⇒ Array
Retrieves a list of credentials for a given project.
-
#delete_credential(id, project_id:) ⇒ nil
Deletes a specific credential by its ID from a given project.
-
#get_credential(id, project_id:) ⇒ Hash
Retrieves a specific credential by its ID within a given project.
Methods inherited from Management::Client
#balance, #balances, #create_key, #delete_invite, #delete_key, #delete_project, #fields, #get_key, #get_project, #get_request, #initialize, #invites, #keys, #leave_project, #member_scopes, #members, #projects, #remove_member, #requests, #send_invite, #update_project, #update_scope, #usage
Methods inherited from Base
Methods included from ResponseHandler
Constructor Details
This class inherits a constructor from Deepgram::Management::Client
Instance Method Details
#create_credential(comments:, scopes:, provider:, project_id:) ⇒ Hash
Creates a new credential within a project with the specified details.
32 33 34 35 36 |
# File 'lib/deepgram/on_prem.rb', line 32 def create_credential(comments:, scopes:, provider:, project_id:) request(:post, "#{project_id}/onprem/distribution/credentials") do |request| request.body = JSON.generate(comments: comments, scopes: scopes, provider: provider) end end |
#credentials(project_id:) ⇒ Array
Retrieves a list of credentials for a given project.
12 13 14 |
# File 'lib/deepgram/on_prem.rb', line 12 def credentials(project_id:) request(:get, "#{project_id}/onprem/distribution/credentials") end |
#delete_credential(id, project_id:) ⇒ nil
Deletes a specific credential by its ID from a given project.
43 44 45 |
# File 'lib/deepgram/on_prem.rb', line 43 def delete_credential(id, project_id:) request(:delete, "#{project_id}/onprem/distribution/credentials/#{id}") end |
#get_credential(id, project_id:) ⇒ Hash
Retrieves a specific credential by its ID within a given project.
21 22 23 |
# File 'lib/deepgram/on_prem.rb', line 21 def get_credential(id, project_id:) request(:get, "#{project_id}/onprem/distribution/credentials/#{id}") end |