Class: ESI::CharacterApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-esi/api/character_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CharacterApi

Returns a new instance of CharacterApi.



19
20
21
# File 'lib/ruby-esi/api/character_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/ruby-esi/api/character_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_characters_character_id(character_id, x_compatibility_date, opts = {}) ⇒ CharactersCharacterIdGet

Get character’s public information Public information about a character

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



32
33
34
35
# File 'lib/ruby-esi/api/character_api.rb', line 32

def get_characters_character_id(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_agents_research(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdAgentsResearchGetInner>

Get agents research Return a list of agents research information for a character. The formula for finding the current research points with an agent is: currentPoints = remainderPoints + pointsPerDay * days(currentTime - researchStartDate)

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



123
124
125
126
# File 'lib/ruby-esi/api/character_api.rb', line 123

def get_characters_character_id_agents_research(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_agents_research_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_agents_research_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdAgentsResearchGetInner>, Integer, Hash)>

Get agents research Return a list of agents research information for a character. The formula for finding the current research points with an agent is: currentPoints &#x3D; remainderPoints + pointsPerDay * days(currentTime - researchStartDate)

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



138
139
140
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/ruby-esi/api/character_api.rb', line 138

def get_characters_character_id_agents_research_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_agents_research ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_agents_research"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_agents_research"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/agents_research'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_agents_research",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_agents_research\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_blueprints(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdBlueprintsGetInner>

Get blueprints Return a list of blueprints the character owns

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)
  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



215
216
217
218
# File 'lib/ruby-esi/api/character_api.rb', line 215

def get_characters_character_id_blueprints(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_blueprints_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_blueprints_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdBlueprintsGetInner>, Integer, Hash)>

Get blueprints Return a list of blueprints the character owns

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)
  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
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
292
293
294
295
296
297
298
299
300
# File 'lib/ruby-esi/api/character_api.rb', line 231

def get_characters_character_id_blueprints_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_blueprints ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_blueprints"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_blueprints"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CharacterApi.get_characters_character_id_blueprints, must be greater than or equal to 1.'
  end

  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/blueprints'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_blueprints",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_blueprints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_corporationhistory(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdCorporationhistoryGetInner>

Get corporation history Get a list of all the corporations a character has been a member of

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



312
313
314
315
# File 'lib/ruby-esi/api/character_api.rb', line 312

def get_characters_character_id_corporationhistory(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_corporationhistory_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_corporationhistory_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdCorporationhistoryGetInner>, Integer, Hash)>

Get corporation history Get a list of all the corporations a character has been a member of

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



327
328
329
330
331
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
384
385
386
387
388
389
390
391
# File 'lib/ruby-esi/api/character_api.rb', line 327

def get_characters_character_id_corporationhistory_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_corporationhistory ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_corporationhistory"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_corporationhistory"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/corporationhistory'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_corporationhistory",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_corporationhistory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_fatigue(character_id, x_compatibility_date, opts = {}) ⇒ CharactersCharacterIdFatigueGet

Get jump fatigue Return a character’s jump activation and fatigue information

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



403
404
405
406
# File 'lib/ruby-esi/api/character_api.rb', line 403

