Class: EveOnline::ESI::MarketHistory
- Defined in:
- lib/eve_online/esi/market_history.rb
Constant Summary collapse
- API_PATH =
"/v1/markets/%<region_id>s/history/"
Constants inherited from Base
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
#_open_timeout, #_read_timeout, #_write_timeout, #adapter, #language, #middlewares, #token
Instance Method Summary collapse
- #additional_query_params ⇒ Object
- #history ⇒ Object
-
#initialize(options) ⇒ MarketHistory
constructor
A new instance of MarketHistory.
- #path ⇒ Object
- #scope ⇒ Object
Methods inherited from Base
#add_middleware, #base_query_params, #connection, #error_limit_remain, #error_limit_reset, #http_method, #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
#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 = .fetch(:region_id) @type_id = .fetch(: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
#additional_query_params ⇒ Object
31 32 33 |
# File 'lib/eve_online/esi/market_history.rb', line 31 def additional_query_params [:type_id] end |
#history ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/eve_online/esi/market_history.rb', line 17 def history @history ||= begin output = [] response.each do |history| output << Models::MarketHistory.new(history) end output end end |
#path ⇒ Object
35 36 37 |
# File 'lib/eve_online/esi/market_history.rb', line 35 def path format(API_PATH, region_id: region_id) end |
#scope ⇒ Object
28 29 |
# File 'lib/eve_online/esi/market_history.rb', line 28 def scope end |