Sha256: ddec0c605bb50041a8c08067ab1cf9c33660002bcdb4431f210dbf166e27c4c8
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
module EveOnline module Characters # https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/character/char_assetlist.html class AssetList < BaseXML API_ENDPOINT = 'https://api.eveonline.com/char/AssetList.xml.aspx'.freeze ACCESS_MASK = 2 attr_reader :key_id, :v_code, :character_id, :flat def initialize(key_id, v_code, character_id, flat = 1) super() @key_id = key_id @v_code = v_code @character_id = character_id @flat = flat end def assets case row when Hash [Item.new(row)] when Array output = [] row.each do |item| output << Item.new(item) end output else raise ArgumentError end end memoize :assets def url "#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }&flat=#{ flat }" end private def rowset result.fetch('rowset') end memoize :rowset def row rowset.fetch('row') end memoize :row end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eve_online-0.9.0 | lib/eve_online/characters/asset_list.rb |