Class: Greeve::Eve::CharacterAffiliation
- Defined in:
- lib/greeve/eve/character_affiliation.rb
Overview
Note:
Corporations, alliances, and factions the character(s) are members of.
Attributes collapse
Instance Method Summary collapse
-
#initialize(*ids, opts = {}) ⇒ CharacterAffiliation
constructor
A new instance of CharacterAffiliation.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(*ids, opts = {}) ⇒ CharacterAffiliation
Returns a new instance of CharacterAffiliation
25 26 27 28 29 30 31 |
# File 'lib/greeve/eve/character_affiliation.rb', line 25 def initialize(*ids) opts = ids.last.is_a?(Hash) ? ids.pop : {} opts[:query_params] = { "IDs" => ids.join(",") } super(opts) end |
Instance Method Details
#characters ⇒ Greeve::Rowset
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/greeve/eve/character_affiliation.rb', line 11 rowset :characters, xpath: "eveapi/result/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 |