Class: EveOnline::ESI::PublicContract
- Defined in:
- lib/eve_online/esi/public_contract.rb
Constant Summary collapse
- API_PATH =
"/v1/contracts/public/items/%<contract_id>s/"
Constants inherited from Base
Instance Attribute Summary collapse
-
#contract_id ⇒ Object
readonly
Returns the value of attribute contract_id.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Attributes inherited from Base
#_open_timeout, #_read_timeout, #_write_timeout, #adapter, #language, #middlewares, #token
Instance Method Summary collapse
- #additional_query_params ⇒ Object
-
#initialize(options) ⇒ PublicContract
constructor
A new instance of PublicContract.
- #items ⇒ Object
- #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=, #query, #read_timeout, #read_timeout=, #request_id, #resource, #response, #total_pages, #uri, #url, #user_agent, #write_timeout, #write_timeout=
Constructor Details
#initialize(options) ⇒ PublicContract
Returns a new instance of PublicContract.
10 11 12 13 14 15 |
# File 'lib/eve_online/esi/public_contract.rb', line 10 def initialize() super @contract_id = .fetch(:contract_id) @page = .fetch(:page, 1) end |
Instance Attribute Details
#contract_id ⇒ Object (readonly)
Returns the value of attribute contract_id.
8 9 10 |
# File 'lib/eve_online/esi/public_contract.rb', line 8 def contract_id @contract_id end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
8 9 10 |
# File 'lib/eve_online/esi/public_contract.rb', line 8 def page @page end |
Instance Method Details
#additional_query_params ⇒ Object
31 32 33 |
# File 'lib/eve_online/esi/public_contract.rb', line 31 def additional_query_params [:page] end |
#items ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/eve_online/esi/public_contract.rb', line 17 def items @items ||= begin output = [] response.each do |item| output << Models::PublicContractItem.new(item) end output end end |
#path ⇒ Object
35 36 37 |
# File 'lib/eve_online/esi/public_contract.rb', line 35 def path format(API_PATH, contract_id: contract_id) end |
#scope ⇒ Object
28 29 |
# File 'lib/eve_online/esi/public_contract.rb', line 28 def scope end |