Class: Greeve::Eve::CharacterInfo

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/eve/character_info.rb

Overview

Information about the character. Has three data sets it can return depending on the access mask.

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

Returns a new instance of CharacterInfo

Parameters:

  • character_id (Integer)

    EVE character ID



42
43
44
45
# File 'lib/greeve/eve/character_info.rb', line 42

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

Instance Method Details

#account_balanceBigDecimal

Returns:

  • (BigDecimal)


19
# File 'lib/greeve/eve/character_info.rb', line 19

attribute :account_balance,     xpath: "eveapi/result/accountBalance/?[0]",    type: :numeric

#allianceString

Returns:

  • (String)


29
# File 'lib/greeve/eve/character_info.rb', line 29

attribute :alliance,            xpath: "eveapi/result/alliance/?[0]",          type: :string

#alliance_dateTime

Returns:

  • (Time)


30
# File 'lib/greeve/eve/character_info.rb', line 30

attribute :alliance_date,       xpath: "eveapi/result/allianceDate/?[0]",      type: :datetime

#alliance_idInteger

Returns:

  • (Integer)


28
# File 'lib/greeve/eve/character_info.rb', line 28

attribute :alliance_id,         xpath: "eveapi/result/allianceID/?[0]",        type: :integer

#ancestryString

Returns:

  • (String)


18
# File 'lib/greeve/eve/character_info.rb', line 18

attribute :ancestry,            xpath: "eveapi/result/ancestry/?[0]",          type: :string

#ancestry_idInteger

Returns:

  • (Integer)


17
# File 'lib/greeve/eve/character_info.rb', line 17

attribute :ancestry_id,         xpath: "eveapi/result/ancestryID/?[0]",        type: :integer

#bloodlineString

Returns:

  • (String)


16
# File 'lib/greeve/eve/character_info.rb', line 16

attribute :bloodline,           xpath: "eveapi/result/bloodline/?[0]",         type: :string

#bloodline_idInteger

Returns:

  • (Integer)


15
# File 'lib/greeve/eve/character_info.rb', line 15

attribute :bloodline_id,        xpath: "eveapi/result/bloodlineID/?[0]",       type: :integer

#character_idInteger

Returns:

  • (Integer)


12
# File 'lib/greeve/eve/character_info.rb', line 12

attribute :character_id,        xpath: "eveapi/result/characterID/?[0]",       type: :integer

#character_nameString

Returns:

  • (String)


13
# File 'lib/greeve/eve/character_info.rb', line 13

attribute :character_name,      xpath: "eveapi/result/characterName/?[0]",     type: :string

#corporationString

Returns:

  • (String)


26
# File 'lib/greeve/eve/character_info.rb', line 26

attribute :corporation,         xpath: "eveapi/result/corporation/?[0]",       type: :string

#corporation_dateTime

Returns:

  • (Time)


27
# File 'lib/greeve/eve/character_info.rb', line 27

attribute :corporation_date,    xpath: "eveapi/result/corporationDate/?[0]",   type: :datetime

#corporation_idInteger

Returns:

  • (Integer)


25
# File 'lib/greeve/eve/character_info.rb', line 25

attribute :corporation_id,      xpath: "eveapi/result/corporationID/?[0]",     type: :integer

#employment_historyGreeve::Rowset

Parameters:

  • record_id (Integer)
  • corporation_id (Integer)
  • corporation_name (String)
  • start_date (Time)

Returns:



34
35
36
37
38
39
# File 'lib/greeve/eve/character_info.rb', line 34

rowset :employment_history, xpath: "eveapi/result/rowset[@name='employmentHistory']" do
  attribute :record_id,        xpath: "@recordID",        type: :integer
  attribute :corporation_id,   xpath: "@corporationID",   type: :integer
  attribute :corporation_name, xpath: "@corporationName", type: :string
  attribute :start_date,       xpath: "@startDate",       type: :datetime
end

#last_known_locationString

Returns:

  • (String)


31
# File 'lib/greeve/eve/character_info.rb', line 31

attribute :last_known_location, xpath: "eveapi/result/lastKnownLocation/?[0]", type: :string

#next_training_endsTime

Returns:

  • (Time)


21
# File 'lib/greeve/eve/character_info.rb', line 21

attribute :next_training_ends,  xpath: "eveapi/result/nextTrainingEnds/?[0]",  type: :datetime

#raceString

Returns:

  • (String)


14
# File 'lib/greeve/eve/character_info.rb', line 14

attribute :race,                xpath: "eveapi/result/race/?[0]",              type: :string

#security_statusBigDecimal

Returns:

  • (BigDecimal)


32
# File 'lib/greeve/eve/character_info.rb', line 32

attribute :security_status,     xpath: "eveapi/result/securityStatus/?[0]",    type: :numeric

#ship_nameString

Returns:

  • (String)


22
# File 'lib/greeve/eve/character_info.rb', line 22

attribute :ship_name,           xpath: "eveapi/result/shipName/?[0]",          type: :string

#ship_type_idInteger

Returns:

  • (Integer)


23
# File 'lib/greeve/eve/character_info.rb', line 23

attribute :ship_type_id,        xpath: "eveapi/result/shipTypeID/?[0]",        type: :integer

#ship_type_nameString

Returns:

  • (String)


24
# File 'lib/greeve/eve/character_info.rb', line 24

attribute :ship_type_name,      xpath: "eveapi/result/shipTypeName/?[0]",      type: :string

#skill_pointsInteger

Returns:

  • (Integer)


20
# File 'lib/greeve/eve/character_info.rb', line 20

attribute :skill_points,        xpath: "eveapi/result/skillPoints/?[0]",       type: :integer