def get_characters_character_id_fatigue(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_fatigue_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_fatigue_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(CharactersCharacterIdFatigueGet, Integer, Hash)>

Get jump fatigue Return a character&#39;s jump activation and fatigue information

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



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
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/ruby-esi/api/character_api.rb', line 418

def get_characters_character_id_fatigue_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_fatigue ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_fatigue"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_fatigue"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/fatigue'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_fatigue",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_fatigue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_medals(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdMedalsGetInner>

Get medals Return a list of medals the character has

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



494
495
496
497
# File 'lib/ruby-esi/api/character_api.rb', line 494

def get_characters_character_id_medals(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_medals_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_medals_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdMedalsGetInner>, Integer, Hash)>

Get medals Return a list of medals the character has

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



509
510
511
512
513
514
515
516
517
518
519
520
521
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
570
571
572
573
# File 'lib/ruby-esi/api/character_api.rb', line 509

def get_characters_character_id_medals_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_medals ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_medals"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_medals"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/medals'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_medals",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_medals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_notifications(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdNotificationsGetInner>

Get character notifications Return character notifications

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



585
586
587
588
# File 'lib/ruby-esi/api/character_api.rb', line 585

def get_characters_character_id_notifications(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_notifications_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_notifications_contacts(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdNotificationsContactsGetInner>

Get new contact notifications Return notifications about having been added to someone’s contact list

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



676
677
678
679
# File 'lib/ruby-esi/api/character_api.rb', line 676

def get_characters_character_id_notifications_contacts(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_notifications_contacts_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_notifications_contacts_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdNotificationsContactsGetInner>, Integer, Hash)>

Get new contact notifications Return notifications about having been added to someone&#39;s contact list

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
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
# File 'lib/ruby-esi/api/character_api.rb', line 691

def get_characters_character_id_notifications_contacts_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_notifications_contacts ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_notifications_contacts"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_notifications_contacts"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/notifications/contacts'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_notifications_contacts",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_notifications_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_notifications_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdNotificationsGetInner>, Integer, Hash)>

Get character notifications Return character notifications

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



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
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'lib/ruby-esi/api/character_api.rb', line 600

def get_characters_character_id_notifications_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_notifications ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_notifications"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_notifications"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/notifications'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_notifications",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_portrait(character_id, x_compatibility_date, opts = {}) ⇒ CharactersCharacterIdPortraitGet

Get character portraits Get portrait urls for a character This route expires daily at 11:05

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



767
768
769
770
# File 'lib/ruby-esi/api/character_api.rb', line 767

def get_characters_character_id_portrait(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_portrait_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_portrait_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(CharactersCharacterIdPortraitGet, Integer, Hash)>

Get character portraits Get portrait urls for a character This route expires daily at 11:05

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



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
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
# File 'lib/ruby-esi/api/character_api.rb', line 782

def get_characters_character_id_portrait_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_portrait ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_portrait"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_portrait"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/portrait'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_portrait",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_portrait\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_roles(character_id, x_compatibility_date, opts = {}) ⇒ CharactersCharacterIdRolesGet

Get character corporation roles Returns a character’s corporation roles

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



858
859
860
861
# File 'lib/ruby-esi/api/character_api.rb', line 858

def get_characters_character_id_roles(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_roles_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_roles_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(CharactersCharacterIdRolesGet, Integer, Hash)>

Get character corporation roles Returns a character&#39;s corporation roles

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
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
# File 'lib/ruby-esi/api/character_api.rb', line 873

def get_characters_character_id_roles_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_roles ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_roles"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_roles"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/roles'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_roles",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_standings(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdStandingsGetInner>

Get standings Return character standings from agents, NPC corporations, and factions

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



949
950
951
952
# File 'lib/ruby-esi/api/character_api.rb', line 949

def get_characters_character_id_standings(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_standings_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_standings_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdStandingsGetInner>, Integer, Hash)>

Get standings Return character standings from agents, NPC corporations, and factions

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



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
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
# File 'lib/ruby-esi/api/character_api.rb', line 964

def get_characters_character_id_standings_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_standings ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_standings"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_standings"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/standings'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_standings",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_standings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_titles(character_id, x_compatibility_date, opts = {}) ⇒ Array<CharactersCharacterIdTitlesGetInner>

Get character corporation titles Returns a character’s titles

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



1040
1041
1042
1043
# File 'lib/ruby-esi/api/character_api.rb', line 1040

def get_characters_character_id_titles(character_id, x_compatibility_date, opts = {})
  data, _status_code, _headers = get_characters_character_id_titles_with_http_info(character_id, x_compatibility_date, opts)
  data
end

#get_characters_character_id_titles_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(Array<CharactersCharacterIdTitlesGetInner>, Integer, Hash)>

Get character corporation titles Returns a character&#39;s titles

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
# File 'lib/ruby-esi/api/character_api.rb', line 1055

def get_characters_character_id_titles_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id_titles ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id_titles"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id_titles"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/titles'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id_titles",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id_titles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_characters_character_id_with_http_info(character_id, x_compatibility_date, opts = {}) ⇒ Array<(CharactersCharacterIdGet, Integer, Hash)>

Get character&#39;s public information Public information about a character

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

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

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:

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

    CharactersCharacterIdGet data, response status code and response headers



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
78
79
80
81
82
83
84
85
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
# File 'lib/ruby-esi/api/character_api.rb', line 47

def get_characters_character_id_with_http_info(character_id, x_compatibility_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.get_characters_character_id ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.get_characters_character_id"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.get_characters_character_id"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"CharacterApi.get_characters_character_id",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CharacterApi#get_characters_character_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_characters_affiliation(x_compatibility_date, request_body, opts = {}) ⇒ Array<CharactersAffiliationPostInner>

Character affiliation Bulk lookup of character IDs to corporation, alliance and faction

Parameters:

  • x_compatibility_date (Date)

    The compatibility date for the request.

  • request_body (Array<Integer>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:



1131
1132
1133
1134
# File 'lib/ruby-esi/api/character_api.rb', line 1131

def post_characters_affiliation(x_compatibility_date, request_body, opts = {})
  data, _status_code, _headers = post_characters_affiliation_with_http_info(x_compatibility_date, request_body, opts)
  data
end

#post_characters_affiliation_with_http_info(x_compatibility_date, request_body, opts = {}) ⇒ Array<(Array<CharactersAffiliationPostInner>, Integer, Hash)>

Character affiliation Bulk lookup of character IDs to corporation, alliance and faction

Parameters:

  • x_compatibility_date (Date)

    The compatibility date for the request.

  • request_body (Array<Integer>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:

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

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



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
# File 'lib/ruby-esi/api/character_api.rb', line 1146

def post_characters_affiliation_with_http_info(x_compatibility_date, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.post_characters_affiliation ...'
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.post_characters_affiliation"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling CharacterApi.post_characters_affiliation"
  end
  if @api_client.config.client_side_validation && request_body.length > 1000
    fail ArgumentError, 'invalid value for "request_body" when calling CharacterApi.post_characters_affiliation, number of items must be less than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && request_body.length < 1
    fail ArgumentError, 'invalid value for "request_body" when calling CharacterApi.post_characters_affiliation, number of items must be greater than or equal to 1.'
  end

  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/affiliation'

  # 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']) unless header_params['Accept']
  # 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
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

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

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

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

#post_characters_character_id_cspa(character_id, x_compatibility_date, request_body, opts = {}) ⇒ Float

Calculate a CSPA charge cost Takes a source character ID in the url and a set of target character ID’s in the body, returns a CSPA charge cost

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

  • request_body (Array<Integer>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:

  • (Float)


1236
1237
1238
1239
# File 'lib/ruby-esi/api/character_api.rb', line 1236

def post_characters_character_id_cspa(character_id, x_compatibility_date, request_body, opts = {})
  data, _status_code, _headers = post_characters_character_id_cspa_with_http_info(character_id, x_compatibility_date, request_body, opts)
  data
end

#post_characters_character_id_cspa_with_http_info(character_id, x_compatibility_date, request_body, opts = {}) ⇒ Array<(Float, Integer, Hash)>

Calculate a CSPA charge cost Takes a source character ID in the url and a set of target character ID&#39;s in the body, returns a CSPA charge cost

Parameters:

  • character_id (Integer)

    The ID of the character

  • x_compatibility_date (Date)

    The compatibility date for the request.

  • request_body (Array<Integer>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :accept_language (String)

    The language to use for the response. (default to ‘en’)

  • :if_none_match (String)

    The ETag of the previous request. A 304 will be returned if this matches the current ETag.

  • :x_tenant (String)

    The tenant ID for the request. (default to ‘tranquility’)

  • :if_modified_since (String)

    The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.

Returns:

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

    Float data, response status code and response headers



1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
# File 'lib/ruby-esi/api/character_api.rb', line 1252

def post_characters_character_id_cspa_with_http_info(character_id, x_compatibility_date, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CharacterApi.post_characters_character_id_cspa ...'
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling CharacterApi.post_characters_character_id_cspa"
  end
  # verify the required parameter 'x_compatibility_date' is set
  if @api_client.config.client_side_validation && x_compatibility_date.nil?
    fail ArgumentError, "Missing the required parameter 'x_compatibility_date' when calling CharacterApi.post_characters_character_id_cspa"
  end
  # verify enum value
  allowable_values = ["2020-01-01"]
  if @api_client.config.client_side_validation && !allowable_values.include?(x_compatibility_date)
    fail ArgumentError, "invalid value for \"x_compatibility_date\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling CharacterApi.post_characters_character_id_cspa"
  end
  if @api_client.config.client_side_validation && request_body.length > 100
    fail ArgumentError, 'invalid value for "request_body" when calling CharacterApi.post_characters_character_id_cspa, number of items must be less than or equal to 100.'
  end

  if @api_client.config.client_side_validation && request_body.length < 1
    fail ArgumentError, 'invalid value for "request_body" when calling CharacterApi.post_characters_character_id_cspa, number of items must be greater than or equal to 1.'
  end

  allowable_values = ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"]
  if @api_client.config.client_side_validation && opts[:'accept_language'] && !allowable_values.include?(opts[:'accept_language'])
    fail ArgumentError, "invalid value for \"accept_language\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/characters/{character_id}/cspa'.sub('{' + 'character_id' + '}', CGI.escape(character_id.to_s))

  # 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']) unless header_params['Accept']
  # 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
  header_params[:'X-Compatibility-Date'] = x_compatibility_date
  header_params[:'Accept-Language'] = opts[:'accept_language'] if !opts[:'accept_language'].nil?
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
  header_params[:'X-Tenant'] = opts[:'x_tenant'] if !opts[:'x_tenant'].nil?
  header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil?

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

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

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

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