Sha256: 13a8a5a15d1db715d07663a7200d1f0d47ff509a03720d931b1a330dca1fb531

Contents?: true

Size: 1.28 KB

Versions: 1

Compression:

Stored size: 1.28 KB

Contents

require_relative "../base_item"

module Greeve
  module Account
    # Represents the access rights of an API key.
    #
    # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/account/account_apikeyinfo.html
    class APIKeyInfo < Greeve::BaseItem
      endpoint "account/APIKeyInfo"

      attribute :access_mask, xpath: "eveapi/result/key/@accessMask", type: :integer
      attribute :type,        xpath: "eveapi/result/key/@type",       type: :string
      attribute :expires,     xpath: "eveapi/result/key/@expires",    type: :datetime

      rowset :characters, xpath: "eveapi/result/key/rowset[@name='characters']" do
        attribute :character_id,     xpath: "@characterID",     type: :integer
        attribute :character_name,   xpath: "@characterName",   type: :string
        attribute :corporation_id,   xpath: "@corporationID",   type: :integer
        attribute :corporation_name, xpath: "@corporationName", type: :string
        attribute :alliance_id,      xpath: "@allianceID",      type: :integer
        attribute :alliance_name,    xpath: "@allianceName",    type: :string
        attribute :faction_id,       xpath: "@factionID",       type: :integer
        attribute :faction_name,     xpath: "@factionName",     type: :string
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
greeve-1.0.0 lib/greeve/account/api_key_info.rb