greeve 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +139 -0
  3. data/doc/Greeve.html +5 -5
  4. data/doc/Greeve/API.html +15 -3
  5. data/doc/Greeve/API/CallList.html +466 -0
  6. data/doc/Greeve/Account.html +130 -0
  7. data/doc/Greeve/Account/APIKeyInfo.html +599 -0
  8. data/doc/Greeve/Account/AccountStatus.html +579 -0
  9. data/doc/Greeve/Account/Characters.html +389 -0
  10. data/doc/Greeve/Application.html +428 -0
  11. data/doc/Greeve/Attributable.html +123 -0
  12. data/doc/Greeve/BaseItem.html +240 -210
  13. data/doc/Greeve/Character.html +15 -3
  14. data/doc/Greeve/Character/AccountBalance.html +420 -0
  15. data/doc/Greeve/Character/AssetList.html +480 -0
  16. data/doc/Greeve/Character/Blueprints.html +535 -0
  17. data/doc/Greeve/Character/CalendarEventAttendees.html +461 -0
  18. data/doc/Greeve/Character/CharacterSheet.html +3407 -0
  19. data/doc/Greeve/Character/Clones.html +1700 -0
  20. data/doc/Greeve/Character/ContactList.html +1047 -0
  21. data/doc/Greeve/Character/ContactNotifications.html +446 -0
  22. data/doc/Greeve/Character/ContractBids.html +446 -0
  23. data/doc/Greeve/Character/ContractItems.html +483 -0
  24. data/doc/Greeve/Character/Contracts.html +720 -0
  25. data/doc/Greeve/Character/FacWarStats.html +1075 -0
  26. data/doc/Greeve/Character/IndustryJobs.html +732 -0
  27. data/doc/Greeve/Character/IndustryJobsHistory.html +732 -0
  28. data/doc/Greeve/Character/Locations.html +503 -0
  29. data/doc/Greeve/Character/MailBodies.html +435 -0
  30. data/doc/Greeve/Character/MailMessages.html +485 -0
  31. data/doc/Greeve/Character/MailingLists.html +407 -0
  32. data/doc/Greeve/Character/MarketOrders.html +626 -0
  33. data/doc/Greeve/Character/Medals.html +665 -0
  34. data/doc/Greeve/Character/Notifications.html +459 -0
  35. data/doc/Greeve/Character/PlanetaryColonies.html +524 -0
  36. data/doc/Greeve/Character/PlanetaryLinks.html +444 -0
  37. data/doc/Greeve/Character/PlanetaryPins.html +587 -0
  38. data/doc/Greeve/Character/PlanetaryRoutes.html +548 -0
  39. data/doc/Greeve/Character/Research.html +446 -0
  40. data/doc/Greeve/Character/SkillInTraining.html +865 -0
  41. data/doc/Greeve/Character/SkillQueue.html +472 -0
  42. data/doc/Greeve/Character/Skills.html +516 -0
  43. data/doc/Greeve/Character/Standings.html +650 -0
  44. data/doc/Greeve/Character/UpcomingCalendarEvents.html +511 -0
  45. data/doc/Greeve/Character/WalletJournal.html +658 -0
  46. data/doc/Greeve/Character/WalletTransactions.html +631 -0
  47. data/doc/Greeve/Config.html +315 -0
  48. data/doc/Greeve/Corporation.html +15 -3
  49. data/doc/Greeve/Corporation/AccountBalance.html +324 -0
  50. data/doc/Greeve/Corporation/Contracts.html +700 -0
  51. data/doc/Greeve/Corporation/CorporationSheet.html +1285 -0
  52. data/doc/Greeve/Corporation/IndustryJobs.html +636 -0
  53. data/doc/Greeve/Corporation/IndustryJobsHistory.html +636 -0
  54. data/doc/Greeve/Corporation/Locations.html +452 -0
  55. data/doc/Greeve/Corporation/MarketOrders.html +609 -0
  56. data/doc/Greeve/Corporation/MemberTracking.html +596 -0
  57. data/doc/Greeve/Corporation/Standings.html +554 -0
  58. data/doc/Greeve/Corporation/StarbaseDetail.html +619 -0
  59. data/doc/Greeve/Corporation/StarbaseList.html +389 -0
  60. data/doc/Greeve/Corporation/WalletJournal.html +631 -0
  61. data/doc/Greeve/Corporation/WalletTransactions.html +657 -0
  62. data/doc/Greeve/Eve.html +3 -3
  63. data/doc/Greeve/Eve/AllianceList.html +476 -0
  64. data/doc/Greeve/Eve/CharacterAffiliation.html +491 -0
  65. data/doc/Greeve/Eve/CharacterID.html +413 -0
  66. data/doc/Greeve/Eve/CharacterInfo.html +1705 -52
  67. data/doc/Greeve/Eve/CharacterName.html +414 -0
  68. data/doc/Greeve/Eve/ConquerableStationList.html +402 -0
  69. data/doc/Greeve/Eve/ErrorList.html +311 -0
  70. data/doc/Greeve/Eve/RefTypes.html +312 -0
  71. data/doc/Greeve/Eve/TypeName.html +413 -0
  72. data/doc/Greeve/Helpers.html +130 -0
  73. data/doc/Greeve/Helpers/AddAttribute.html +124 -0
  74. data/doc/Greeve/Helpers/AttributeToHash.html +245 -0
  75. data/doc/Greeve/Helpers/DefineAttributeMethod.html +124 -0
  76. data/doc/Greeve/Helpers/DefineDSLMethods.html +124 -0
  77. data/doc/Greeve/Map.html +15 -3
  78. data/doc/Greeve/Map/FacWarSystems.html +404 -0
  79. data/doc/Greeve/Map/Jumps.html +313 -0
  80. data/doc/Greeve/Map/Kills.html +339 -0
  81. data/doc/Greeve/Map/Sovereignty.html +351 -0
  82. data/doc/Greeve/Namespace.html +586 -0
  83. data/doc/Greeve/ResponseError.html +521 -0
  84. data/doc/Greeve/Row.html +40 -161
  85. data/doc/Greeve/Rowset.html +28 -22
  86. data/doc/Greeve/Server.html +15 -3
  87. data/doc/Greeve/Server/ServerStatus.html +349 -0
  88. data/doc/_index.html +600 -4
  89. data/doc/class_list.html +1 -1
  90. data/doc/file.CONTRIBUTING.html +1 -1
  91. data/doc/file.LICENSE.html +1 -1
  92. data/doc/file.README.html +140 -1
  93. data/doc/index.html +140 -1
  94. data/doc/method_list.html +2024 -32
  95. data/doc/top-level-namespace.html +1 -1
  96. data/lib/greeve.rb +75 -0
  97. data/lib/greeve/account/account_status.rb +22 -0
  98. data/lib/greeve/account/api_key_info.rb +27 -0
  99. data/lib/greeve/account/characters.rb +23 -0
  100. data/lib/greeve/api/call_list.rb +27 -0
  101. data/lib/greeve/base_item.rb +41 -57
  102. data/lib/greeve/character/account_balance.rb +24 -0
  103. data/lib/greeve/character/asset_list.rb +32 -0
  104. data/lib/greeve/character/blueprints.rb +35 -0
  105. data/lib/greeve/character/calendar_event_attendees.rb +33 -0
  106. data/lib/greeve/character/character_sheet.rb +110 -0
  107. data/lib/greeve/character/clones.rb +60 -0
  108. data/lib/greeve/character/contact_list.rb +58 -0
  109. data/lib/greeve/character/contact_notifications.rb +26 -0
  110. data/lib/greeve/character/contract_bids.rb +26 -0
  111. data/lib/greeve/character/contract_items.rb +32 -0
  112. data/lib/greeve/character/contracts.rb +49 -0
  113. data/lib/greeve/character/fac_war_stats.rb +30 -0
  114. data/lib/greeve/character/industry_jobs.rb +48 -0
  115. data/lib/greeve/character/industry_jobs_history.rb +48 -0
  116. data/lib/greeve/character/locations.rb +36 -0
  117. data/lib/greeve/character/mail_bodies.rb +33 -0
  118. data/lib/greeve/character/mail_messages.rb +29 -0
  119. data/lib/greeve/character/mailing_lists.rb +23 -0
  120. data/lib/greeve/character/market_orders.rb +42 -0
  121. data/lib/greeve/character/medals.rb +40 -0
  122. data/lib/greeve/character/notifications.rb +27 -0
  123. data/lib/greeve/character/planetary_colonies.rb +32 -0
  124. data/lib/greeve/character/planetary_links.rb +30 -0
  125. data/lib/greeve/character/planetary_pins.rb +41 -0
  126. data/lib/greeve/character/planetary_routes.rb +38 -0
  127. data/lib/greeve/character/research.rb +26 -0
  128. data/lib/greeve/character/skill_in_training.rb +27 -0
  129. data/lib/greeve/character/skill_queue.rb +28 -0
  130. data/lib/greeve/character/skills.rb +28 -0
  131. data/lib/greeve/character/standings.rb +36 -0
  132. data/lib/greeve/character/upcoming_calendar_events.rb +31 -0
  133. data/lib/greeve/character/wallet_journal.rb +49 -0
  134. data/lib/greeve/character/wallet_transactions.rb +47 -0
  135. data/lib/greeve/config.rb +16 -0
  136. data/lib/greeve/corporation/account_balance.rb +18 -0
  137. data/lib/greeve/corporation/contracts.rb +46 -0
  138. data/lib/greeve/corporation/corporation_sheet.rb +43 -0
  139. data/lib/greeve/corporation/industry_jobs.rb +42 -0
  140. data/lib/greeve/corporation/industry_jobs_history.rb +42 -0
  141. data/lib/greeve/corporation/locations.rb +31 -0
  142. data/lib/greeve/corporation/market_orders.rb +39 -0
  143. data/lib/greeve/corporation/member_tracking.rb +38 -0
  144. data/lib/greeve/corporation/standings.rb +30 -0
  145. data/lib/greeve/corporation/starbase_detail.rb +58 -0
  146. data/lib/greeve/corporation/starbase_list.rb +23 -0
  147. data/lib/greeve/corporation/wallet_journal.rb +48 -0
  148. data/lib/greeve/corporation/wallet_transactions.rb +50 -0
  149. data/lib/greeve/eve/alliance_list.rb +29 -0
  150. data/lib/greeve/eve/character_affiliation.rb +34 -0
  151. data/lib/greeve/eve/character_id.rb +28 -0
  152. data/lib/greeve/eve/character_info.rb +4 -1
  153. data/lib/greeve/eve/character_name.rb +29 -0
  154. data/lib/greeve/eve/conquerable_station_list.rb +24 -0
  155. data/lib/greeve/eve/error_list.rb +17 -0
  156. data/lib/greeve/eve/ref_types.rb +18 -0
  157. data/lib/greeve/eve/type_name.rb +28 -0
  158. data/lib/greeve/helpers/add_attribute.rb +25 -0
  159. data/lib/greeve/helpers/attribute_to_hash.rb +24 -0
  160. data/lib/greeve/helpers/define_dsl_methods.rb +70 -0
  161. data/lib/greeve/map/fac_war_systems.rb +26 -0
  162. data/lib/greeve/map/jumps.rb +19 -0
  163. data/lib/greeve/map/kills.rb +21 -0
  164. data/lib/greeve/map/sovereignty.rb +21 -0
  165. data/lib/greeve/namespace.rb +74 -0
  166. data/lib/greeve/response_error.rb +21 -0
  167. data/lib/greeve/row.rb +11 -33
  168. data/lib/greeve/rowset.rb +6 -15
  169. data/lib/greeve/server/server_status.rb +15 -0
  170. data/lib/greeve/version.rb +1 -1
  171. metadata +165 -2
