Class: Greeve::Character::MarketOrders

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/character/market_orders.rb

Overview

Character market orders.

Instance Method Summary collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(character_id, opts = {}) ⇒ MarketOrders

Returns a new instance of MarketOrders.

Parameters:

  • character_id (Integer)

    EVE character ID

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :order_id (Integer)

    Optional order ID of order to retrieve



32
33
34
35
36
37
38
39
# File 'lib/greeve/character/market_orders.rb', line 32

def initialize(character_id, opts = {})
  order_id = opts.delete(:order_id)

  opts[:query_params] = { "characterID" => character_id }
  opts[:query_params]["orderID"] = order_id if order_id

  super(opts)
end