Class: ZoomUs::ChatChannels

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ChatChannels

Returns a new instance of ChatChannels.



19
20
21
# File 'lib/zoom_us/chat_channels.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/chat_channels.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_channel(opts = {}) ⇒ InlineResponse2012

Create a Channel Zoom chat channels allow users to communicate via chat in private or public groups. Use this API to create a channel for a user. <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_channel:write`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body7)

Returns:

  • (InlineResponse2012)


27
28
29
30
# File 'lib/zoom_us/chat_channels.rb', line 27

def create_channel(opts = {})
  data, _status_code, _headers = create_channel_with_http_info(opts)
  data
end

#create_channel_with_http_info(opts = {}) ⇒ Array<(InlineResponse2012, Fixnum, Hash)>

Create a Channel Zoom chat channels allow users to communicate via chat in private or public groups. Use this API to create a channel for a user. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt; This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scopes: &#x60;chat_channel:write&#x60;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body7)

Returns:

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

    InlineResponse2012 data, response status code and response headers



37
38
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
# File 'lib/zoom_us/chat_channels.rb', line 37

def create_channel_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.create_channel ...'
  end
  # resource path
  local_var_path = '/chat/users/me/channels'

  # 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 => 'InlineResponse2012')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatChannelsApi#create_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_channel(channel_id, opts = {}) ⇒ Object

Delete a Channel Zoom chat [channels](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) allow users to communicate via chat in private or public groups. Use this API to delete a specific channel. <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_channel:write`

Parameters:

  • channel_id

    Channel ID: Unique Identifier of a channel.

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

    the optional parameters

Returns:

  • (Object)


77
78
79
80
# File 'lib/zoom_us/chat_channels.rb', line 77

def delete_channel(channel_id, opts = {})
  data, _status_code, _headers = delete_channel_with_http_info(channel_id, opts)
  data
end

#delete_channel_with_http_info(channel_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Delete a Channel Zoom chat [channels](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) allow users to communicate via chat in private or public groups. Use this API to delete a specific channel. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:write&#x60;&lt;br&gt;

Parameters:

  • channel_id

    Channel ID: Unique Identifier of a channel.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



87
88
89
90
91
92
93
94
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
# File 'lib/zoom_us/chat_channels.rb', line 87

def delete_channel_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.delete_channel ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.delete_channel"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}'.sub('{' + 'channelId' + '}', channel_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 = 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: ChatChannelsApi#delete_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_channel(channel_id, opts = {}) ⇒ InlineResponse20010

Get a Channel Zoom chat [channels](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) allow users to communicate via chat in private or public groups. Use this API to get information about a specific channel. <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_channel:read`

Parameters:

  • channel_id

    Channel ID: Unique Identifier of a channel.

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

    the optional parameters

Returns:

  • (InlineResponse20010)


131
132
133
134
# File 'lib/zoom_us/chat_channels.rb', line 131

def get_channel(channel_id, opts = {})
  data, _status_code, _headers = get_channel_with_http_info(channel_id, opts)
  data
end

#get_channel_with_http_info(channel_id, opts = {}) ⇒ Array<(InlineResponse20010, Fixnum, Hash)>

Get a Channel Zoom chat [channels](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) allow users to communicate via chat in private or public groups. Use this API to get information about a specific channel. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:read&#x60; &lt;br&gt;

Parameters:

  • channel_id

    Channel ID: Unique Identifier of a channel.

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

    the optional parameters

Returns:

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

    InlineResponse20010 data, response status code and response headers



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
172
173
174
175
176
177
178
179
# File 'lib/zoom_us/chat_channels.rb', line 141

def get_channel_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.get_channel ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.get_channel"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}'.sub('{' + 'channelId' + '}', channel_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'])

  # 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 => 'InlineResponse20010')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatChannelsApi#get_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_channels(opts = {}) ⇒ InlineResponse2007

List User’s Channels Zoom chat [channels](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) allow users to communicate via chat in private or public groups. Use this API to list a user’s chat channels. <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_channel:read`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned from a single API call. (default to 10)

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. The expiration period for this token is 15 minutes.

Returns:

  • (InlineResponse2007)


186
187
188
189
# File 'lib/zoom_us/chat_channels.rb', line 186

def get_channels(opts = {})
  data, _status_code, _headers = get_channels_with_http_info(opts)
  data
end

#get_channels_with_http_info(opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>

List User&#39;s Channels Zoom chat [channels](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) allow users to communicate via chat in private or public groups. Use this API to list a user&#39;s chat channels. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt; This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:read&#x60;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned from a single API call.

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. The expiration period for this token is 15 minutes.

Returns:

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

    InlineResponse2007 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
# File 'lib/zoom_us/chat_channels.rb', line 197

