Class: EveOnline::ESI::Resources::LocationResources

Inherits:
Resource
  • Object
show all
Defined in:
lib/eve_online/esi/resources/location_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

#online(id:) ⇒ Object

Parameters:

  • id (Integer)

    A character ID



15
16
17
18
19
# File 'lib/eve_online/esi/resources/location_resources.rb', line 15

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

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

#ship(id:) ⇒ Object

Parameters:

  • id (Integer)

    A character ID



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

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

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