Class: EjabberdHttpClient::SessionApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SessionApi

Returns a new instance of SessionApi.



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

def api_client
  @api_client
end

Instance Method Details

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

List all established user sessions.

Parameters:

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

    the optional parameters

Returns:

  • (Array<String>)


25
26
27
28
# File 'lib/ejabberd_http_client/api/session_api.rb', line 25

def connected_users(opts = {})
  data, _status_code, _headers = connected_users_with_http_info(opts)
  data
end

#connected_users_info(opts = {}) ⇒ Array<ConnectedUsersInfo200ResponseInner>

List all established sessions and their information.

Parameters:

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

    the optional parameters

Returns:



80
81
82
83
# File 'lib/ejabberd_http_client/api/session_api.rb', line 80

def connected_users_info(opts = {})
  data, _status_code, _headers = connected_users_info_with_http_info(opts)
  data
end

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

List all established sessions and their information.

Parameters:

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

    the optional parameters

Returns:



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
126
127
128
129
130
# File 'lib/ejabberd_http_client/api/session_api.rb', line 88

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

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

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

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

#connected_users_number(opts = {}) ⇒ ConnectedUsersNumber200Response

Get the number of established sessions.

Parameters:

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

    the optional parameters

Returns:



135
136
137
138
# File 'lib/ejabberd_http_client/api/session_api.rb', line 135

def connected_users_number(opts = {})
  data, _status_code, _headers = connected_users_number_with_http_info(opts)
  data
end

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

Get the number of established sessions.

Parameters:

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

    the optional parameters

Returns:



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
180
181
182
183
184
185
# File 'lib/ejabberd_http_client/api/session_api.rb', line 143

def connected_users_number_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.connected_users_number ...'
  end
  # resource path
  local_var_path = '/api/connected_users_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'])

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

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

#connected_users_v_host(connected_users_v_host_request, opts = {}) ⇒ Array<String>

Get the list of established sessions in a vhost.

Parameters:

Returns:

  • (Array<String>)


191
192
193
194
# File 'lib/ejabberd_http_client/api/session_api.rb', line 191

def connected_users_v_host(connected_users_v_host_request, opts = {})
  data, _status_code, _headers = connected_users_v_host_with_http_info(connected_users_v_host_request, opts)
  data
end

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

Get the list of established sessions in a vhost.

Parameters:

Returns:

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

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



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/ejabberd_http_client/api/session_api.rb', line 200

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

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

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

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

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

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

List all established user sessions.

Parameters:

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

    the optional parameters

Returns:

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

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



33
34
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
# File 'lib/ejabberd_http_client/api/session_api.rb', line 33

def connected_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.connected_users ...'
  end
  # resource path
  local_var_path = '/api/connected_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'])

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

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

#get_num_resources(get_last_request, opts = {}) ⇒ GetNumResources200Response

Get the number of resources of a user.

Parameters:

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

    the optional parameters

Returns:



257
258
259
260
# File 'lib/ejabberd_http_client/api/session_api.rb', line 257

def get_num_resources(get_last_request, opts = {})
  data, _status_code, _headers = get_num_resources_with_http_info(get_last_request, opts)
  data
end

#get_num_resources_with_http_info(get_last_request, opts = {}) ⇒ Array<(GetNumResources200Response, Integer, Hash)>

Get the number of resources of a user.

Parameters:

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

    the optional parameters

Returns:

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

    GetNumResources200Response data, response status code and response headers



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/ejabberd_http_client/api/session_api.rb', line 266

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

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

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

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

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

#get_presence(get_last_request, opts = {}) ⇒ GetPresence200Response

Retrieve the resource with highest priority, and its presence for a given user.

Parameters:

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

    the optional parameters

Returns:



323
324
325
326
# File 'lib/ejabberd_http_client/api/session_api.rb', line 323

def get_presence(get_last_request, opts = {})
  data, _status_code, _headers = get_presence_with_http_info(get_last_request, opts)
  data
end

#get_presence_with_http_info(get_last_request, opts = {}) ⇒ Array<(GetPresence200Response, Integer, Hash)>

Retrieve the resource with highest priority, and its presence for a given user.

Parameters:

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

    the optional parameters

Returns:

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

    GetPresence200Response data, response status code and response headers



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
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
# File 'lib/ejabberd_http_client/api/session_api.rb', line 332

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

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

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

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

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

#get_status_list(opts = {}) ⇒ Array<GetStatusList200ResponseInner>

List of logged users with this status.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



389
390
391
392
# File 'lib/ejabberd_http_client/api/session_api.rb', line 389

def get_status_list(opts = {})
  data, _status_code, _headers = get_status_list_with_http_info(opts)
  data
end

#get_status_list_host(opts = {}) ⇒ Array<GetStatusList200ResponseInner>

List of users logged in host with their statuses.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



451
452
453
454
# File 'lib/ejabberd_http_client/api/session_api.rb', line 451

def get_status_list_host(opts = {})
  data, _status_code, _headers = get_status_list_host_with_http_info(opts)
  data
end

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