def get_channels_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.get_channels ...'
  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 ChatChannelsApi.get_channels, must be smaller than or equal to 50.'
  end

  # resource path
  local_var_path = '/chat/users/me/channels'

  # query parameters
  query_params = {}
  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 => 'InlineResponse2007')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatChannelsApi#get_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#invite_channel_members(channel_id, opts = {}) ⇒ InlineResponse2013

Invite Channel Members A [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. Use this API to invite members that are in your contact list to a channel. The maximum number of members that can be added at once with this API is 5. <p style="background-color:#e7f3fe;"><strong>Note:</strong> 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_channel:write`

Parameters:

  • channel_id

    Channel ID: Unique Identifier of the channel.

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

    the optional parameters

Options Hash (opts):

  • :body (Body9)

Returns:

  • (InlineResponse2013)


244
245
246
247
# File 'lib/zoom_us/chat_channels.rb', line 244

def invite_channel_members(channel_id, opts = {})
  data, _status_code, _headers = invite_channel_members_with_http_info(channel_id, opts)
  data
end

#invite_channel_members_with_http_info(channel_id, opts = {}) ⇒ Array<(InlineResponse2013, Fixnum, Hash)>

Invite Channel Members A [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. Use this API to invite members that are in your contact list to a channel. The maximum number of members that can be added at once with this API is 5. &lt;p style&#x3D;&quot;background-color:#e7f3fe;&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:write&#x60;&lt;br&gt;

Parameters:

  • channel_id

    Channel ID: Unique Identifier of the channel.

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

    the optional parameters

Options Hash (opts):

  • :body (Body9)

Returns:

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

    InlineResponse2013 data, response status code and response headers



255
256
257
258
259
260
261
262
263
264
265
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
# File 'lib/zoom_us/chat_channels.rb', line 255

def invite_channel_members_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.invite_channel_members ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.invite_channel_members"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}/members'.sub('{' + 'channelId' + '}', channel_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 = ['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 => 'InlineResponse2013')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatChannelsApi#invite_channel_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#join_channel(channel_id, opts = {}) ⇒ InlineResponse2014

Join a Channel A [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. Use this API to join a channel that is open for anyone in the same organization to join. You cannot use this API to join private channels that only allows invited members to be a part of it. <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_channel:write`

Parameters:

  • channel_id

    Channel Id.

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

    the optional parameters

Returns:

  • (InlineResponse2014)


299
300
301
302
# File 'lib/zoom_us/chat_channels.rb', line 299

def join_channel(channel_id, opts = {})
  data, _status_code, _headers = join_channel_with_http_info(channel_id, opts)
  data
end

#join_channel_with_http_info(channel_id, opts = {}) ⇒ Array<(InlineResponse2014, Fixnum, Hash)>

Join a Channel A [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. Use this API to join a channel that is open for anyone in the same organization to join. You cannot use this API to join private channels that only allows invited members to be a part of it. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:write&#x60;&lt;br&gt;

Parameters:

  • channel_id

    Channel Id.

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

    the optional parameters

Returns:

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

    InlineResponse2014 data, response status code and response headers



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/zoom_us/chat_channels.rb', line 309

def join_channel_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.join_channel ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.join_channel"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}/members/me'.sub('{' + 'channelId' + '}', channel_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 = nil
  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 => 'InlineResponse2014')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatChannelsApi#join_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#leave_channel(channel_id, opts = {}) ⇒ Object

Leave a Channel If you’re no longer interested in being a member of an existing channel, you can leave the channel at any time. Use this API to leave a specific channel. After leaving the channel, you can no longer access information from that channel. <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_channel:write`

Parameters:

  • channel_id

    Channel ID: Unique Identifier of a channel.

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

    the optional parameters

Returns:

  • (Object)


353
354
355
356
# File 'lib/zoom_us/chat_channels.rb', line 353

def leave_channel(channel_id, opts = {})
  data, _status_code, _headers = leave_channel_with_http_info(channel_id, opts)
  data
end

#leave_channel_with_http_info(channel_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Leave a Channel If you&#39;re no longer interested in being a member of an existing channel, you can leave the channel at any time. Use this API to leave a specific channel. After leaving the channel, you can no longer access information from that channel. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:write&#x60;&lt;br&gt;

Parameters:

  • channel_id

    Channel ID: Unique Identifier of a channel.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/zoom_us/chat_channels.rb', line 363

def leave_channel_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.leave_channel ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.leave_channel"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}/members/me'.sub('{' + 'channelId' + '}', channel_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 = 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: ChatChannelsApi#leave_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_channel_members(channel_id, opts = {}) ⇒ InlineResponse20011

List Channel Members A [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. List all the members of a channel using this API. <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_channel:read`

Parameters:

  • channel_id

    Channel Id.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned with 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:

  • (InlineResponse20011)


409
410
411
412
# File 'lib/zoom_us/chat_channels.rb', line 409

def list_channel_members(channel_id, opts = {})
  data, _status_code, _headers = list_channel_members_with_http_info(channel_id, opts)
  data
end

#list_channel_members_with_http_info(channel_id, opts = {}) ⇒ Array<(InlineResponse20011, Fixnum, Hash)>

List Channel Members A [channel](support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. List all the members of a channel using this API. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scopes: &#x60;chat_channel:read&#x60;&lt;br&gt;

Parameters:

  • channel_id

    Channel Id.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned with 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<(InlineResponse20011, Fixnum, Hash)>)

    InlineResponse20011 data, response status code and response headers



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/zoom_us/chat_channels.rb', line 421

def list_channel_members_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.list_channel_members ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.list_channel_members"
  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 ChatChannelsApi.list_channel_members, must be smaller than or equal to 100.'
  end

  # resource path
  local_var_path = '/chat/channels/{channelId}/members'.sub('{' + 'channelId' + '}', channel_id.to_s)

  # query parameters
  query_params = {}
  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 => 'InlineResponse20011')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatChannelsApi#list_channel_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_a_channel_member(channel_id, member_id, opts = {}) ⇒ Object

