Class: Greeve::Character::CharacterSheet

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

Overview

Character, skills and roles information.

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

Returns a new instance of CharacterSheet

Parameters:

  • character_id (Integer)

    EVE character ID



104
105
106
107
# File 'lib/greeve/character/character_sheet.rb', line 104

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

Instance Method Details

#alliance_idInteger

Returns:

  • (Integer)


24
# File 'lib/greeve/character/character_sheet.rb', line 24

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

#alliance_nameString

Returns:

  • (String)


23
# File 'lib/greeve/character/character_sheet.rb', line 23

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

#ancestryString

Returns:

  • (String)


19
# File 'lib/greeve/character/character_sheet.rb', line 19

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

#ancestry_idInteger

Returns:

  • (Integer)


18
# File 'lib/greeve/character/character_sheet.rb', line 18

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

#balanceBigDecimal

Returns:

  • (BigDecimal)


39
# File 'lib/greeve/character/character_sheet.rb', line 39

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

#bloodlineString

Returns:

  • (String)


17
# File 'lib/greeve/character/character_sheet.rb', line 17

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

#bloodline_idInteger

Returns:

  • (Integer)


16
# File 'lib/greeve/character/character_sheet.rb', line 16

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

#certificatesGreeve::Rowset

Parameters:

  • certificate_id (Integer)

Returns:



74
75
76
# File 'lib/greeve/character/character_sheet.rb', line 74

rowset :certificates, xpath: "eveapi/result/rowset[@name='certificates']" do
  attribute :certificate_id, xpath: "@certificateID", type: :integer
end

#character_idInteger

Returns:

  • (Integer)


11
# File 'lib/greeve/character/character_sheet.rb', line 11

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

#clone_jump_dateTime

Returns:

  • (Time)


32
# File 'lib/greeve/character/character_sheet.rb', line 32

attribute :clone_jump_date,     xpath: "eveapi/result/cloneJumpDate/?[0]",     type: :datetime

#clone_nameString

Returns:

  • (String)


28
# File 'lib/greeve/character/character_sheet.rb', line 28

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

#clone_skill_pointsInteger

Returns:

  • (Integer)


29
# File 'lib/greeve/character/character_sheet.rb', line 29

attribute :clone_skill_points,  xpath: "eveapi/result/cloneSkillPoints/?[0]",  type: :integer

#clone_type_idInteger

Returns:

  • (Integer)


27
# File 'lib/greeve/character/character_sheet.rb', line 27

attribute :clone_type_id,       xpath: "eveapi/result/cloneTypeID/?[0]",       type: :integer

#corporation_idInteger

Returns:

  • (Integer)


22
# File 'lib/greeve/character/character_sheet.rb', line 22

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

#corporation_nameString

Returns:

  • (String)


21
# File 'lib/greeve/character/character_sheet.rb', line 21

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

#corporation_rolesGreeve::Rowset

Parameters:

  • role_id (Integer)
  • role_name (String)

Returns:



78
79
80
81
# File 'lib/greeve/character/character_sheet.rb', line 78

rowset :corporation_roles, xpath: "eveapi/result/rowset[@name='corporationRoles']" do
  attribute :role_id,   xpath: "@roleID",   type: :integer
  attribute :role_name, xpath: "@roleName", type: :string
end

#corporation_roles_at_baseGreeve::Rowset

Parameters:

  • role_id (Integer)
  • role_name (String)

Returns:



88
89
90
91
# File 'lib/greeve/character/character_sheet.rb', line 88

rowset :corporation_roles_at_base, xpath: "eveapi/result/rowset[@name='corporationRolesAtBase']" do
  attribute :role_id,   xpath: "@roleID",   type: :integer
  attribute :role_name, xpath: "@roleName", type: :string
end

#corporation_roles_at_hqGreeve::Rowset

Parameters:

  • role_id (Integer)
  • role_name (String)

Returns:



83
84
85
86
# File 'lib/greeve/character/character_sheet.rb', line 83

rowset :corporation_roles_at_hq, xpath: "eveapi/result/rowset[@name='corporationRolesAtHQ']" do
  attribute :role_id,   xpath: "@roleID",   type: :integer
  attribute :role_name, xpath: "@roleName", type: :string
end

#corporation_roles_at_otherGreeve::Rowset

Parameters:

  • role_id (Integer)
  • role_name (String)

Returns:



93
94
95
96
# File 'lib/greeve/character/character_sheet.rb', line 93

rowset :corporation_roles_at_other, xpath: "eveapi/result/rowset[@name='corporationRolesAtOther']" do
  attribute :role_id,   xpath: "@roleID",   type: :integer
  attribute :role_name, xpath: "@roleName", type: :string
end

#corporation_titlesGreeve::Rowset

Parameters:

  • title_id (Integer)
  • title_name (String)

Returns:



98
99
100
101
# File 'lib/greeve/character/character_sheet.rb', line 98

rowset :corporation_titles, xpath: "eveapi/result/rowset[@name='corporationTitles']" do
  attribute :title_id,   xpath: "@titleID",   type: :integer
  attribute :title_name, xpath: "@titleName", type: :string
end

#dobTime

Returns:

  • (Time)


14
# File 'lib/greeve/character/character_sheet.rb', line 14

