Class: Greeve::Account::Characters

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/account/characters.rb

Overview

Lists all characters for an API key.

Attributes collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #initialize, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

This class inherits a constructor from Greeve::BaseItem

Instance Method Details

#charactersGreeve::Rowset

Parameters:

  • name (String)
  • character_id (Integer)
  • corporation_name (String)
  • corporation_id (Integer)
  • alliance_name (String)
  • alliance_id (Integer)
  • faction_name (String)
  • faction_id (Integer)

Returns:



11
12
13
14
15
16
17
18
19
20
# File 'lib/greeve/account/characters.rb', line 11

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