Sha256: b51435a515192d19ec5516de3b215ca069fc73bc278770b3fc91833094377db4

Contents?: true

Size: 976 Bytes

Versions: 1

Compression:

Stored size: 976 Bytes

Contents

require_relative "../base_item"

module Greeve
  module Character
    # Bids that have been placed on the character's auctions.
    #
    # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contractbids.html
    class ContractBids < Greeve::BaseItem
      endpoint "char/ContractBids"

      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

      # @param character_id [Integer] EVE character ID
      def initialize(character_id, opts = {})
        opts[:query_params] = { "characterID" => character_id }
        super(opts)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
greeve-1.0.0 lib/greeve/character/contract_bids.rb