All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
get_last | POST /api/get_last | Get last activity information. |
set_last | POST /api/set_last | Set last activity information. |
get_last(get_last_request)
Get last activity information.
require 'time'
require 'ejabberd_http_client'
api_instance = EjabberdHttpClient::LastApi.new
get_last_request = EjabberdHttpClient::GetLastRequest.new # GetLastRequest |
begin
# Get last activity information.
result = api_instance.get_last(get_last_request)
p result
rescue EjabberdHttpClient::ApiError => e
puts "Error when calling LastApi->get_last: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_last_with_http_info(get_last_request)
begin
# Get last activity information.
data, status_code, headers = api_instance.get_last_with_http_info(get_last_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetLast200Response>
rescue EjabberdHttpClient::ApiError => e
puts "Error when calling LastApi->get_last_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
get_last_request | GetLastRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
Integer set_last(opts)
Set last activity information.
require 'time'
require 'ejabberd_http_client'
api_instance = EjabberdHttpClient::LastApi.new
opts = {
set_last_request: EjabberdHttpClient::SetLastRequest.new # SetLastRequest |
}
begin
# Set last activity information.
result = api_instance.set_last(opts)
p result
rescue EjabberdHttpClient::ApiError => e
puts "Error when calling LastApi->set_last: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(Integer, Integer, Hash)> set_last_with_http_info(opts)
begin
# Set last activity information.
data, status_code, headers = api_instance.set_last_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => Integer
rescue EjabberdHttpClient::ApiError => e
puts "Error when calling LastApi->set_last_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
set_last_request | SetLastRequest | [optional] |
Integer
No authorization required
- Content-Type: application/json
- Accept: application/json