Class: Greeve::Character::Standings

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

Overview

Character standings (does not take character skills into account).

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 = {}) ⇒ Standings

Returns a new instance of Standings

Parameters:

  • character_id (Integer)

    EVE character ID



30
31
32
33
# File 'lib/greeve/character/standings.rb', line 30

def initialize(character_id, opts = {})
  opts[:query_params] = { "characterID" => character_id }
  super(opts)
end

Instance Method Details

#agentsGreeve::Rowset

Parameters:

  • from_id (Integer)
  • from_name (String)
  • standing (BigDecimal)

Returns:



11
12
13
14
15
# File 'lib/greeve/character/standings.rb', line 11

rowset :agents, xpath: "eveapi/result/characterNPCStandings/rowset[@name='agents']" do
  attribute :from_id,   xpath: "@fromID",   type: :integer
  attribute :from_name, xpath: "@fromName", type: :string
  attribute :standing,  xpath: "@standing", type: :numeric
end

#factionsGreeve::Rowset

Parameters:

  • from_id (Integer)
  • from_name (String)
  • standing (BigDecimal)

Returns:



23
24
25
26
27
# File 'lib/greeve/character/standings.rb', line 23

rowset :factions, xpath: "eveapi/result/characterNPCStandings/rowset[@name='factions']" do
  attribute :from_id,   xpath: "@fromID",   type: :integer
  attribute :from_name, xpath: "@fromName", type: :string
  attribute :standing,  xpath: "@standing", type: :numeric
end

#npc_corporationsGreeve::Rowset

Parameters:

  • from_id (Integer)
  • from_name (String)
  • standing (BigDecimal)

Returns:



17
18
19
20
21
# File 'lib/greeve/character/standings.rb', line 17

rowset :npc_corporations, xpath: "eveapi/result/characterNPCStandings/rowset[@name='NPCCorporations']" do
  attribute :from_id,   xpath: "@fromID",   type: :integer
  attribute :from_name, xpath: "@fromName", type: :string
  attribute :standing,  xpath: "@standing", type: :numeric
end