Class: Greeve::Character::Medals
- Defined in:
- lib/greeve/character/medals.rb
Overview
Note:
Endpoint: api.eveonline.com/char/Medals.xml.aspx
Medals the character has received.
Attributes collapse
Instance Method Summary collapse
-
#initialize(character_id, opts = {}) ⇒ Medals
constructor
A new instance of Medals.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(character_id, opts = {}) ⇒ Medals
Returns a new instance of Medals
34 35 36 37 |
# File 'lib/greeve/character/medals.rb', line 34 def initialize(character_id, opts = {}) opts[:query_params] = { "characterID" => character_id } super(opts) end |
Instance Method Details
#current_corporation ⇒ Greeve::Rowset
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/greeve/character/medals.rb', line 11 rowset :current_corporation, xpath: "eveapi/result/rowset[@name='currentCorporation']" do attribute :medal_id, xpath: "@medalID", type: :integer attribute :reason, xpath: "@reason", type: :string attribute :status, xpath: "@status", type: :string attribute :issuer_id, xpath: "@issuerID", type: :integer attribute :issued, xpath: "@issued", type: :datetime attribute :corporation_id, xpath: "@corporationID", type: :integer attribute :title, xpath: "@title", type: :string attribute :description, xpath: "@description", type: :string end |
#other_corporations ⇒ Greeve::Rowset
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/greeve/character/medals.rb', line 22 rowset :other_corporations, xpath: "eveapi/result/rowset[@name='otherCorporations']" do attribute :medal_id, xpath: "@medalID", type: :integer attribute :reason, xpath: "@reason", type: :string attribute :status, xpath: "@status", type: :string attribute :issuer_id, xpath: "@issuerID", type: :integer attribute :issued, xpath: "@issued", type: :datetime attribute :corporation_id, xpath: "@corporationID", type: :integer attribute :title, xpath: "@title", type: :string attribute :description, xpath: "@description", type: :string end |