Class: ZoomUs::ChatMessages
- Inherits:
-
Object
- Object
- ZoomUs::ChatMessages
- Defined in:
- lib/zoom_us/chat_messages.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_chat_message(message_id, opts = {}) ⇒ Object
Delete a Message Delete a chat message that you previously sent to a contact or a channel.
-
#delete_chat_message_with_http_info(message_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Delete a Message Delete a chat message that you previously sent to a contact or a channel.
-
#edit_message(message_id, opts = {}) ⇒ nil
Update a Message Each chat message has a unique identifier.
-
#edit_message_with_http_info(message_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a Message Each chat message has a unique identifier.
-
#get_chat_messages(user_id, opts = {}) ⇒ InlineResponse2006
List User’s Chat Messages A Zoom user can have conversations with other Zoom users via chat.
-
#get_chat_messages_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse2006, Fixnum, Hash)>
List User's Chat Messages A Zoom user can have conversations with other Zoom users via chat.
-
#initialize(api_client = ApiClient.default) ⇒ ChatMessages
constructor
A new instance of ChatMessages.
-
#senda_chat_message(opts = {}) ⇒ InlineResponse2011
Send a Chat Message Send chat messages on Zoom to either an individual user who is in your contact list or to a [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) of which you are a member.
-
#senda_chat_message_with_http_info(opts = {}) ⇒ Array<(InlineResponse2011, Fixnum, Hash)>
Send a Chat Message Send chat messages on Zoom to either an individual user who is in your contact list or to a [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) of which you are a member.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ChatMessages
Returns a new instance of ChatMessages.
19 20 21 |
# File 'lib/zoom_us/chat_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/chat_messages.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_chat_message(message_id, opts = {}) ⇒ Object
Delete a Message Delete a chat message that you previously sent to a contact or a channel. In the query parameter, you must provide either of the following:
* ‘to_contact`: The email address of the contact to whom you sent the message. Use this parameter to delete a message sent to an individual contact in Zoom. * `to_channel`: The channel ID of the channel where you sent the message. Use this parameter to delete a message sent to a channel in Zoom. <p style="background-color:#e1f5fe;color:#01579b;padding:8px"> Note: This API only supports user-managed <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p>
Scope: `chat_message:write`
29 30 31 32 |
# File 'lib/zoom_us/chat_messages.rb', line 29 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#delete_chat_message_with_http_info(message_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Delete a Message Delete a chat message that you previously sent to a contact or a channel. In the query parameter, you must provide either of the following:<br> * `to_contact`: The email address of the contact to whom you sent the message. Use this parameter to delete a message sent to an individual contact in Zoom. * `to_channel`: The channel ID of the channel where you sent the message. Use this parameter to delete a message sent to a channel in Zoom. <p style="background-color:#e1f5fe;color:#01579b;padding:8px"> <b>Note: </b>This API only supports <b>user-managed</b> <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p><br> Scope: `chat_message:write`<br>
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 78 79 80 81 |
# File 'lib/zoom_us/chat_messages.rb', line 41 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatMessagesApi.delete_chat_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 ChatMessagesApi.delete_chat_message" end # resource path local_var_path = '/chat/users/me/messages/{messageId}'.sub('{' + 'messageId' + '}', .to_s) # query parameters query_params = {} query_params[:'to_contact'] = opts[:'to_contact'] if !opts[:'to_contact'].nil? query_params[:'to_channel'] = opts[:'to_channel'] if !opts[:'to_channel'].nil? # 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']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['OAuth'] 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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatMessagesApi#delete_chat_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_message(message_id, opts = {}) ⇒ nil
Update a Message Each chat message has a unique identifier. Use this API to edit a chat message that you previously sent to either a contact or a channel in Zoom by providing the ID of the message as the value of the ‘messageId` parameter. The ID can be retrieved from List User’s Chat Messages API. Additionally, as a query parameter, you must provide either the **email address** of the contact or the **Channel ID** of the channel where the message was sent. <p style="background-color:#e1f5fe; color:#01579b; padding:8px"> Note: This API only supports user-managed <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p>
Scope: ‘chat_message:write`
88 89 90 91 |
# File 'lib/zoom_us/chat_messages.rb', line 88 def (, opts = {}) (, opts) nil end |
#edit_message_with_http_info(message_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a Message Each chat message has a unique identifier. Use this API to edit a chat message that you previously sent to either a contact or a channel in Zoom by providing the ID of the message as the value of the `messageId` parameter. The ID can be retrieved from List User's Chat Messages API. Additionally, as a query parameter, you must provide either the **email address** of the contact or the **Channel ID** of the channel where the message was sent. <p style="background-color:#e1f5fe; color:#01579b; padding:8px"> <b>Note: </b> This API only supports <b>user-managed</b> <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p><br> Scope: `chat_message:write` <br>
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 134 135 136 |
# File 'lib/zoom_us/chat_messages.rb', line 99 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatMessagesApi.edit_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 ChatMessagesApi.edit_message" end # resource path local_var_path = '/chat/users/me/messages/{messageId}'.sub('{' + 'messageId' + '}', .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 = ['OAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatMessagesApi#edit_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_chat_messages(user_id, opts = {}) ⇒ InlineResponse2006
List User’s Chat Messages A Zoom user can have conversations with other Zoom users via chat. Use this API to list the current user’s chat messages between the user and an individual contact or a chat channel.
In the query parameter, you must provide either of the following:
* ‘to_contact`: The email address of the contact with whom the user conversed by sending/receiving messages. * `to_channel`: The channel ID of the channel to/from which the user has sent and/or received messages.
**Specify a date** in the `date` query parameter to view messages from that date. If a date is not provided, the default value for the query will be the **current date**.
<p style="background-color:#e1f5fe; color:#01579b; padding:8px">Note: This API only supports user-managed <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p>
Scopes: `chat_message:read`
147 148 149 150 |
# File 'lib/zoom_us/chat_messages.rb', line 147 def (user_id, opts = {}) data, _status_code, _headers = (user_id, opts) data end |
#get_chat_messages_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse2006, Fixnum, Hash)>
List User's Chat Messages A Zoom user can have conversations with other Zoom users via chat. Use this API to list the current user's chat messages between the user and an individual contact or a chat channel.<br> In the query parameter, you must provide either of the following:<br> * `to_contact`: The email address of the contact with whom the user conversed by sending/receiving messages. * `to_channel`: The channel ID of the channel to/from which the user has sent and/or received messages. <br> **Specify a date** in the `date` query parameter to view messages from that date. If a date is not provided, the default value for the query will be the **current date**.<br> <p style="background-color:#e1f5fe; color:#01579b; padding:8px"><b>Note: </b>This API only supports <b>user-managed</b> <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p><br> <br>Scopes: `chat_message:read`<br>
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/zoom_us/chat_messages.rb', line 162 def (user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatMessagesApi.get_chat_messages ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling ChatMessagesApi.get_chat_messages" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ChatMessagesApi.get_chat_messages, must be smaller than or equal to 50.' end # resource path local_var_path = '/chat/users/{userId}/messages'.sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'to_contact'] = opts[:'to_contact'] if !opts[:'to_contact'].nil? query_params[:'to_channel'] = opts[:'to_channel'] if !opts[:'to_channel'].nil? query_params[:'date '] = opts[:'date_'] if !opts[:'date_'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil? # 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 = nil auth_names = ['OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2006') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatMessagesApi#get_chat_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#senda_chat_message(opts = {}) ⇒ InlineResponse2011
Send a Chat Message Send chat messages on Zoom to either an individual user who is in your contact list or to a [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) of which you are a member. To send a message to a contact, provide the contact’s email address in the ‘to_contact` field. Similary, to send a message to a channel, provide the Channel Id of the Channel in `to_channel` field.
Scopes: `chat_message:write`
<p style="background-color:#e1f5fe; color:#01579b; padding:8px"> Note: This API only supports user-managed <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p>
215 216 217 218 |
# File 'lib/zoom_us/chat_messages.rb', line 215 def (opts = {}) data, _status_code, _headers = (opts) data end |
#senda_chat_message_with_http_info(opts = {}) ⇒ Array<(InlineResponse2011, Fixnum, Hash)>
Send a Chat Message Send chat messages on Zoom to either an individual user who is in your contact list or to a [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) of which you are a member. To send a message to a contact, provide the contact's email address in the `to_contact` field. Similary, to send a message to a channel, provide the Channel Id of the Channel in `to_channel` field.<br> <br>Scopes: `chat_message:write`<br> <br> <p style="background-color:#e1f5fe; color:#01579b; padding:8px"> <b>Note: </b>This API only supports <b>user-managed</b> <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p><br>
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/zoom_us/chat_messages.rb', line 225 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChatMessagesApi.senda_chat_message ...' end # resource path local_var_path = '/chat/users/me/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 = ['OAuth'] 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, :return_type => 'InlineResponse2011') if @api_client.config.debugging @api_client.config.logger.debug "API called: ChatMessagesApi#senda_chat_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |