Class: EjabberdHttpClient::ServerApi
- Inherits:
-
Object
- Object
- EjabberdHttpClient::ServerApi
- Defined in:
- lib/ejabberd_http_client/api/server_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#clear_cache(opts = {}) ⇒ nil
Clear database cache on all nodes.
-
#clear_cache_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Clear database cache on all nodes.
-
#gc(opts = {}) ⇒ Integer
Force full garbage collection.
-
#gc_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Force full garbage collection.
-
#get_status(opts = {}) ⇒ String
Get status of the ejabberd server.
-
#get_status_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Get status of the ejabberd server.
-
#halt(opts = {}) ⇒ nil
Halt ejabberd abruptly with status code 1.
-
#halt_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Halt ejabberd abruptly with status code 1.
-
#initialize(api_client = ApiClient.default) ⇒ ServerApi
constructor
A new instance of ServerApi.
-
#registered_vhosts(opts = {}) ⇒ Array<String>
List all registered vhosts in SERVER.
-
#registered_vhosts_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List all registered vhosts in SERVER.
-
#restart(opts = {}) ⇒ Integer
Restart ejabberd gracefully.
-
#restart_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Restart ejabberd gracefully.
-
#stop_ejabberd(opts = {}) ⇒ Integer
Stop Ejabberd gracefully.
-
#stop_ejabberd_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Stop Ejabberd gracefully.
-
#stop_kindly(opts = {}) ⇒ Integer
Inform users and rooms, wait, and stop the server.
-
#stop_kindly_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Inform users and rooms, wait, and stop the server.
-
#update_list(opts = {}) ⇒ Array<String>
List modified modules that can be updated.
-
#update_list_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List modified modules that can be updated.
-
#update_module(opts = {}) ⇒ String
Update the given module or use the keyword ‘all’.
-
#update_module_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Update the given module or use the keyword 'all'.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#clear_cache(opts = {}) ⇒ nil
Clear database cache on all nodes.
25 26 27 28 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 25 def clear_cache(opts = {}) clear_cache_with_http_info(opts) nil end |
#clear_cache_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Clear database cache on all nodes.
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 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 33 def clear_cache_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.clear_cache ...' end # resource path local_var_path = '/api/clear_cache' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.clear_cache", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#clear_cache\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#gc(opts = {}) ⇒ Integer
Force full garbage collection.
78 79 80 81 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 78 def gc(opts = {}) data, _status_code, _headers = gc_with_http_info(opts) data end |
#gc_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Force full garbage collection.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 86 def gc_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.gc ...' end # resource path local_var_path = '/api/gc' # 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] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.gc", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#gc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_status(opts = {}) ⇒ String
Get status of the ejabberd server.
133 134 135 136 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 133 def get_status(opts = {}) data, _status_code, _headers = get_status_with_http_info(opts) data end |
#get_status_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Get status of the ejabberd server.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 141 def get_status_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.get_status ...' end # resource path local_var_path = '/api/status' # 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] || 'String' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.get_status", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#get_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#halt(opts = {}) ⇒ nil
Halt ejabberd abruptly with status code 1.
188 189 190 191 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 188 def halt(opts = {}) halt_with_http_info(opts) nil end |
#halt_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Halt ejabberd abruptly with status code 1.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 196 def halt_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.halt ...' end # resource path local_var_path = '/api/halt' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.halt", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#halt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#registered_vhosts(opts = {}) ⇒ Array<String>
List all registered vhosts in SERVER.
241 242 243 244 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 241 def registered_vhosts(opts = {}) data, _status_code, _headers = registered_vhosts_with_http_info(opts) data end |
#registered_vhosts_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List all registered vhosts in SERVER.
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 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 249 def registered_vhosts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.registered_vhosts ...' end # resource path local_var_path = '/api/registered_vhosts' # 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] || [] = opts.merge( :operation => :"ServerApi.registered_vhosts", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#registered_vhosts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#restart(opts = {}) ⇒ Integer
Restart ejabberd gracefully.
296 297 298 299 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 296 def restart(opts = {}) data, _status_code, _headers = restart_with_http_info(opts) data end |
#restart_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Restart ejabberd gracefully.
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 345 346 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 304 def restart_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.restart ...' end # resource path local_var_path = '/api/restart' # 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] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.restart", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#restart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop_ejabberd(opts = {}) ⇒ Integer
Stop Ejabberd gracefully.
351 352 353 354 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 351 def stop_ejabberd(opts = {}) data, _status_code, _headers = stop_ejabberd_with_http_info(opts) data end |
#stop_ejabberd_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Stop Ejabberd gracefully.
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 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 359 def stop_ejabberd_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.stop_ejabberd ...' end # resource path local_var_path = '/api/stop' # 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] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.stop_ejabberd", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#stop_ejabberd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop_kindly(opts = {}) ⇒ Integer
Inform users and rooms, wait, and stop the server.
407 408 409 410 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 407 def stop_kindly(opts = {}) data, _status_code, _headers = stop_kindly_with_http_info(opts) data end |
#stop_kindly_with_http_info(opts = {}) ⇒ Array<(Integer, Integer, Hash)>
Inform users and rooms, wait, and stop the server.
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 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 416 def stop_kindly_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.stop_kindly ...' end # resource path local_var_path = '/api/stop_kindly' # 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[:'stop_kindly_request']) # return_type return_type = opts[:debug_return_type] || 'Integer' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.stop_kindly", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#stop_kindly\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_list(opts = {}) ⇒ Array<String>
List modified modules that can be updated.
468 469 470 471 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 468 def update_list(opts = {}) data, _status_code, _headers = update_list_with_http_info(opts) data end |
#update_list_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List modified modules that can be updated.
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 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 476 def update_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.update_list ...' end # resource path local_var_path = '/api/update_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']) # 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] || [] = opts.merge( :operation => :"ServerApi.update_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#update_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_module(opts = {}) ⇒ String
Update the given module or use the keyword ‘all’.
524 525 526 527 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 524 def update_module(opts = {}) data, _status_code, _headers = update_module_with_http_info(opts) data end |
#update_module_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Update the given module or use the keyword 'all'.
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 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/ejabberd_http_client/api/server_api.rb', line 533 def update_module_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServerApi.update_module ...' end # resource path local_var_path = '/api/update' # 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[:'check_module_request']) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"ServerApi.update_module", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServerApi#update_module\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |