Class: VoiceML::AssistantsV1AssistantKnowledgeScope
- Inherits:
-
Object
- Object
- VoiceML::AssistantsV1AssistantKnowledgeScope
- Defined in:
- lib/voiceml/resources/assistants_v1.rb
Overview
/v1/Assistants/id/Knowledge — list attached + attach/detach single Knowledge.
Instance Method Summary collapse
-
#attach(knowledge_id) ⇒ Object
POST /v1/Assistants/id/Knowledge/knowledgeId — 204 No Content on success.
-
#detach(knowledge_id) ⇒ Object
DELETE /v1/Assistants/id/Knowledge/knowledgeId — 204 No Content on success.
-
#initialize(transport, assistant_id) ⇒ AssistantsV1AssistantKnowledgeScope
constructor
A new instance of AssistantsV1AssistantKnowledgeScope.
- #list(page_size: nil) ⇒ Object
Constructor Details
#initialize(transport, assistant_id) ⇒ AssistantsV1AssistantKnowledgeScope
Returns a new instance of AssistantsV1AssistantKnowledgeScope.
181 182 183 184 |
# File 'lib/voiceml/resources/assistants_v1.rb', line 181 def initialize(transport, assistant_id) @transport = transport @assistant_id = assistant_id end |
Instance Method Details
#attach(knowledge_id) ⇒ Object
POST /v1/Assistants/id/Knowledge/knowledgeId — 204 No Content on success.
195 196 197 198 |
# File 'lib/voiceml/resources/assistants_v1.rb', line 195 def attach(knowledge_id) @transport.request(:post, "/v1/Assistants/#{@assistant_id}/Knowledge/#{knowledge_id}") nil end |
#detach(knowledge_id) ⇒ Object
DELETE /v1/Assistants/id/Knowledge/knowledgeId — 204 No Content on success.
201 202 203 204 |
# File 'lib/voiceml/resources/assistants_v1.rb', line 201 def detach(knowledge_id) @transport.request(:delete, "/v1/Assistants/#{@assistant_id}/Knowledge/#{knowledge_id}") nil end |
#list(page_size: nil) ⇒ Object
186 187 188 189 190 191 192 |
# File 'lib/voiceml/resources/assistants_v1.rb', line 186 def list(page_size: nil) params = {} params['PageSize'] = page_size unless page_size.nil? AssistantsV1KnowledgeList.new( @transport.request(:get, "/v1/Assistants/#{@assistant_id}/Knowledge", params: params) ) end |