Remove a Member

A [channel](https://support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. Use this API to remove a member from a chat channel.<br><br>  **Scopes:** `chat_channel:write`<br>      <p style=\"background-color:#e1f5fe; color:#01579b; padding:8px\"> <b>Note: </b>This API only supports <b>user-managed</b> <a href=\"https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app\">OAuth app</a>.</p><br>

Parameters:

  • channel_id

    Unique Identifier of the Channel from where you would like to remove a member. This can be retrieved from the [List Channels API](marketplace.zoom.us/docs/api-reference/zoom-api/chat-channels/getchannels).

  • member_id

    Email address of the member whom you would like to be remove from the channel.

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

    the optional parameters

Returns:

  • (Object)


472
473
474
475
# File 'lib/zoom_us/chat_channels.rb', line 472

def remove_a_channel_member(channel_id, member_id, opts = {})
  data, _status_code, _headers = remove_a_channel_member_with_http_info(channel_id, member_id, opts)
  data
end

#remove_a_channel_member_with_http_info(channel_id, member_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Remove a Member

A [channel](https://support.zoom.us/hc/en-us/articles/200912909-Getting-Started-With-Channels-Group-Messaging-) can have one or multiple members. Use this API to remove a member from a chat channel.&lt;br&gt;&lt;br&gt;  **Scopes:** &#x60;chat_channel:write&#x60;&lt;br&gt;      &lt;p style&#x3D;\&quot;background-color:#e1f5fe; color:#01579b; padding:8px\&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;\&quot;https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app\&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt;

Parameters:

  • channel_id

    Unique Identifier of the Channel from where you would like to remove a member. This can be retrieved from the [List Channels API](marketplace.zoom.us/docs/api-reference/zoom-api/chat-channels/getchannels).

  • member_id

    Email address of the member whom you would like to be remove from the channel.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/zoom_us/chat_channels.rb', line 483

def remove_a_channel_member_with_http_info(channel_id, member_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.remove_a_channel_member ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.remove_a_channel_member"
  end
  # verify the required parameter 'member_id' is set
  if @api_client.config.client_side_validation && member_id.nil?
    fail ArgumentError, "Missing the required parameter 'member_id' when calling ChatChannelsApi.remove_a_channel_member"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}/members/{memberId}'.sub('{' + 'channelId' + '}', channel_id.to_s).sub('{' + 'memberId' + '}', member_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 = 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: ChatChannelsApi#remove_a_channel_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_channel(channel_id, opts = {}) ⇒ Object

Update a Channel Zoom chat channels allow users to communicate via chat in private or public channels. Use this API to update the name of a specific channel that you created. <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_channel:write`

Parameters:

  • channel_id

    Channel Id.

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

    the optional parameters

Options Hash (opts):

  • :body (Body8)

Returns:

  • (Object)


532
533
534
535
# File 'lib/zoom_us/chat_channels.rb', line 532

def update_channel(channel_id, opts = {})
  data, _status_code, _headers = update_channel_with_http_info(channel_id, opts)
  data
end

#update_channel_with_http_info(channel_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Update a Channel Zoom chat channels allow users to communicate via chat in private or public channels. Use this API to update the name of a specific channel that you created. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app&quot;&gt;OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_channel:write&#x60; &lt;br&gt;

Parameters:

  • channel_id

    Channel Id.

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

    the optional parameters

Options Hash (opts):

  • :body (Body8)

Returns:

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

    Object data, response status code and response headers



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
# File 'lib/zoom_us/chat_channels.rb', line 543

def update_channel_with_http_info(channel_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatChannelsApi.update_channel ...'
  end
  # verify the required parameter 'channel_id' is set
  if @api_client.config.client_side_validation && channel_id.nil?
    fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChatChannelsApi.update_channel"
  end
  # resource path
  local_var_path = '/chat/channels/{channelId}'.sub('{' + 'channelId' + '}', channel_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 = ['OAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, 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: ChatChannelsApi#update_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end