Class: Greeve::Character::Medals

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/character/medals.rb

Overview

Medals the character has received.

Attributes collapse

Instance Method Summary collapse

Methods inherited from BaseItem

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

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(character_id, opts = {}) ⇒ Medals

Returns a new instance of Medals

Parameters:

  • character_id (Integer)

    EVE character ID



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_corporationGreeve::Rowset

Parameters:

  • medal_id (Integer)
  • reason (String)
  • status (String)
  • issuer_id (Integer)
  • issued (Time)
  • corporation_id (Integer)
  • title (String)
  • description (String)

Returns:



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_corporationsGreeve::Rowset

Parameters:

  • medal_id (Integer)
  • reason (String)
  • status (String)
  • issuer_id (Integer)
  • issued (Time)
  • corporation_id (Integer)
  • title (String)
  • description (String)

Returns:



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