Sha256: aca3e728d52307e255cf3f3b4402173873698908ded4d52f907c0f79c67a6abc

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

module EveOnline
  module Character
    # http://wiki.eve-id.net/APIv2_Char_AccountBalance_XML
    class AccountBalance < Base
      API_ENDPOINT = 'https://api.eveonline.com/char/AccountBalance.xml.aspx'

      def account_id
        row.fetch('@accountID').to_i
      end

      def account_key
        row.fetch('@accountKey')
      end

      def balance
        row.fetch('@balance')
      end

      def row
        rowset.fetch('row')
      end

      def rowset
        result.fetch('rowset')
      end

      def version
        eveapi.fetch('@version').to_i
      end

      def url
        "#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eve_online-0.3.0 lib/eve_online/character/account_balance.rb