Class: ZoomUs::IMChat

Inherits:
Object
  • Object
show all
Defined in:
lib/zoom_us/im_chat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ IMChat

Returns a new instance of IMChat.



19
20
21
# File 'lib/zoom_us/im_chat.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

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>

Parameters:

  • session_id

    IM chat session ID.

  • from

    Start date in &#39;yyyy-mm-dd&#39; format. The date range defined by the &quot;from&quot; and &quot;to&quot; parameters should only be one month as the report includes only one month worth of data at once.

  • to

    End date.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

Returns:

  • (InlineResponse20021)


31
32
33
34
# File 'lib/zoom_us/im_chat.rb', line 31

def im_chat_messages(session_id, from, to, opts = {})
  data, _status_code, _headers = im_chat_messages_with_http_info(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. &lt;aside&gt;Note: This API only supports oauth2.&lt;/aside&gt;&lt;br&gt;&lt;br&gt; Scopes: &#x60;imchat:read&#x60;&lt;br&gt; &lt;br&gt; &lt;p style&#x3D;&quot;background-color:#ffffcc;&quot;&gt;&lt;strong&gt;API End of Life:&lt;/strong&gt; This API will no longer be supported after April, 2020. &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/deprecated-scopes&quot;&gt;Learn more&lt;/a&gt;.&lt;/p&gt;&lt;br&gt;

Parameters:

  • session_id

    IM chat session ID.

  • from

    Start date in &#39;yyyy-mm-dd&#39; format. The date range defined by the &quot;from&quot; and &quot;to&quot; parameters should only be one month as the report includes only one month worth of data at once.

  • to

    End date.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

Returns:

  • (Array<(InlineResponse20021, Fixnum, Hash)>)

    InlineResponse20021 data, response status code and response headers



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 im_chat_messages_with_http_info(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`

Parameters:

  • from

    Start date in &#39;yyyy-mm-dd&#39; format. The date range defined by the &quot;from&quot; and &quot;to&quot; parameters should only be one month as the report includes only one month worth of data at once.

  • to

    End date.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

Returns:

  • (InlineResponse20020)


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. &lt;aside&gt;Note: This API only supports Oauth2.&lt;/aside&gt;&lt;br&gt; &lt;p style&#x3D;&quot;background-color:#ffffcc;&quot;&gt;&lt;strong&gt;API End of Life:&lt;/strong&gt; This API will no longer be supported after April, 2020. &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/deprecated-scopes&quot;&gt;Learn more&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scopes: &#x60;imchat:read, imchat:read:admin&#x60;&lt;br&gt;

Parameters:

  • from

    Start date in &#39;yyyy-mm-dd&#39; format. The date range defined by the &quot;from&quot; and &quot;to&quot; parameters should only be one month as the report includes only one month worth of data at once.

  • to

    End date.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

Returns:

  • (Array<(InlineResponse20020, Fixnum, Hash)>)

    InlineResponse20020 data, response status code and response headers



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>

Parameters:

  • user_id

    The user ID or email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :chat_user (String)

    Chat user&#39;s ID or email address.

  • :channel (String)

    IM Channel&#39;s ID.

  • :date (String)

    IM message&#39;s query date time, format as yyyy-MM-dd.

  • :page_size (Integer)

    The number of records returned within a single API call. (default to 30)

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

Returns:

  • (InlineResponse20060)


182
183
184
185
# File 'lib/zoom_us/im_chat.rb', line 182

def listimmessages(user_id, opts = {})
  data, _status_code, _headers = listimmessages_with_http_info(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. &lt;aside&gt;Note: This API only supports Oauth2.&lt;/aside&gt;&lt;br&gt;&lt;br&gt; Scopes: &#x60;imchat:read&#x60; &lt;p style&#x3D;&quot;background-color:#ffffcc;&quot;&gt;&lt;strong&gt;API End of Life:&lt;/strong&gt; This API will no longer be supported after April, 2020. &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/deprecated-scopes&quot;&gt;Learn more&lt;/a&gt;.&lt;/p&gt;&lt;br&gt;

Parameters:

  • user_id

    The user ID or email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :chat_user (String)

    Chat user&#39;s ID or email address.

  • :channel (String)

    IM Channel&#39;s ID.

  • :date (String)

    IM message&#39;s query date time, format as yyyy-MM-dd.

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

Returns:

  • (Array<(InlineResponse20060, Fixnum, Hash)>)

    InlineResponse20060 data, response status code and response headers



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 listimmessages_with_http_info(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>

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body44)
  • :chat_user (String)

    The email address (registered with Zoom) or the userId of the chat user.

Returns:

  • (InlineResponse20122)


255
256
257
258
# File 'lib/zoom_us/im_chat.rb', line 255

def sendimmessages(opts = {})
  data, _status_code, _headers = sendimmessages_with_http_info(opts)
  data
end

#sendimmessages_with_http_info(opts = {}) ⇒ Array<(InlineResponse20122, Fixnum, Hash)>

Send IM messages Send chat message to a user. &lt;aside&gt;Note: This API only supports OAuth 2.0.&lt;/aside&gt;&lt;br&gt;&lt;br&gt;Scope: &#x60;imchat:write&#x60; &lt;p style&#x3D;&quot;background-color:#ffffcc;&quot;&gt;&lt;strong&gt;API End of Life:&lt;/strong&gt; This API will no longer be supported after April, 2020. &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/deprecated-scopes&quot;&gt;Learn more&lt;/a&gt;.&lt;/p&gt;&lt;br&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Body44)
  • :chat_user (String)

    The email address (registered with Zoom) or the userId of the chat user.

Returns:

  • (Array<(InlineResponse20122, Fixnum, Hash)>)

    InlineResponse20122 data, response status code and response headers



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 sendimmessages_with_http_info(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