Class: EveOnline::ESI::CharacterLocation

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/eve_online/esi/character_location.rb

Constant Summary collapse

API_PATH =
"/v2/characters/%<character_id>s/location/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ CharacterLocation

Returns a new instance of CharacterLocation.



14
15
16
17
18
# File 'lib/eve_online/esi/character_location.rb', line 14

def initialize(options)
  super

  @character_id = options.fetch(:character_id)
end

Instance Attribute Details

#character_idObject (readonly)

Returns the value of attribute character_id.



12
13
14
# File 'lib/eve_online/esi/character_location.rb', line 12

def character_id
  @character_id
end

Instance Method Details

#modelObject



23
24
25
# File 'lib/eve_online/esi/character_location.rb', line 23

def model
  @model ||= Models::CharacterLocation.new(response)
end

#pathObject



31
32
33
# File 'lib/eve_online/esi/character_location.rb', line 31

def path
  format(API_PATH, character_id: character_id)
end

#scopeObject



27
28
29
# File 'lib/eve_online/esi/character_location.rb', line 27

def scope
  "esi-location.read_location.v1"
end