class ESIClient::WarsApi
Attributes
Public Class Methods
# File lib/esi_client/api/wars_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
List wars Return a list of wars — This route is cached for up to 3600 seconds @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [Integer] :max_war_id Only return wars with ID smaller than this. @option opts [String] :user_agent Client identifier, takes precedence over headers @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent @return [Array<Integer>]
# File lib/esi_client/api/wars_api.rb, line 30 def get_wars(opts = {}) data, _status_code, _headers = get_wars_with_http_info(opts) data end
Get war information Return details about a war — This route is cached for up to 3600 seconds @param war_id ID for a war @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :user_agent Client identifier, takes precedence over headers @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent @return [GetWarsWarIdOk]
# File lib/esi_client/api/wars_api.rb, line 91 def get_wars_war_id(war_id, opts = {}) data, _status_code, _headers = get_wars_war_id_with_http_info(war_id, opts) data end
List kills for a war Return a list of kills related to a war — This route is cached for up to 3600 seconds @param war_id A valid war ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [Integer] :page Which page of results to return (default to 1) @option opts [String] :user_agent Client identifier, takes precedence over headers @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent @return [Array<GetWarsWarIdKillmails200Ok>]
# File lib/esi_client/api/wars_api.rb, line 156 def get_wars_war_id_killmails(war_id, opts = {}) data, _status_code, _headers = get_wars_war_id_killmails_with_http_info(war_id, opts) data end
List kills for a war Return a list of kills related to a war — This route is cached for up to 3600 seconds @param war_id A valid war ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [Integer] :page Which page of results to return @option opts [String] :user_agent Client identifier, takes precedence over headers @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent @return [Array<(Array<GetWarsWarIdKillmails200Ok>, Fixnum, Hash)>] Array<GetWarsWarIdKillmails200Ok> data, response status code and response headers
# File lib/esi_client/api/wars_api.rb, line 170 def get_wars_war_id_killmails_with_http_info(war_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WarsApi.get_wars_war_id_killmails ...' end # verify the required parameter 'war_id' is set if @api_client.config.client_side_validation && war_id.nil? fail ArgumentError, "Missing the required parameter 'war_id' when calling WarsApi.get_wars_war_id_killmails" end if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource']) fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity' end # resource path local_var_path = '/v1/wars/{war_id}/killmails/'.sub('{' + 'war_id' + '}', war_id.to_s) # query parameters query_params = {} query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-User-Agent'] = opts[:'x_user_agent'] if !opts[:'x_user_agent'].nil? # form parameters form_params = {} # http body (model) post_body = nil 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 => 'Array<GetWarsWarIdKillmails200Ok>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WarsApi#get_wars_war_id_killmails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get war information Return details about a war — This route is cached for up to 3600 seconds @param war_id ID for a war @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :user_agent Client identifier, takes precedence over headers @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent @return [Array<(GetWarsWarIdOk
, Fixnum, Hash)>] GetWarsWarIdOk
data, response status code and response headers
# File lib/esi_client/api/wars_api.rb, line 104 def get_wars_war_id_with_http_info(war_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WarsApi.get_wars_war_id ...' end # verify the required parameter 'war_id' is set if @api_client.config.client_side_validation && war_id.nil? fail ArgumentError, "Missing the required parameter 'war_id' when calling WarsApi.get_wars_war_id" end if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource']) fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity' end # resource path local_var_path = '/v1/wars/{war_id}/'.sub('{' + 'war_id' + '}', war_id.to_s) # query parameters query_params = {} query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil? query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-User-Agent'] = opts[:'x_user_agent'] if !opts[:'x_user_agent'].nil? # form parameters form_params = {} # http body (model) post_body = nil 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 => 'GetWarsWarIdOk') if @api_client.config.debugging @api_client.config.logger.debug "API called: WarsApi#get_wars_war_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List wars Return a list of wars — This route is cached for up to 3600 seconds @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [Integer] :max_war_id Only return wars with ID smaller than this. @option opts [String] :user_agent Client identifier, takes precedence over headers @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent @return [Array<(Array<Integer>, Fixnum, Hash)>] Array<Integer> data, response status code and response headers
# File lib/esi_client/api/wars_api.rb, line 43 def get_wars_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WarsApi.get_wars ...' end if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource']) fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity' end # resource path local_var_path = '/v1/wars/' # query parameters query_params = {} query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil? query_params[:'max_war_id'] = opts[:'max_war_id'] if !opts[:'max_war_id'].nil? query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-User-Agent'] = opts[:'x_user_agent'] if !opts[:'x_user_agent'].nil? # form parameters form_params = {} # http body (model) post_body = nil 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 => 'Array<Integer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WarsApi#get_wars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end