Class: EveOnline::ESI::CharacterAssets
- Defined in:
- lib/eve_online/esi/character_assets.rb
Constant Summary collapse
- API_ENDPOINT =
'https://esi.tech.ccp.is/v3/characters/%<character_id>s/assets/?datasource=tranquility&page=1'
Instance Attribute Summary collapse
-
#character_id ⇒ Object
readonly
Returns the value of attribute character_id.
Attributes inherited from Base
Instance Method Summary collapse
- #assets ⇒ Object
-
#initialize(options) ⇒ CharacterAssets
constructor
A new instance of CharacterAssets.
- #scope ⇒ Object
- #url ⇒ Object
Methods inherited from Base
#content, #response, #user_agent
Constructor Details
#initialize(options) ⇒ CharacterAssets
Returns a new instance of CharacterAssets.
10 11 12 13 14 |
# File 'lib/eve_online/esi/character_assets.rb', line 10 def initialize() super @character_id = [:character_id] end |
Instance Attribute Details
#character_id ⇒ Object (readonly)
Returns the value of attribute character_id.
8 9 10 |
# File 'lib/eve_online/esi/character_assets.rb', line 8 def character_id @character_id end |
Instance Method Details
#assets ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/eve_online/esi/character_assets.rb', line 16 def assets output = [] response.each do |asset| output << Models::Asset.new(asset) end output end |
#scope ⇒ Object
25 26 27 |
# File 'lib/eve_online/esi/character_assets.rb', line 25 def scope 'esi-assets.read_assets.v1' end |
#url ⇒ Object
29 30 31 |
# File 'lib/eve_online/esi/character_assets.rb', line 29 def url format(API_ENDPOINT, character_id: character_id) end |