Class: EveOnline::ESI::CharacterClones
- Inherits:
-
Base
- Object
- Base
- EveOnline::ESI::CharacterClones
show all
- Defined in:
- lib/eve_online/esi/character_clones.rb
Constant Summary
collapse
- API_ENDPOINT =
'https://esi.tech.ccp.is/v3/characters/%<character_id>s/clones/?datasource=tranquility'
Instance Attribute Summary collapse
Attributes inherited from Base
#parser, #token
Instance Method Summary
collapse
Methods inherited from Base
#content, #response, #user_agent
Constructor Details
Returns a new instance of CharacterClones.
10
11
12
13
14
|
# File 'lib/eve_online/esi/character_clones.rb', line 10
def initialize(options)
super
@character_id = options[:character_id]
end
|
Instance Attribute Details
#character_id ⇒ Object
Returns the value of attribute character_id.
8
9
10
|
# File 'lib/eve_online/esi/character_clones.rb', line 8
def character_id
@character_id
end
|
Instance Method Details
#home_location ⇒ Object
22
23
24
|
# File 'lib/eve_online/esi/character_clones.rb', line 22
def home_location
Models::HomeLocation.new(response['home_location'])
end
|
#jump_clones ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/eve_online/esi/character_clones.rb', line 27
def jump_clones
output = []
response['jump_clones'].each do |jump_clone|
output << Models::JumpClone.new(jump_clone)
end
output
end
|
#last_clone_jump_date ⇒ Object
16
17
18
19
20
|
# File 'lib/eve_online/esi/character_clones.rb', line 16
def last_clone_jump_date
last_clone_jump_date = response['last_clone_jump_date']
parse_datetime_with_timezone(last_clone_jump_date) if last_clone_jump_date
end
|
#last_station_change_date ⇒ Object
36
37
38
39
40
|
# File 'lib/eve_online/esi/character_clones.rb', line 36
def last_station_change_date
last_station_change_date = response['last_station_change_date']
parse_datetime_with_timezone(last_station_change_date) if last_station_change_date
end
|
#scope ⇒ Object
42
43
44
|
# File 'lib/eve_online/esi/character_clones.rb', line 42
def scope
'esi-clones.read_clones.v1'
end
|
#url ⇒ Object
46
47
48
|
# File 'lib/eve_online/esi/character_clones.rb', line 46
def url
format(API_ENDPOINT, character_id: character_id)
end
|