Class: EveOnline::ESI::Resources::CharactersResources

Inherits:
Resource
  • Object
show all
Defined in:
lib/eve_online/esi/resources/characters_resources.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#default_headers, #get_request, #initialize, #post_request, #user_agent

Constructor Details

This class inherits a constructor from EveOnline::ESI::Resources::Resource

Instance Method Details

#blueprints(id:, page: 1) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the character

  • page (Integer) (defaults to: 1)

    Which page of results to return. Default: 1



16
17
18
19
20
21
22
23
# File 'lib/eve_online/esi/resources/characters_resources.rb', line 16

def blueprints(id:, page: 1)
  response = get_request("characters/#{id}/blueprints",
    params: {
      page: page
    })

  Collection.from_response(response, type: Models::Blueprint)
end

#corporation_history(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the character



26
27
28
29
30
# File 'lib/eve_online/esi/resources/characters_resources.rb', line 26

def corporation_history(id:)
  response = get_request("characters/#{id}/corporationhistory")

  Collection.from_response(response, type: Models::CharacterCorporationHistory)
end

#notifications(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the character



33
34
35
36
37
# File 'lib/eve_online/esi/resources/characters_resources.rb', line 33

def notifications(id:)
  response = get_request("characters/#{id}/notifications")

  Collection.from_response(response, type: Models::Notification)
end

#portraits(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the character



40
41
42
43
44
# File 'lib/eve_online/esi/resources/characters_resources.rb', line 40

def portraits(id:)
  response = get_request("characters/#{id}/portrait")

  Models::CharacterPortrait.new(attributes: response.body, headers: response.headers)
end

#retrieve(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the character



8
9
10
11
12
# File 'lib/eve_online/esi/resources/characters_resources.rb', line 8

def retrieve(id:)
  response = get_request("characters/#{id}")

  Models::Character.new(attributes: response.body, headers: response.headers)
end