List of users logged in host with their statuses.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

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



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
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
# File 'lib/ejabberd_http_client/api/session_api.rb', line 460

def get_status_list_host_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.get_status_list_host ...'
  end
  # resource path
  local_var_path = '/api/status_list_host'

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

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

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

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

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

List of logged users with this status.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

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



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
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
# File 'lib/ejabberd_http_client/api/session_api.rb', line 398

def get_status_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.get_status_list ...'
  end
  # resource path
  local_var_path = '/api/status_list'

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

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

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

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

#get_status_num(opts = {}) ⇒ GetStatusNum200Response

Number of logged users with a specific status.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



513
514
515
516
# File 'lib/ejabberd_http_client/api/session_api.rb', line 513

def get_status_num(opts = {})
  data, _status_code, _headers = get_status_num_with_http_info(opts)
  data
end

#get_status_num_host(opts = {}) ⇒ GetStatusNum200Response

Number of logged users with a specific status in a host.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



575
576
577
578
# File 'lib/ejabberd_http_client/api/session_api.rb', line 575

def get_status_num_host(opts = {})
  data, _status_code, _headers = get_status_num_host_with_http_info(opts)
  data
end

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

Number of logged users with a specific status in a host.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    GetStatusNum200Response data, response status code and response headers



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
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/ejabberd_http_client/api/session_api.rb', line 584

def get_status_num_host_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.get_status_num_host ...'
  end
  # resource path
  local_var_path = '/api/status_num_host'

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

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

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

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

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

Number of logged users with a specific status.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    GetStatusNum200Response data, response status code and response headers



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

def get_status_num_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.get_status_num ...'
  end
  # resource path
  local_var_path = '/api/status_num'

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

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

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

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

#get_user_sessions_info(opts = {}) ⇒ Array<GetUserSessionsInfo200ResponseInner>

Get information about all sessions of a user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



637
638
639
640
# File 'lib/ejabberd_http_client/api/session_api.rb', line 637

def get_user_sessions_info(opts = {})
  data, _status_code, _headers = get_user_sessions_info_with_http_info(opts)
  data
end

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

Get information about all sessions of a user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
# File 'lib/ejabberd_http_client/api/session_api.rb', line 646

def get_user_sessions_info_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.get_user_sessions_info ...'
  end
  # resource path
  local_var_path = '/api/user_sessions_info'

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

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

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

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

#kick_session(kick_session_request, opts = {}) ⇒ nil

Kick a user session.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


699
700
701
702
# File 'lib/ejabberd_http_client/api/session_api.rb', line 699

def kick_session(kick_session_request, opts = {})
  kick_session_with_http_info(kick_session_request, opts)
  nil
end

#kick_session_with_http_info(kick_session_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Kick a user session.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/ejabberd_http_client/api/session_api.rb', line 708

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

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

#kick_user(get_last_request, opts = {}) ⇒ KickUser200Response

Disconnect user’s active sessions.

Parameters:

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

    the optional parameters

Returns:



763
764
765
766
# File 'lib/ejabberd_http_client/api/session_api.rb', line 763

def kick_user(get_last_request, opts = {})
  data, _status_code, _headers = kick_user_with_http_info(get_last_request, opts)
  data
end

#kick_user_with_http_info(get_last_request, opts = {}) ⇒ Array<(KickUser200Response, Integer, Hash)>

Disconnect user&#39;s active sessions.

Parameters:

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

    the optional parameters

Returns:

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

    KickUser200Response data, response status code and response headers



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
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
# File 'lib/ejabberd_http_client/api/session_api.rb', line 772

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

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

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

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

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

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

List a user’s connected resources.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<String>)


829
830
831
832
# File 'lib/ejabberd_http_client/api/session_api.rb', line 829

def list_user_resources(opts = {})
  data, _status_code, _headers = list_user_resources_with_http_info(opts)
  data
end

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

List a user&#39;s connected resources.

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



838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
# File 'lib/ejabberd_http_client/api/session_api.rb', line 838

def list_user_resources_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionApi.list_user_resources ...'
  end
  # resource path
  local_var_path = '/api/user_resources'

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

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

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

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

#resource_num(opts = {}) ⇒ ResourceNum200Response

Resource string of a session number.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



891
892
893
894
# File 'lib/ejabberd_http_client/api/session_api.rb', line 891

def resource_num(opts = {})
  data, _status_code, _headers = resource_num_with_http_info(opts)
  data
end

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

Resource string of a session number.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    ResourceNum200Response data, response status code and response headers



900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
# File 'lib/ejabberd_http_client/api/session_api.rb', line 900

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

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

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

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

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

#set_presence(opts = {}) ⇒ Integer

Set presence of a session.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Integer)


953
954
955
956
# File 'lib/ejabberd_http_client/api/session_api.rb', line 953

def set_presence(opts = {})
  data, _status_code, _headers = set_presence_with_http_info(opts)
  data
end

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

Set presence of a session.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Integer data, response status code and response headers



962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File 'lib/ejabberd_http_client/api/session_api.rb', line 962

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

  # 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_presence_request'])

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

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

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