Class: ZoomUs::ChatbotMessages
- Inherits:
-
Object
- Object
- ZoomUs::ChatbotMessages
- Defined in:
- lib/zoom_us/chatbot_messages.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_a_chatbot_message(message_id, opts = {}) ⇒ InlineResponse20058
Delete a Chatbot Message Delete a message that was sent by your chatbot app.
-
#delete_a_chatbot_message_with_http_info(message_id, opts = {}) ⇒ Array<(InlineResponse20058, Fixnum, Hash)>
Delete a Chatbot Message Delete a message that was sent by your chatbot app.
-
#edit_chatbot_message(message_id, opts = {}) ⇒ InlineResponse20057
Edit a Chatbot Message Edit a message that was [sent](marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot) by your Chatbot app.
After sending a message using the Send Chatbot Message API, you must store the messageId returned in the response so that you can make edits to the associated message using this API. -
#edit_chatbot_message_with_http_info(message_id, opts = {}) ⇒ Array<(InlineResponse20057, Fixnum, Hash)>
Edit a Chatbot Message Edit a message that was [sent](marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot) by your Chatbot app.<br> After sending a message using the Send Chatbot Message API, you must store the messageId returned in the response so that you can make edits to the associated message using this API.
-
#initialize(api_client = ApiClient.default) ⇒ ChatbotMessages
constructor
A new instance of ChatbotMessages.
-
#sendchatbot(opts = {}) ⇒ nil
Send Chatbot Messages Send chatbot messages from your marketplace chatbot app.
Scopes: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`. -
#sendchatbot_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Send Chatbot Messages Send chatbot messages from your marketplace chatbot app.<br><br> Scopes: `imchat:bot`<br> **Authorization Flow**: Client Credentials Flow<br><br> To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ChatbotMessages
19 20 21 |
# File 'lib/zoom_us/chatbot_messages.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zoom_us/chatbot_messages.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_a_chatbot_message(message_id, opts = {}) ⇒ InlineResponse20058
Delete a Chatbot Message Delete a message that was sent by your chatbot app. Scopes: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`
Next, use the token received (access_token) as a bearer token while making the DELETE /im/chat/messages/message_id request to delete a message.
Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.
28 29 30 31 |
# File 'lib/zoom_us/chatbot_messages.rb', line 28 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#delete_a_chatbot_message_with_http_info(message_id, opts = {}) ⇒ Array<(InlineResponse20058, Fixnum, Hash)>
Delete a Chatbot Message Delete a message that was sent by your chatbot app. Scopes: `imchat:bot`<br> **Authorization Flow**: Client Credentials Flow<br><br> To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`. <br>Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`<br><br> Next, use the token received (access_token) as a bearer token while making the DELETE /im/chat/messages/message_id request to delete a message.<br><br> Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/zoom_us/chatbot_messages.rb', line 39 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatbotMessagesApi.delete_a_chatbot_message ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatbotMessagesApi.delete_a_chatbot_message" end # resource path local_var_path = '/im/chat/messages/{message_id}'.sub('{' + 'message_id' + '}', .to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['Client Credentials'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20058') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatbotMessagesApi#delete_a_chatbot_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_chatbot_message(message_id, opts = {}) ⇒ InlineResponse20057
Edit a Chatbot Message Edit a message that was [sent](marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot) by your Chatbot app.
After sending a message using the Send Chatbot Message API, you must store the messageId returned in the response so that you can make edits to the associated message using this API. Scope: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`
Next, use the token received (access_token) as a bearer token while making the PUT /im/chat/messages/message_id request to edit a chatbot message.
Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.
84 85 86 87 |
# File 'lib/zoom_us/chatbot_messages.rb', line 84 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#edit_chatbot_message_with_http_info(message_id, opts = {}) ⇒ Array<(InlineResponse20057, Fixnum, Hash)>
Edit a Chatbot Message Edit a message that was [sent](marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot) by your Chatbot app.<br> After sending a message using the Send Chatbot Message API, you must store the messageId returned in the response so that you can make edits to the associated message using this API. Scope: `imchat:bot`<br><br> **Authorization Flow**: Client Credentials Flow<br><br> To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`. <br>Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`<br><br> Next, use the token received (access_token) as a bearer token while making the PUT /im/chat/messages/message_id request to edit a chatbot message.<br><br> Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/zoom_us/chatbot_messages.rb', line 95 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatbotMessagesApi.edit_chatbot_message ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatbotMessagesApi.edit_chatbot_message" end # resource path local_var_path = '/im/chat/messages/{message_id}'.sub('{' + 'message_id' + '}', .to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['Client Credentials'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20057') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatbotMessagesApi#edit_chatbot_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sendchatbot(opts = {}) ⇒ nil
Send Chatbot Messages Send chatbot messages from your marketplace chatbot app.
Scopes: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`
Next, use the token recieved (access_token) as a bearer token while making the POST /im/chat/messages request to send chatbot messages.
Learn more about how to authorize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.
139 140 141 142 |
# File 'lib/zoom_us/chatbot_messages.rb', line 139 def sendchatbot(opts = {}) sendchatbot_with_http_info(opts) nil end |
#sendchatbot_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Send Chatbot Messages Send chatbot messages from your marketplace chatbot app.<br><br> Scopes: `imchat:bot`<br> **Authorization Flow**: Client Credentials Flow<br><br> To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`. <br>Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`<br><br> Next, use the token recieved (access_token) as a bearer token while making the POST /im/chat/messages request to send chatbot messages.<br><br> Learn more about how to authorize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/zoom_us/chatbot_messages.rb', line 149 def sendchatbot_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatbotMessagesApi.sendchatbot ...' end # resource path local_var_path = '/im/chat/messages' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['Client Credentials'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatbotMessagesApi#sendchatbot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |