Class: Greeve::Eve::AllianceList
- Defined in:
- lib/greeve/eve/alliance_list.rb
Overview
Note:
Returns active alliances in New Eden and their member corporations.
Attributes collapse
Instance Method Summary collapse
-
#initialize(version, opts = {}) ⇒ AllianceList
constructor
A new instance of AllianceList.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(version, opts = {}) ⇒ AllianceList
Returns a new instance of AllianceList
21 22 23 24 25 26 |
# File 'lib/greeve/eve/alliance_list.rb', line 21 def initialize(version, opts = {}) raise ArgumentError, "not implemented, use version=1" if version == 0 opts[:query_params] = { "version" => version } super(opts) end |
Instance Method Details
#alliances ⇒ Greeve::Rowset
11 12 13 14 15 16 17 18 |
# File 'lib/greeve/eve/alliance_list.rb', line 11 rowset :alliances, xpath: "eveapi/result/rowset[@name='alliances']" do attribute :name, xpath: "@name", type: :string attribute :short_name, xpath: "@shortName", type: :string attribute :alliance_id, xpath: "@allianceID", type: :integer attribute :executor_corp_id, xpath: "@executorCorpID", type: :integer attribute :member_count, xpath: "@memberCount", type: :integer attribute :start_date, xpath: "@startDate", type: :datetime end |