Class: Greeve::Character::ContractBids

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

Overview

Bids that have been placed on the character's auctions.

Attributes collapse

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 = {}) ⇒ ContractBids

Returns a new instance of ContractBids

Parameters:

  • character_id (Integer)

    EVE character ID



20
21
22
23
# File 'lib/greeve/character/contract_bids.rb', line 20

def initialize(character_id, opts = {})
  opts[:query_params] = { "characterID" => character_id }
  super(opts)
end

Instance Method Details

#bid_listGreeve::Rowset

Parameters:

  • amount (BigDecimal)
  • date_bid (Time)
  • bidder_id (Integer)
  • contract_id (Integer)
  • bid_id (Integer)

Returns:



11
12
13
14
15
16
17
# File 'lib/greeve/character/contract_bids.rb', line 11

rowset :bid_list, xpath: "eveapi/result/rowset[@name='bidList']" do
  attribute :amount,      xpath: "@amount",     type: :numeric
  attribute :date_bid,    xpath: "@dateBid",    type: :datetime
  attribute :bidder_id,   xpath: "@bidderID",   type: :integer
  attribute :contract_id, xpath: "@contractID", type: :integer
  attribute :bid_id,      xpath: "@bidID",      type: :integer
end