attribute :dob,                 xpath: "eveapi/result/DoB/?[0]",               type: :datetime

#faction_idInteger

Returns:

  • (Integer)


26
# File 'lib/greeve/character/character_sheet.rb', line 26

attribute :faction_id,          xpath: "eveapi/result/factionID/?[0]",         type: :integer

#faction_nameString

Returns:

  • (String)


25
# File 'lib/greeve/character/character_sheet.rb', line 25

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

#free_respecsInteger

Returns:

  • (Integer)


31
# File 'lib/greeve/character/character_sheet.rb', line 31

attribute :free_respecs,        xpath: "eveapi/result/freeRespecs/?[0]",       type: :integer

#free_skill_pointsInteger

Returns:

  • (Integer)


30
# File 'lib/greeve/character/character_sheet.rb', line 30

attribute :free_skill_points,   xpath: "eveapi/result/freeSkillPoints/?[0]",   type: :integer

#genderString

Returns:

  • (String)


20
# File 'lib/greeve/character/character_sheet.rb', line 20

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

#home_station_idInteger

Returns:

  • (Integer)


13
# File 'lib/greeve/character/character_sheet.rb', line 13

attribute :home_station_id,     xpath: "eveapi/result/homeStationID/?[0]",     type: :integer

#implantsGreeve::Rowset

Parameters:

  • type_id (Integer)
  • type_name (String)

Returns:



49
50
51
52
# File 'lib/greeve/character/character_sheet.rb', line 49

rowset :implants, xpath: "eveapi/result/rowset[@name='implants']" do
  attribute :type_id,   xpath: "@typeID",   type: :integer
  attribute :type_name, xpath: "@typeName", type: :string
end

#jump_activationTime

Returns:

  • (Time)


36
# File 'lib/greeve/character/character_sheet.rb', line 36

attribute :jump_activation,     xpath: "eveapi/result/jumpActivation/?[0]",    type: :datetime

#jump_clone_implantsGreeve::Rowset

Parameters:

  • jump_clone_id (Integer)
  • type_id (Integer)
  • type_name (String)

Returns:



61
62
63
64
65
# File 'lib/greeve/character/character_sheet.rb', line 61

rowset :jump_clone_implants, xpath: "eveapi/result/rowset[@name='jumpCloneImplants']" do
  attribute :jump_clone_id, xpath: "@jumpCloneID", type: :integer
  attribute :type_id,       xpath: "@typeID",      type: :integer
  attribute :type_name,     xpath: "@typeName",    type: :string
end

#jump_clonesGreeve::Rowset

Parameters:

  • jump_clone_id (Integer)
  • type_id (Integer)
  • location_id (Integer)
  • clone_name (String)

Returns:



54
55
56
57
58
59
# File 'lib/greeve/character/character_sheet.rb', line 54

rowset :jump_clones, xpath: "eveapi/result/rowset[@name='jumpClones']" do
  attribute :jump_clone_id, xpath: "@jumpCloneID", type: :integer
  attribute :type_id,       xpath: "@typeID",      type: :integer
  attribute :location_id,   xpath: "@locationID",  type: :integer
  attribute :clone_name,    xpath: "@cloneName",   type: :string
end

#jump_fatigueTime

Returns:

  • (Time)


37
# File 'lib/greeve/character/character_sheet.rb', line 37

attribute :jump_fatigue,        xpath: "eveapi/result/jumpFatigue/?[0]",       type: :datetime

#jump_last_updateTime

Returns:

  • (Time)


38
# File 'lib/greeve/character/character_sheet.rb', line 38

attribute :jump_last_update,    xpath: "eveapi/result/jumpLastUpdate/?[0]",    type: :datetime

#last_respec_dateTime

Returns:

  • (Time)


33
# File 'lib/greeve/character/character_sheet.rb', line 33

attribute :last_respec_date,    xpath: "eveapi/result/lastRespecDate/?[0]",    type: :datetime

#last_timed_respecTime

Returns:

  • (Time)


34
# File 'lib/greeve/character/character_sheet.rb', line 34

attribute :last_timed_respec,   xpath: "eveapi/result/lastTimedRespec/?[0]",   type: :datetime

#nameString

Returns:

  • (String)


12
# File 'lib/greeve/character/character_sheet.rb', line 12

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

#raceString

Returns:

  • (String)


15
# File 'lib/greeve/character/character_sheet.rb', line 15

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

#remote_station_dateTime

Returns:

  • (Time)


35
# File 'lib/greeve/character/character_sheet.rb', line 35

attribute :remote_station_date, xpath: "eveapi/result/remoteStationDate/?[0]", type: :datetime

#skillsGreeve::Rowset

Parameters:

  • type_id (Integer)
  • skillpoints (Integer)
  • level (Integer)
  • published

Returns:



67
68
69
70
71
72
# File 'lib/greeve/character/character_sheet.rb', line 67

rowset :skills, xpath: "eveapi/result/rowset[@name='skills']" do
  attribute :type_id,     xpath: "@typeID",      type: :integer
  attribute :skillpoints, xpath: "@skillpoints", type: :integer
  attribute :level,       xpath: "@level",       type: :integer
  attribute :published,   xpath: "@published",   type: :boolean
end