Class: EveOnline::ESI::MarketHistory
- Defined in:
- lib/eve_online/esi/market_history.rb
Constant Summary collapse
- API_ENDPOINT =
'https://esi.tech.ccp.is/v1/markets/%<region_id>s/history/?datasource=tranquility&type_id=%<type_id>s'
Instance Attribute Summary collapse
-
#region_id ⇒ Object
readonly
Returns the value of attribute region_id.
-
#type_id ⇒ Object
readonly
Returns the value of attribute type_id.
Attributes inherited from Base
Instance Method Summary collapse
- #history ⇒ Object
-
#initialize(options) ⇒ MarketHistory
constructor
A new instance of MarketHistory.
- #scope ⇒ Object
- #url ⇒ Object
Methods inherited from Base
#content, #response, #user_agent
Constructor Details
#initialize(options) ⇒ MarketHistory
Returns a new instance of MarketHistory.
10 11 12 13 14 15 |
# File 'lib/eve_online/esi/market_history.rb', line 10 def initialize() super @region_id = [:region_id] @type_id = [:type_id] end |
Instance Attribute Details
#region_id ⇒ Object (readonly)
Returns the value of attribute region_id.
8 9 10 |
# File 'lib/eve_online/esi/market_history.rb', line 8 def region_id @region_id end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
8 9 10 |
# File 'lib/eve_online/esi/market_history.rb', line 8 def type_id @type_id end |
Instance Method Details
#history ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/eve_online/esi/market_history.rb', line 17 def history output = [] response.each do |history| output << Models::MarketHistory.new(history) end output end |
#scope ⇒ Object
26 |
# File 'lib/eve_online/esi/market_history.rb', line 26 def scope; end |
#url ⇒ Object
28 29 30 |
# File 'lib/eve_online/esi/market_history.rb', line 28 def url format(API_ENDPOINT, region_id: region_id, type_id: type_id) end |