Class: EveOnline::ESI::CharacterAssetsNames
- Inherits:
-
Base
- Object
- Base
- EveOnline::ESI::CharacterAssetsNames
show all
- Defined in:
- lib/eve_online/esi/character_assets_names.rb
Constant Summary
collapse
- API_PATH =
"/v1/characters/%<character_id>s/assets/names/"
Constants inherited
from Base
Base::API_HOST
Instance Attribute Summary collapse
Attributes inherited from Base
#_open_timeout, #_read_timeout, #_write_timeout, #adapter, #language, #middlewares, #token
Instance Method Summary
collapse
Methods inherited from Base
#add_middleware, #additional_query_params, #base_query_params, #connection, #error_limit_remain, #error_limit_reset, #open_timeout, #open_timeout=, #page, #query, #read_timeout, #read_timeout=, #request_id, #resource, #response, #total_pages, #uri, #url, #user_agent, #write_timeout, #write_timeout=
Constructor Details
10
11
12
13
14
15
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 10
def initialize(options)
super
@character_id = options.fetch(:character_id)
@item_ids = options.fetch(:item_ids)
end
|
Instance Attribute Details
#character_id ⇒ Object
Returns the value of attribute character_id.
8
9
10
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 8
def character_id
@character_id
end
|
#item_ids ⇒ Object
Returns the value of attribute item_ids.
8
9
10
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 8
def item_ids
@item_ids
end
|
Instance Method Details
#assets_names ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 17
def assets_names
@assets_names ||=
begin
output = []
response.each do |asset_name|
output << Models::AssetName.new(asset_name)
end
output
end
end
|
#http_method ⇒ Object
28
29
30
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 28
def http_method
:post
end
|
#path ⇒ Object
40
41
42
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 40
def path
format(API_PATH, character_id: character_id)
end
|
#payload ⇒ Object
32
33
34
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 32
def payload
item_ids.to_json
end
|
#scope ⇒ Object
36
37
38
|
# File 'lib/eve_online/esi/character_assets_names.rb', line 36
def scope
"esi-assets.read_assets.v1"
end
|