Class: EjabberdHttpClient::AccountsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AccountsApi

Returns a new instance of AccountsApi.



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

def api_client
  @api_client
end

Instance Method Details

#ban_account(ban_account_request, opts = {}) ⇒ nil

Ban an account by kicking sessions and setting a random password.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

def (, opts = {})
  (, opts)
  nil
end

#ban_account_with_http_info(ban_account_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Ban an account by kicking sessions and setting a random password.

Parameters:

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

    the optional 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/accounts_api.rb', line 35

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

  # 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()

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"AccountsApi.ban_account",
    :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: AccountsApi#ban_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#change_password(change_password_request, opts = {}) ⇒ nil

Change the password of an account.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

def change_password(change_password_request, opts = {})
  change_password_with_http_info(change_password_request, opts)
  nil
end

#change_password_with_http_info(change_password_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Change the password of an account.

Parameters:

  • change_password_request (ChangePasswordRequest)
  • 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/accounts_api.rb', line 99

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

  # 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_password_request)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"AccountsApi.change_password",
    :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: AccountsApi#change_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#check_account(check_account_request, opts = {}) ⇒ nil

Check if an account exists or not.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

def (, opts = {})
  (, opts)
  nil
end

#check_account_with_http_info(check_account_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Check if an account exists or not.

Parameters:

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

    the optional 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/accounts_api.rb', line 163

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

  # 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()

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"AccountsApi.check_account",
    :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: AccountsApi#check_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#check_password(check_password_request, opts = {}) ⇒ nil

Check if a password is correct for a given user and host.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

def check_password(check_password_request, opts = {})
  check_password_with_http_info(check_password_request, opts)
  nil
end

#check_password_hash(check_password_hash_request, opts = {}) ⇒ nil

Check if the password hash for a user is correct. Allows hash methods from the Erlang/OTP crypto application.

Parameters:

Returns:

  • (nil)


282
283
284
285
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 282

def check_password_hash(check_password_hash_request, opts = {})
  check_password_hash_with_http_info(check_password_hash_request, opts)
  nil
end

#check_password_hash_with_http_info(check_password_hash_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Check if the password hash for a user is correct. Allows hash methods from the Erlang/OTP crypto application.

Parameters:

Returns:

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

    nil, response status code and response headers



291
292
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
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 291

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

  # 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(check_password_hash_request)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"AccountsApi.check_password_hash",
    :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: AccountsApi#check_password_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#check_password_with_http_info(check_password_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Check if a password is correct for a given user and host.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 227

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

  # 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(check_password_request)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"AccountsApi.check_password",
    :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: AccountsApi#check_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_old_users(delete_old_users_request, opts = {}) ⇒ String

Delete users that didn’t log in last days, or that never logged.

Parameters:

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

    the optional parameters

Returns:

  • (String)


346
347
348
349
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 346

def delete_old_users(delete_old_users_request, opts = {})
  data, _status_code, _headers = delete_old_users_with_http_info(delete_old_users_request, opts)
  data
end

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

Delete users that didn&#39;t log in last days, or that never logged.

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



355
356
357
358
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
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 355

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

  # 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(delete_old_users_request)

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

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

  new_options = opts.merge(
    :operation => :"AccountsApi.delete_old_users",
    :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: AccountsApi#delete_old_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#register(opts = {}) ⇒ String

Register a user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (String)


412
413
414
415
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 412

def register(opts = {})
  data, _status_code, _headers = register_with_http_info(opts)
  data
end

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

Register a user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    String 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
466
467
468
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 421

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

  # 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[:'register_request'])

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

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

  new_options = opts.merge(
    :operation => :"AccountsApi.register",
    :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: AccountsApi#register\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

List all registered users in HOST.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<String>)


474
475
476
477
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 474

def registered_users(opts = {})
  data, _status_code, _headers = registered_users_with_http_info(opts)
  data
end

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

List all registered users in HOST.

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



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
526
527
528
529
530
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 483

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

  # 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[:'registered_users_request'])

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

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

  new_options = opts.merge(
    :operation => :"AccountsApi.registered_users",
    :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: AccountsApi#registered_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unban_ip(opts = {}) ⇒ UnbanIp200Response

Remove banned IP addresses from the fail2ban table.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



536
537
538
539
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 536

def unban_ip(opts = {})
  data, _status_code, _headers = unban_ip_with_http_info(opts)
  data
end

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

Remove banned IP addresses from the fail2ban table.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    UnbanIp200Response data, response status code and response headers



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
582
583
584
585
586
587
588
589
590
591
592
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 545

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

  # 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[:'unban_ip_request'])

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

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

  new_options = opts.merge(
    :operation => :"AccountsApi.unban_ip",
    :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: AccountsApi#unban_ip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unregister_user(opts = {}) ⇒ String

Unregister a user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (String)


598
599
600
601
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 598

def unregister_user(opts = {})
  data, _status_code, _headers = unregister_user_with_http_info(opts)
  data
end

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

Unregister a user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    String data, response status code and response headers



607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
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
# File 'lib/ejabberd_http_client/api/accounts_api.rb', line 607

def unregister_user_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountsApi.unregister_user ...'
  end
  # resource path
  local_var_path = '/api/unregister'

  # 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[:'unregister_user_request'])

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

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

  new_options = opts.merge(
    :operation => :"AccountsApi.unregister_user",
    :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: AccountsApi#unregister_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end