@@ -0,0 +1,33 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # A list of all invited attendees for a given event.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_calendareventattendees.html
8
+ class CalendarEventAttendees < Greeve::BaseItem
9
+ endpoint "char/CalendarEventAttendees"
10
+
11
+ rowset :event_attendees, xpath: "eveapi/result/rowset[@name='eventAttendees']" do
12
+ attribute :event_id, xpath: "@eventID", type: :integer
13
+ attribute :character_id, xpath: "@characterID", type: :integer
14
+ attribute :character_name, xpath: "@characterName", type: :string
15
+ attribute :response, xpath: "@response", type: :string
16
+ end
17
+
18
+ # @param character_id [Integer] EVE character ID
19
+ # @param event_ids [Array<Integer>, Integer] either a single event ID, or
20
+ # an array of event IDs
21
+ def initialize(character_id, event_ids, opts = {})
22
+ event_ids = [event_ids] unless event_ids.is_a?(Array)
23
+
24
+ opts[:query_params] = {
25
+ "characterID" => character_id,
26
+ "eventIDs" => event_ids.join(",")
27
+ }
28
+
29
+ super(opts)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,110 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character, skills and roles information.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_charactersheet.html
8
+ class CharacterSheet < Greeve::BaseItem
9
+ endpoint "char/CharacterSheet"
10
+
11
+ attribute :character_id, xpath: "eveapi/result/characterID/?[0]", type: :integer
12
+ attribute :name, xpath: "eveapi/result/name/?[0]", type: :string
13
+ attribute :home_station_id, xpath: "eveapi/result/homeStationID/?[0]", type: :integer
14
+ attribute :dob, xpath: "eveapi/result/DoB/?[0]", type: :datetime
15
+ attribute :race, xpath: "eveapi/result/race/?[0]", type: :string
16
+ attribute :bloodline_id, xpath: "eveapi/result/bloodLineID/?[0]", type: :integer
17
+ attribute :bloodline, xpath: "eveapi/result/bloodLine/?[0]", type: :string
18
+ attribute :ancestry_id, xpath: "eveapi/result/ancestryID/?[0]", type: :integer
19
+ attribute :ancestry, xpath: "eveapi/result/ancestry/?[0]", type: :string
20
+ attribute :gender, xpath: "eveapi/result/gender/?[0]", type: :string
21
+ attribute :corporation_name, xpath: "eveapi/result/corporationName/?[0]", type: :string
22
+ attribute :corporation_id, xpath: "eveapi/result/corporationID/?[0]", type: :integer
23
+ attribute :alliance_name, xpath: "eveapi/result/allianceName/?[0]", type: :string
24
+ attribute :alliance_id, xpath: "eveapi/result/allianceID/?[0]", type: :integer
25
+ attribute :faction_name, xpath: "eveapi/result/factionName/?[0]", type: :string
26
+ attribute :faction_id, xpath: "eveapi/result/factionID/?[0]", type: :integer
27
+ attribute :clone_type_id, xpath: "eveapi/result/cloneTypeID/?[0]", type: :integer
28
+ attribute :clone_name, xpath: "eveapi/result/cloneName/?[0]", type: :string
29
+ attribute :clone_skill_points, xpath: "eveapi/result/cloneSkillPoints/?[0]", type: :integer
30
+ attribute :free_skill_points, xpath: "eveapi/result/freeSkillPoints/?[0]", type: :integer
31
+ attribute :free_respecs, xpath: "eveapi/result/freeRespecs/?[0]", type: :integer
32
+ attribute :clone_jump_date, xpath: "eveapi/result/cloneJumpDate/?[0]", type: :datetime
33
+ attribute :last_respec_date, xpath: "eveapi/result/lastRespecDate/?[0]", type: :datetime
34
+ attribute :last_timed_respec, xpath: "eveapi/result/lastTimedRespec/?[0]", type: :datetime
35
+ attribute :remote_station_date, xpath: "eveapi/result/remoteStationDate/?[0]", type: :datetime
36
+ attribute :jump_activation, xpath: "eveapi/result/jumpActivation/?[0]", type: :datetime
37
+ attribute :jump_fatigue, xpath: "eveapi/result/jumpFatigue/?[0]", type: :datetime
38
+ attribute :jump_last_update, xpath: "eveapi/result/jumpLastUpdate/?[0]", type: :datetime
39
+ attribute :balance, xpath: "eveapi/result/balance/?[0]", type: :numeric
40
+
41
+ namespace :attributes, xpath: "eveapi/result/attributes" do
42
+ attribute :intelligence, xpath: "intelligence/?[0]", type: :integer
43
+ attribute :memory, xpath: "memory/?[0]", type: :integer
44
+ attribute :charisma, xpath: "charisma/?[0]", type: :integer
45
+ attribute :perception, xpath: "perception/?[0]", type: :integer
46
+ attribute :willpower, xpath: "willpower/?[0]", type: :integer
47
+ end
48
+
49
+ rowset :implants, xpath: "eveapi/result/rowset[@name='implants']" do
50
+ attribute :type_id, xpath: "@typeID", type: :integer
51
+ attribute :type_name, xpath: "@typeName", type: :string
52
+ end
53
+
54
+ rowset :jump_clones, xpath: "eveapi/result/rowset[@name='jumpClones']" do
55
+ attribute :jump_clone_id, xpath: "@jumpCloneID", type: :integer
56
+ attribute :type_id, xpath: "@typeID", type: :integer
57
+ attribute :location_id, xpath: "@locationID", type: :integer
58
+ attribute :clone_name, xpath: "@cloneName", type: :string
59
+ end
60
+
61
+ rowset :jump_clone_implants, xpath: "eveapi/result/rowset[@name='jumpCloneImplants']" do
62
+ attribute :jump_clone_id, xpath: "@jumpCloneID", type: :integer
63
+ attribute :type_id, xpath: "@typeID", type: :integer
64
+ attribute :type_name, xpath: "@typeName", type: :string
65
+ end
66
+
67
+ rowset :skills, xpath: "eveapi/result/rowset[@name='skills']" do
68
+ attribute :type_id, xpath: "@typeID", type: :integer
69
+ attribute :skillpoints, xpath: "@skillpoints", type: :integer
70
+ attribute :level, xpath: "@level", type: :integer
71
+ attribute :published, xpath: "@published", type: :boolean
72
+ end
73
+
74
+ rowset :certificates, xpath: "eveapi/result/rowset[@name='certificates']" do
75
+ attribute :certificate_id, xpath: "@certificateID", type: :integer
76
+ end
77
+
78
+ rowset :corporation_roles, xpath: "eveapi/result/rowset[@name='corporationRoles']" do
79
+ attribute :role_id, xpath: "@roleID", type: :integer
80
+ attribute :role_name, xpath: "@roleName", type: :string
81
+ end
82
+
83
+ rowset :corporation_roles_at_hq, xpath: "eveapi/result/rowset[@name='corporationRolesAtHQ']" do
84
+ attribute :role_id, xpath: "@roleID", type: :integer
85
+ attribute :role_name, xpath: "@roleName", type: :string
86
+ end
87
+
88
+ rowset :corporation_roles_at_base, xpath: "eveapi/result/rowset[@name='corporationRolesAtBase']" do
89
+ attribute :role_id, xpath: "@roleID", type: :integer
90
+ attribute :role_name, xpath: "@roleName", type: :string
91
+ end
92
+
93
+ rowset :corporation_roles_at_other, xpath: "eveapi/result/rowset[@name='corporationRolesAtOther']" do
94
+ attribute :role_id, xpath: "@roleID", type: :integer
95
+ attribute :role_name, xpath: "@roleName", type: :string
96
+ end
97
+
98
+ rowset :corporation_titles, xpath: "eveapi/result/rowset[@name='corporationTitles']" do
99
+ attribute :title_id, xpath: "@titleID", type: :integer
100
+ attribute :title_name, xpath: "@titleName", type: :string
101
+ end
102
+
103
+ # @param character_id [Integer] EVE character ID
104
+ def initialize(character_id, opts = {})
105
+ opts[:query_params] = { "characterID" => character_id }
106
+ super(opts)
107
+ end
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,60 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Clones and basic attributes.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_clones.html
8
+ class Clones < Greeve::BaseItem
9
+ endpoint "char/Clones"
10
+
11
+ attribute :dob, xpath:"eveapi/result/DoB/?[0]", type: :datetime
12
+ attribute :race, xpath:"eveapi/result/race/?[0]", type: :string
13
+ attribute :bloodline_id, xpath:"eveapi/result/bloodLineID/?[0]", type: :integer
14
+ attribute :bloodline, xpath:"eveapi/result/bloodLine/?[0]", type: :string
15
+ attribute :ancestry_id, xpath:"eveapi/result/ancestryID/?[0]", type: :integer
16
+ attribute :ancestry, xpath:"eveapi/result/ancestry/?[0]", type: :string
17
+ attribute :gender, xpath:"eveapi/result/gender/?[0]", type: :string
18
+ attribute :free_respecs, xpath:"eveapi/result/freeRespecs/?[0]", type: :integer
19
+ attribute :clone_jump_date, xpath:"eveapi/result/cloneJumpDate/?[0]", type: :datetime
20
+ attribute :last_respec_date, xpath:"eveapi/result/lastRespecDate/?[0]", type: :datetime
21
+ attribute :last_timed_respec, xpath:"eveapi/result/lastTimedRespec/?[0]", type: :datetime
22
+ attribute :remote_station_date, xpath:"eveapi/result/remoteStationDate/?[0]", type: :datetime
23
+ attribute :jump_activation, xpath:"eveapi/result/jumpActivation/?[0]", type: :datetime
24
+ attribute :jump_fatigue, xpath:"eveapi/result/jumpFatigue/?[0]", type: :datetime
25
+ attribute :jump_last_update, xpath:"eveapi/result/jumpLastUpdate/?[0]", type: :datetime
26
+
27
+ namespace :attributes, xpath: "eveapi/result/attributes" do
28
+ attribute :intelligence, xpath:"intelligence/?[0]", type: :integer
29
+ attribute :memory, xpath:"memory/?[0]", type: :integer
30
+ attribute :charisma, xpath:"charisma/?[0]", type: :integer
31
+ attribute :perception, xpath:"perception/?[0]", type: :integer
32
+ attribute :willpower, xpath:"willpower/?[0]", type: :integer
33
+ end
34
+
35
+ rowset :implants, xpath: "eveapi/result/rowset[@name='implants']" do
36
+ attribute :type_id, xpath: "@typeID", type: :integer
37
+ attribute :type_name, xpath: "@typeName", type: :string
38
+ end
39
+
40
+ rowset :jump_clones, xpath: "eveapi/result/rowset[@name='jumpClones']" do
41
+ attribute :jump_clone_id, xpath: "@jumpCloneID", type: :integer
42
+ attribute :type_id, xpath: "@typeID", type: :integer
43
+ attribute :location_id, xpath: "@locationID", type: :integer
44
+ attribute :clone_name, xpath: "@cloneName", type: :string
45
+ end
46
+
47
+ rowset :jump_clone_implants, xpath: "eveapi/result/rowset[@name='jumpCloneImplants']" do
48
+ attribute :jump_clone_id, xpath: "@jumpCloneID", type: :integer
49
+ attribute :type_id, xpath: "@typeID", type: :integer
50
+ attribute :type_name, xpath: "@typeName", type: :string
51
+ end
52
+
53
+ # @param character_id [Integer] EVE character ID
54
+ def initialize(character_id, opts = {})
55
+ opts[:query_params] = { "characterID" => character_id }
56
+ super(opts)
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,58 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # The character’s personal, corporation, and alliance contacts.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contactlist.html
8
+ class ContactList < Greeve::BaseItem
9
+ endpoint "char/ContactList"
10
+
11
+ rowset :contact_list, xpath: "eveapi/result/rowset[@name='contactList']" do
12
+ attribute :contact_id, xpath: "@contactID", type: :integer
13
+ attribute :contact_name, xpath: "@contactName", type: :string
14
+ attribute :standing, xpath: "@standing", type: :integer
15
+ attribute :contact_type_id, xpath: "@contactTypeID", type: :integer
16
+ attribute :label_mask, xpath: "@labelMask", type: :integer
17
+ attribute :in_watchlist, xpath: "@inWatchlist", type: :boolean
18
+ end
19
+
20
+ rowset :contact_labels, xpath: "eveapi/result/rowset[@name='contactLabels']" do
21
+ attribute :label_id, xpath: "@labelID", type: :integer
22
+ attribute :name, xpath: "@name", type: :string
23
+ end
24
+
25
+ rowset :corporate_contact_list, xpath: "eveapi/result/rowset[@name='corporateContactList']" do
26
+ attribute :contact_id, xpath: "@contactID", type: :integer
27
+ attribute :contact_name, xpath: "@contactName", type: :string
28
+ attribute :standing, xpath: "@standing", type: :integer
29
+ attribute :contact_type_id, xpath: "@contactTypeID", type: :integer
30
+ attribute :label_mask, xpath: "@labelMask", type: :integer
31
+ end
32
+
33
+ rowset :corporate_contact_labels, xpath: "eveapi/result/rowset[@name='corporateContactLabels']" do
34
+ attribute :label_id, xpath: "@labelID", type: :integer
35
+ attribute :name, xpath: "@name", type: :string
36
+ end
37
+
38
+ rowset :alliance_contact_list, xpath: "eveapi/result/rowset[@name='allianceContactList']" do
39
+ attribute :contact_id, xpath: "@contactID", type: :integer
40
+ attribute :contact_name, xpath: "@contactName", type: :string
41
+ attribute :standing, xpath: "@standing", type: :integer
42
+ attribute :contact_type_id, xpath: "@contactTypeID", type: :integer
43
+ attribute :label_mask, xpath: "@labelMask", type: :integer
44
+ end
45
+
46
+ rowset :alliance_contact_labels, xpath: "eveapi/result/rowset[@name='allianceContactLabels']" do
47
+ attribute :label_id, xpath: "@labelID", type: :integer
48
+ attribute :name, xpath: "@name", type: :string
49
+ end
50
+
51
+ # @param character_id [Integer] EVE character ID
52
+ def initialize(character_id, opts = {})
53
+ opts[:query_params] = { "characterID" => character_id }
54
+ super(opts)
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,26 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Notifications received when having been added to someone’s contact list.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contactnotifications.html
8
+ class ContactNotifications < Greeve::BaseItem
9
+ endpoint "char/ContactNotifications"
10
+
11
+ rowset :contact_notifications, xpath: "eveapi/result/rowset[@name='contactNotifications']" do
12
+ attribute :notification_id, xpath: "@notificationID", type: :integer
13
+ attribute :sender_id, xpath: "@senderID", type: :integer
14
+ attribute :sender_name, xpath: "@senderName", type: :string
15
+ attribute :sent_date, xpath: "@sentDate", type: :datetime
16
+ attribute :message_data, xpath: "@messageData", type: :hash
17
+ end
18
+
19
+ # @param character_id [Integer] EVE character ID
20
+ def initialize(character_id, opts = {})
21
+ opts[:query_params] = { "characterID" => character_id }
22
+ super(opts)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Bids that have been placed on the character's auctions.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contractbids.html
8
+ class ContractBids < Greeve::BaseItem
9
+ endpoint "char/ContractBids"
10
+
11
+ rowset :bid_list, xpath: "eveapi/result/rowset[@name='bidList']" do
12
+ attribute :amount, xpath: "@amount", type: :numeric
13
+ attribute :date_bid, xpath: "@dateBid", type: :datetime
14
+ attribute :bidder_id, xpath: "@bidderID", type: :integer
15
+ attribute :contract_id, xpath: "@contractID", type: :integer
16
+ attribute :bid_id, xpath: "@bidID", type: :integer
17
+ end
18
+
19
+ # @param character_id [Integer] EVE character ID
20
+ def initialize(character_id, opts = {})
21
+ opts[:query_params] = { "characterID" => character_id }
22
+ super(opts)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,32 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Items and details of a particular contract.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contractitems.html
8
+ class ContractItems < Greeve::BaseItem
9
+ endpoint "char/ContractItems"
10
+
11
+ rowset :item_list, xpath: "eveapi/result/rowset[@name='itemList']" do
12
+ attribute :record_id, xpath: "@recordID", type: :integer
13
+ attribute :type_id, xpath: "@typeID", type: :integer
14
+ attribute :quantity, xpath: "@quantity", type: :integer
15
+ attribute :raw_quantity, xpath: "@rawQuantity", type: :integer
16
+ attribute :singleton, xpath: "@singleton", type: :boolean
17
+ attribute :included, xpath: "@included", type: :boolean
18
+ end
19
+
20
+ # @param character_id [Integer] EVE character ID
21
+ # @param contract_id [Integer] ID of the contract
22
+ def initialize(character_id, contract_id, opts = {})
23
+ opts[:query_params] = {
24
+ "characterID" => character_id,
25
+ "contractID" => contract_id,
26
+ }
27
+
28
+ super(opts)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,49 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Available contracts from a character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contracts.html
8
+ class Contracts < Greeve::BaseItem
9
+ endpoint "char/Contracts"
10
+
11
+ rowset :contract_list, xpath: "eveapi/result/rowset[@name='contractList']" do
12
+ attribute :contract_id, xpath: "@contractID", type: :integer
13
+ attribute :issuer_id, xpath: "@issuerID", type: :integer
14
+ attribute :issuer_corp_id, xpath: "@issuerCorpID", type: :integer
15
+ attribute :assignee_id, xpath: "@assigneeID", type: :integer
16
+ attribute :acceptor_id, xpath: "@acceptorID", type: :integer
17
+ attribute :start_station_id, xpath: "@startStationID", type: :integer
18
+ attribute :end_station_id, xpath: "@endStationID", type: :integer
19
+ attribute :type, xpath: "@type", type: :string
20
+ attribute :status, xpath: "@status", type: :string
21
+ attribute :title, xpath: "@title", type: :string
22
+ attribute :for_corp, xpath: "@forCorp", type: :boolean
23
+ attribute :availability, xpath: "@availability", type: :string
24
+ attribute :date_issued, xpath: "@dateIssued", type: :datetime
25
+ attribute :date_expired, xpath: "@dateExpired", type: :datetime
26
+ attribute :date_accepted, xpath: "@dateAccepted", type: :datetime
27
+ attribute :num_days, xpath: "@numDays", type: :integer
28
+ attribute :date_completed, xpath: "@dateCompleted", type: :datetime
29
+ attribute :price, xpath: "@price", type: :numeric
30
+ attribute :reward, xpath: "@reward", type: :numeric
31
+ attribute :collateral, xpath: "@collateral", type: :numeric
32
+ attribute :buyout, xpath: "@buyout", type: :numeric
33
+ attribute :volume, xpath: "@volume", type: :numeric
34
+ end
35
+
36
+ # @param character_id [Integer] EVE character ID
37
+ #
38
+ # @option opts [Integer] :contract_id (nil) ID of a specific contract
39
+ def initialize(character_id, opts = {})
40
+ contract_id = opts.delete(:contract_id)
41
+
42
+ opts[:query_params] = { "characterID" => character_id }
43
+ opts[:query_params]["contractID"] = contract_id if contract_id
44
+
45
+ super(opts)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,30 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Faction warfare information for characters enrolled in faction warfare.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_facwarstats.html
8
+ class FacWarStats < Greeve::BaseItem
9
+ endpoint "char/FacWarStats"
10
+
11
+ attribute :faction_id, xpath: "eveapi/result/factionID/?[0]", type: :integer
12
+ attribute :faction_name, xpath: "eveapi/result/factionName/?[0]", type: :string
13
+ attribute :enlisted, xpath: "eveapi/result/enlisted/?[0]", type: :datetime
14
+ attribute :current_rank, xpath: "eveapi/result/currentRank/?[0]", type: :integer
15
+ attribute :highest_rank, xpath: "eveapi/result/highestRank/?[0]", type: :integer
16
+ attribute :kills_yesterday, xpath: "eveapi/result/killsYesterday/?[0]", type: :integer
17
+ attribute :kills_last_week, xpath: "eveapi/result/killsLastWeek/?[0]", type: :integer
18
+ attribute :kills_total, xpath: "eveapi/result/killsTotal/?[0]", type: :integer
19
+ attribute :victory_points_yesterday, xpath: "eveapi/result/victoryPointsYesterday/?[0]", type: :integer
20
+ attribute :victory_points_last_week, xpath: "eveapi/result/victoryPointsLastWeek/?[0]", type: :integer
21
+ attribute :victory_points_total, xpath: "eveapi/result/victoryPointsTotal/?[0]", type: :integer
22
+
23
+ # @param character_id [Integer] EVE character ID
24
+ def initialize(character_id, opts = {})
25
+ opts[:query_params] = { "characterID" => character_id }
26
+ super(opts)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,48 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Unfinished character industry jobs.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_industryjobs.html
8
+ class IndustryJobs < Greeve::BaseItem
9
+ endpoint "char/IndustryJobs"
10
+
11
+ rowset :jobs, xpath: "eveapi/result/rowset[@name='jobs']" do
12
+ attribute :job_id, xpath: "@jobID", type: :integer
13
+ attribute :installer_id, xpath: "@installerID", type: :integer
14
+ attribute :installer_name, xpath: "@installerName", type: :string
15
+ attribute :facility_id, xpath: "@facilityID", type: :integer
16
+ attribute :solar_system_id, xpath: "@solarSystemID", type: :integer
17
+ attribute :solar_system_name, xpath: "@solarSystemName", type: :string
18
+ attribute :station_id, xpath: "@stationID", type: :integer
19
+ attribute :activity_id, xpath: "@activityID", type: :integer
20
+ attribute :blueprint_id, xpath: "@blueprintID", type: :integer
21
+ attribute :blueprint_type_id, xpath: "@blueprintTypeID", type: :integer
22
+ attribute :blueprint_type_name, xpath: "@blueprintTypeName", type: :string
23
+ attribute :blueprint_location_id, xpath: "@blueprintLocationID", type: :integer
24
+ attribute :output_location_id, xpath: "@outputLocationID", type: :integer
25
+ attribute :runs, xpath: "@runs", type: :integer
26
+ attribute :cost, xpath: "@cost", type: :numeric
27
+ attribute :licensed_runs, xpath: "@licensedRuns", type: :integer
28
+ attribute :probability, xpath: "@probability", type: :numeric
29
+ attribute :product_type_id, xpath: "@productTypeID", type: :integer
30
+ attribute :product_type_name, xpath: "@productTypeName", type: :string
31
+ attribute :status, xpath: "@status", type: :integer
32
+ attribute :time_in_seconds, xpath: "@timeInSeconds", type: :integer
33
+ attribute :start_date, xpath: "@startDate", type: :datetime
34
+ attribute :end_date, xpath: "@endDate", type: :datetime
35
+ attribute :pause_date, xpath: "@pauseDate", type: :datetime
36
+ attribute :completed_date, xpath: "@completedDate", type: :datetime
37
+ attribute :completed_character_id, xpath: "@completedCharacterID", type: :integer
38
+ attribute :successful_runs, xpath: "@successfulRuns", type: :integer
39
+ end
40
+
41
+ # @param character_id [Integer] EVE character ID
42
+ def initialize(character_id, opts = {})
43
+ opts[:query_params] = { "characterID" => character_id }
44
+ super(opts)
45
+ end
46
+ end
47
+ end
48
+ end