Class: EjabberdHttpClient::MucRoomApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ejabberd_http_client/api/muc_room_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MucRoomApi

Returns a new instance of MucRoomApi.



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

def api_client
  @api_client
end

Instance Method Details

#change_room_option(change_room_option_request, opts = {}) ⇒ nil

Change an option in a MUC room.

Parameters:

Returns:

  • (nil)


26
27
28
29
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 26

def change_room_option(change_room_option_request, opts = {})
  change_room_option_with_http_info(change_room_option_request, opts)
  nil
end

#change_room_option_with_http_info(change_room_option_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Change an option in a MUC room.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



35
36
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
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 35

def change_room_option_with_http_info(change_room_option_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.change_room_option ...'
  end
  # verify the required parameter 'change_room_option_request' is set
  if @api_client.config.client_side_validation && change_room_option_request.nil?
    fail ArgumentError, "Missing the required parameter 'change_room_option_request' when calling MucRoomApi.change_room_option"
  end
  # resource path
  local_var_path = '/api/change_room_option'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(change_room_option_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.change_room_option",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#change_room_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_room(create_room_request, opts = {}) ⇒ nil

Create a MUC room using name@service in the given host.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


90
91
92
93
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 90

def create_room(create_room_request, opts = {})
  create_room_with_http_info(create_room_request, opts)
  nil
end

#create_room_with_http_info(create_room_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create a MUC room using name@service in the given host.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 99

def create_room_with_http_info(create_room_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.create_room ...'
  end
  # verify the required parameter 'create_room_request' is set
  if @api_client.config.client_side_validation && create_room_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_room_request' when calling MucRoomApi.create_room"
  end
  # resource path
  local_var_path = '/api/create_room'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_room_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.create_room",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#create_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_room_with_options(create_room_with_options_request, opts = {}) ⇒ nil

Create a MUC room using name@service in the given host with specific options.

Parameters:

Returns:

  • (nil)


154
155
156
157
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 154

def create_room_with_options(create_room_with_options_request, opts = {})
  create_room_with_options_with_http_info(create_room_with_options_request, opts)
  nil
end

#create_room_with_options_with_http_info(create_room_with_options_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create a MUC room using name@service in the given host with specific options.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
210
211
212
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 163

def create_room_with_options_with_http_info(create_room_with_options_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.create_room_with_options ...'
  end
  # verify the required parameter 'create_room_with_options_request' is set
  if @api_client.config.client_side_validation && create_room_with_options_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_room_with_options_request' when calling MucRoomApi.create_room_with_options"
  end
  # resource path
  local_var_path = '/api/create_room_with_opts'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_room_with_options_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.create_room_with_options",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#create_room_with_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_room_affiliation(get_room_affiliation_request, opts = {}) ⇒ GetRoomAffiliation200Response

Get affiliation of a user in MUC room.

Parameters:

Returns:



218
219
220
221
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 218

def get_room_affiliation(get_room_affiliation_request, opts = {})
  data, _status_code, _headers = get_room_affiliation_with_http_info(get_room_affiliation_request, opts)
  data
end

#get_room_affiliation_with_http_info(get_room_affiliation_request, opts = {}) ⇒ Array<(GetRoomAffiliation200Response, Integer, Hash)>

Get affiliation of a user in MUC room.

Parameters:

Returns:



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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 227

def get_room_affiliation_with_http_info(get_room_affiliation_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_room_affiliation ...'
  end
  # verify the required parameter 'get_room_affiliation_request' is set
  if @api_client.config.client_side_validation && get_room_affiliation_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliation_request' when calling MucRoomApi.get_room_affiliation"
  end
  # resource path
  local_var_path = '/api/get_room_affiliation'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliation_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GetRoomAffiliation200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_room_affiliation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_room_affiliation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_room_affiliations(get_room_affiliations_request, opts = {}) ⇒ Array<GetRoomAffiliations200ResponseInner>

Get the list of affiliations of a MUC room.

Parameters:

Returns:



284
285
286
287
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 284

def get_room_affiliations(get_room_affiliations_request, opts = {})
  data, _status_code, _headers = get_room_affiliations_with_http_info(get_room_affiliations_request, opts)
  data
end

#get_room_affiliations_with_http_info(get_room_affiliations_request, opts = {}) ⇒ Array<(Array<GetRoomAffiliations200ResponseInner>, Integer, Hash)>

Get the list of affiliations of a MUC room.

Parameters:

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
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
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 293

def get_room_affiliations_with_http_info(get_room_affiliations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_room_affiliations ...'
  end
  # verify the required parameter 'get_room_affiliations_request' is set
  if @api_client.config.client_side_validation && get_room_affiliations_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliations_request' when calling MucRoomApi.get_room_affiliations"
  end
  # resource path
  local_var_path = '/api/get_room_affiliations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliations_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<GetRoomAffiliations200ResponseInner>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_room_affiliations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_room_affiliations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_room_history(get_room_affiliations_request, opts = {}) ⇒ Array<GetRoomHistory200ResponseInner>

Get history of messages stored inside MUC room state.

Parameters:

Returns:



350
351
352
353
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 350

def get_room_history(get_room_affiliations_request, opts = {})
  data, _status_code, _headers = get_room_history_with_http_info(get_room_affiliations_request, opts)
  data
end

#get_room_history_with_http_info(get_room_affiliations_request, opts = {}) ⇒ Array<(Array<GetRoomHistory200ResponseInner>, Integer, Hash)>

Get history of messages stored inside MUC room state.

Parameters:

Returns:

  • (Array<(Array<GetRoomHistory200ResponseInner>, Integer, Hash)>)

    Array<GetRoomHistory200ResponseInner> data, response status code and response headers



359
360
361
362
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
402
403
404
405
406
407
408
409
410
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 359

def get_room_history_with_http_info(get_room_affiliations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_room_history ...'
  end
  # verify the required parameter 'get_room_affiliations_request' is set
  if @api_client.config.client_side_validation && get_room_affiliations_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliations_request' when calling MucRoomApi.get_room_history"
  end
  # resource path
  local_var_path = '/api/get_room_history'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliations_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<GetRoomHistory200ResponseInner>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_room_history",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_room_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_room_occupants(get_room_affiliations_request, opts = {}) ⇒ Array<GetRoomOccupants200ResponseInner>

Get the list of occupants of a MUC room.

Parameters:

Returns:



416
417
418
419
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 416

def get_room_occupants(get_room_affiliations_request, opts = {})
  data, _status_code, _headers = get_room_occupants_with_http_info(get_room_affiliations_request, opts)
  data
end

#get_room_occupants_number(get_room_affiliations_request, opts = {}) ⇒ GetRoomOccupantsNumber200Response

Get the number of occupants of a MUC room.

Parameters:

Returns:



482
483
484
485
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 482

def get_room_occupants_number(get_room_affiliations_request, opts = {})
  data, _status_code, _headers = get_room_occupants_number_with_http_info(get_room_affiliations_request, opts)
  data
end

#get_room_occupants_number_with_http_info(get_room_affiliations_request, opts = {}) ⇒ Array<(GetRoomOccupantsNumber200Response, Integer, Hash)>

Get the number of occupants of a MUC room.

Parameters:

Returns:



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
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 491

def get_room_occupants_number_with_http_info(get_room_affiliations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_room_occupants_number ...'
  end
  # verify the required parameter 'get_room_affiliations_request' is set
  if @api_client.config.client_side_validation && get_room_affiliations_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliations_request' when calling MucRoomApi.get_room_occupants_number"
  end
  # resource path
  local_var_path = '/api/get_room_occupants_number'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliations_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GetRoomOccupantsNumber200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_room_occupants_number",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_room_occupants_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_room_occupants_with_http_info(get_room_affiliations_request, opts = {}) ⇒ Array<(Array<GetRoomOccupants200ResponseInner>, Integer, Hash)>

Get the list of occupants of a MUC room.

Parameters:

Returns:



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
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 425

def get_room_occupants_with_http_info(get_room_affiliations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_room_occupants ...'
  end
  # verify the required parameter 'get_room_affiliations_request' is set
  if @api_client.config.client_side_validation && get_room_affiliations_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliations_request' when calling MucRoomApi.get_room_occupants"
  end
  # resource path
  local_var_path = '/api/get_room_occupants'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliations_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<GetRoomOccupants200ResponseInner>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_room_occupants",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_room_occupants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_room_options(get_room_affiliations_request, opts = {}) ⇒ Array<GetRoomOptions200ResponseInner>

Get options from a MUC room.

Parameters:

Returns:



548
549
550
551
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 548

def get_room_options(get_room_affiliations_request, opts = {})
  data, _status_code, _headers = get_room_options_with_http_info(get_room_affiliations_request, opts)
  data
end

#get_room_options_with_http_info(get_room_affiliations_request, opts = {}) ⇒ Array<(Array<GetRoomOptions200ResponseInner>, Integer, Hash)>

Get options from a MUC room.

Parameters:

Returns:

  • (Array<(Array<GetRoomOptions200ResponseInner>, Integer, Hash)>)

    Array<GetRoomOptions200ResponseInner> data, response status code and response headers



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
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 557

def get_room_options_with_http_info(get_room_affiliations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_room_options ...'
  end
  # verify the required parameter 'get_room_affiliations_request' is set
  if @api_client.config.client_side_validation && get_room_affiliations_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliations_request' when calling MucRoomApi.get_room_options"
  end
  # resource path
  local_var_path = '/api/get_room_options'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliations_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<GetRoomOptions200ResponseInner>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_room_options",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_room_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_subscribers(get_room_affiliations_request, opts = {}) ⇒ Array<String>

List subscribers of a MUC conference.

Parameters:

Returns:

  • (Array<String>)


614
615
616
617
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 614

def get_subscribers(get_room_affiliations_request, opts = {})
  data, _status_code, _headers = get_subscribers_with_http_info(get_room_affiliations_request, opts)
  data
end

#get_subscribers_with_http_info(get_room_affiliations_request, opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>

List subscribers of a MUC conference.

Parameters:

Returns:

  • (Array<(Array<String>, Integer, Hash)>)

    Array<String> data, response status code and response headers



623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 623

def get_subscribers_with_http_info(get_room_affiliations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.get_subscribers ...'
  end
  # verify the required parameter 'get_room_affiliations_request' is set
  if @api_client.config.client_side_validation && get_room_affiliations_request.nil?
    fail ArgumentError, "Missing the required parameter 'get_room_affiliations_request' when calling MucRoomApi.get_subscribers"
  end
  # resource path
  local_var_path = '/api/get_subscribers'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(get_room_affiliations_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.get_subscribers",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#get_subscribers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_direct_invitation(opts = {}) ⇒ Integer

Send a direct invitation to several destinations.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Integer)


680
681
682
683
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 680

def send_direct_invitation(opts = {})
  data, _status_code, _headers = send_direct_invitation_with_http_info(opts)
  data
end

#send_direct_invitation_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>

Send a direct invitation to several destinations.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Integer, Integer, Hash)>)

    Integer data, response status code and response headers



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 689

def send_direct_invitation_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.send_direct_invitation ...'
  end
  # resource path
  local_var_path = '/api/send_direct_invitation'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'send_direct_invitation_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'Integer'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.send_direct_invitation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#send_direct_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_room_affiliation(opts = {}) ⇒ Integer

Change an affiliation in a MUC room.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Integer)


742
743
744
745
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 742

def set_room_affiliation(opts = {})
  data, _status_code, _headers = set_room_affiliation_with_http_info(opts)
  data
end

#set_room_affiliation_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>

Change an affiliation in a MUC room.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Integer, Integer, Hash)>)

    Integer data, response status code and response headers



751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 751

def set_room_affiliation_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.set_room_affiliation ...'
  end
  # resource path
  local_var_path = '/api/set_room_affiliation'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_room_affiliation_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'Integer'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.set_room_affiliation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#set_room_affiliation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#subscribe_to_room(opts = {}) ⇒ Array<String>

Subscribe to a MUC conference.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<String>)


804
805
806
807
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 804

def subscribe_to_room(opts = {})
  data, _status_code, _headers = subscribe_to_room_with_http_info(opts)
  data
end

#subscribe_to_room_many(opts = {}) ⇒ Integer

Subscribe several users to a MUC conference.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Integer)


866
867
868
869
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 866

def subscribe_to_room_many(opts = {})
  data, _status_code, _headers = subscribe_to_room_many_with_http_info(opts)
  data
end

#subscribe_to_room_many_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>

Subscribe several users to a MUC conference.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Integer, Integer, Hash)>)

    Integer data, response status code and response headers



875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 875

def subscribe_to_room_many_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.subscribe_to_room_many ...'
  end
  # resource path
  local_var_path = '/api/subscribe_room_many'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'subscribe_to_room_many_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'Integer'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.subscribe_to_room_many",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#subscribe_to_room_many\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#subscribe_to_room_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>

Subscribe to a MUC conference.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Array<String>, Integer, Hash)>)

    Array<String> data, response status code and response headers



813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 813

def subscribe_to_room_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.subscribe_to_room ...'
  end
  # resource path
  local_var_path = '/api/subscribe_room'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'subscribe_to_room_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.subscribe_to_room",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#subscribe_to_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unsubscribe_from_room(opts = {}) ⇒ Integer

Unsubscribe from a MUC conference.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Integer)


928
929
930
931
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 928

def unsubscribe_from_room(opts = {})
  data, _status_code, _headers = unsubscribe_from_room_with_http_info(opts)
  data
end

#unsubscribe_from_room_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>

Unsubscribe from a MUC conference.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Integer, Integer, Hash)>)

    Integer data, response status code and response headers



937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
# File 'lib/ejabberd_http_client/api/muc_room_api.rb', line 937

def unsubscribe_from_room_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MucRoomApi.unsubscribe_from_room ...'
  end
  # resource path
  local_var_path = '/api/unsubscribe_room'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'unsubscribe_from_room_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'Integer'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"MucRoomApi.unsubscribe_from_room",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MucRoomApi#unsubscribe_from_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end