Class: ZoomUs::IMChat
- Inherits:
-
Object
- Object
- ZoomUs::IMChat
- Defined in:
- lib/zoom_us/im_chat.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#im_chat_messages(session_id, from, to, opts = {}) ⇒ InlineResponse20021
Retrieve IM Chat Messages Retrieve IM chat messages for a specified period of time.
-
#im_chat_messages_with_http_info(session_id, from, to, opts = {}) ⇒ Array<(InlineResponse20021, Fixnum, Hash)>
Retrieve IM Chat Messages Retrieve IM chat messages for a specified period of time.
-
#im_chat_sessions(from, to, opts = {}) ⇒ InlineResponse20020
Get IM Chat Sessions Retrieve IM Chat sessions for a specified period of time.
-
#im_chat_sessions_with_http_info(from, to, opts = {}) ⇒ Array<(InlineResponse20020, Fixnum, Hash)>
Get IM Chat Sessions Retrieve IM Chat sessions for a specified period of time.
-
#initialize(api_client = ApiClient.default) ⇒ IMChat
constructor
A new instance of IMChat.
-
#listimmessages(user_id, opts = {}) ⇒ InlineResponse20060
Get User’s IM Messages Get IM Chat messages for a specified period of time.
-
#listimmessages_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20060, Fixnum, Hash)>
Get User’s IM Messages Get IM Chat messages for a specified period of time.
-
#sendimmessages(opts = {}) ⇒ InlineResponse20122
Send IM messages Send chat message to a user.
-
#sendimmessages_with_http_info(opts = {}) ⇒ Array<(InlineResponse20122, Fixnum, Hash)>
Send IM messages Send chat message to a user.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zoom_us/im_chat.rb', line 17 def api_client @api_client end |
Instance Method Details
#im_chat_messages(session_id, from, to, opts = {}) ⇒ InlineResponse20021
Retrieve IM Chat Messages Retrieve IM chat messages for a specified period of time. <aside>Note: This API only supports oauth2.</aside>
Scopes: ‘imchat:read`
<p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p>
31 32 33 34 |
# File 'lib/zoom_us/im_chat.rb', line 31 def (session_id, from, to, opts = {}) data, _status_code, _headers = (session_id, from, to, opts) data end |
#im_chat_messages_with_http_info(session_id, from, to, opts = {}) ⇒ Array<(InlineResponse20021, Fixnum, Hash)>
Retrieve IM Chat Messages Retrieve IM chat messages for a specified period of time. <aside>Note: This API only supports oauth2.</aside><br><br> Scopes: `imchat:read`<br> <br> <p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p><br>
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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/zoom_us/im_chat.rb', line 45 def (session_id, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IMChatApi.im_chat_messages ...' end # verify the required parameter 'session_id' is set if @api_client.config.client_side_validation && session_id.nil? fail ArgumentError, "Missing the required parameter 'session_id' when calling IMChatApi.im_chat_messages" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling IMChatApi.im_chat_messages" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling IMChatApi.im_chat_messages" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IMChatApi.im_chat_messages, must be smaller than or equal to 300.' end # resource path local_var_path = '/im/chat/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', session_id.to_s) # query parameters query_params = {} query_params[:'from'] = from query_params[:'to'] = to 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 => 'InlineResponse20021') if @api_client.config.debugging @api_client.config.logger.debug "API called: IMChatApi#im_chat_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#im_chat_sessions(from, to, opts = {}) ⇒ InlineResponse20020
Get IM Chat Sessions Retrieve IM Chat sessions for a specified period of time. <aside>Note: This API only supports Oauth2.</aside>
<p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p>
Scopes: ‘imchat:read, imchat:read:admin`
108 109 110 111 |
# File 'lib/zoom_us/im_chat.rb', line 108 def im_chat_sessions(from, to, opts = {}) data, _status_code, _headers = im_chat_sessions_with_http_info(from, to, opts) data end |
#im_chat_sessions_with_http_info(from, to, opts = {}) ⇒ Array<(InlineResponse20020, Fixnum, Hash)>
Get IM Chat Sessions Retrieve IM Chat sessions for a specified period of time. <aside>Note: This API only supports Oauth2.</aside><br> <p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p><br> Scopes: `imchat:read, imchat:read:admin`<br>
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/zoom_us/im_chat.rb', line 121 def im_chat_sessions_with_http_info(from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IMChatApi.im_chat_sessions ...' end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling IMChatApi.im_chat_sessions" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling IMChatApi.im_chat_sessions" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 300 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IMChatApi.im_chat_sessions, must be smaller than or equal to 300.' end # resource path local_var_path = '/im/chat/sessions' # query parameters query_params = {} query_params[:'from'] = from query_params[:'to'] = to 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 => 'InlineResponse20020') if @api_client.config.debugging @api_client.config.logger.debug "API called: IMChatApi#im_chat_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#listimmessages(user_id, opts = {}) ⇒ InlineResponse20060
Get User’s IM Messages Get IM Chat messages for a specified period of time. <aside>Note: This API only supports Oauth2.</aside>
Scopes: ‘imchat:read` <p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p>
182 183 184 185 |
# File 'lib/zoom_us/im_chat.rb', line 182 def (user_id, opts = {}) data, _status_code, _headers = (user_id, opts) data end |
#listimmessages_with_http_info(user_id, opts = {}) ⇒ Array<(InlineResponse20060, Fixnum, Hash)>
Get User’s IM Messages Get IM Chat messages for a specified period of time. <aside>Note: This API only supports Oauth2.</aside><br><br> Scopes: `imchat:read` <p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p><br>
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/zoom_us/im_chat.rb', line 197 def (user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IMChatApi.listimmessages ...' 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 IMChatApi.listimmessages" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IMChatApi.listimmessages, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IMChatApi.listimmessages, must be greater than or equal to 1.' end # resource path local_var_path = '/im/users/{userId}/chat/messages'.sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'chat_user'] = opts[:'chat_user'] if !opts[:'chat_user'].nil? query_params[:'channel'] = opts[:'channel'] if !opts[:'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 => 'InlineResponse20060') if @api_client.config.debugging @api_client.config.logger.debug "API called: IMChatApi#listimmessages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sendimmessages(opts = {}) ⇒ InlineResponse20122
Send IM messages Send chat message to a user. <aside>Note: This API only supports OAuth 2.0.</aside>
Scope: ‘imchat:write` <p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p>
255 256 257 258 |
# File 'lib/zoom_us/im_chat.rb', line 255 def (opts = {}) data, _status_code, _headers = (opts) data end |
#sendimmessages_with_http_info(opts = {}) ⇒ Array<(InlineResponse20122, Fixnum, Hash)>
Send IM messages Send chat message to a user. <aside>Note: This API only supports OAuth 2.0.</aside><br><br>Scope: `imchat:write` <p style="background-color:#ffffcc;"><strong>API End of Life:</strong> This API will no longer be supported after April, 2020. <a href="marketplace.zoom.us/docs/deprecated-scopes">Learn more</a>.</p><br>
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/zoom_us/im_chat.rb', line 266 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IMChatApi.sendimmessages ...' end # resource path local_var_path = '/im/users/me/chat/messages' # query parameters query_params = {} query_params[:'chat_user'] = opts[:'chat_user'] if !opts[:'chat_user'].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 = @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 => 'InlineResponse20122') if @api_client.config.debugging @api_client.config.logger.debug "API called: IMChatApi#sendimmessages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |