Class: ESI::StatusApi
- Inherits:
-
Object
- Object
- ESI::StatusApi
- Defined in:
- lib/ruby-esi/api/status_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_status(opts = {}) ⇒ GetStatusOk
Retrieve the uptime and player counts EVE Server status — Alternate route: ‘/dev/status/` Alternate route: `/legacy/status/` Alternate route: `/v1/status/` Alternate route: `/v2/status/` — This route is cached for up to 30 seconds.
-
#get_status_with_http_info(opts = {}) ⇒ Array<(GetStatusOk, Integer, Hash)>
Retrieve the uptime and player counts EVE Server status — Alternate route: `/dev/status/` Alternate route: `/legacy/status/` Alternate route: `/v1/status/` Alternate route: `/v2/status/` — This route is cached for up to 30 seconds.
-
#initialize(api_client = ApiClient.default) ⇒ StatusApi
constructor
A new instance of StatusApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ StatusApi
Returns a new instance of StatusApi.
16 17 18 |
# File 'lib/ruby-esi/api/status_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/ruby-esi/api/status_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#get_status(opts = {}) ⇒ GetStatusOk
Retrieve the uptime and player counts EVE Server status — Alternate route: ‘/dev/status/` Alternate route: `/legacy/status/` Alternate route: `/v1/status/` Alternate route: `/v2/status/` — This route is cached for up to 30 seconds
25 26 27 28 |
# File 'lib/ruby-esi/api/status_api.rb', line 25 def get_status(opts = {}) data, _status_code, _headers = get_status_with_http_info(opts) data end |
#get_status_with_http_info(opts = {}) ⇒ Array<(GetStatusOk, Integer, Hash)>
Retrieve the uptime and player counts EVE Server status — Alternate route: `/dev/status/` Alternate route: `/legacy/status/` Alternate route: `/v1/status/` Alternate route: `/v2/status/` — This route is cached for up to 30 seconds
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 |
# File 'lib/ruby-esi/api/status_api.rb', line 36 def get_status_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StatusApi.get_status ...' end if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility'].include?(opts[:'datasource']) fail ArgumentError, 'invalid value for "datasource", must be one of tranquility' end # resource path local_var_path = '/status/' # query parameters query_params = opts[:query_params] || {} query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetStatusOk' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: StatusApi#get_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |