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,48 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Finished character industry jobs.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_industryjobshistory.html
8
+ class IndustryJobsHistory < Greeve::BaseItem
9
+ endpoint "char/IndustryJobsHistory"
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
@@ -0,0 +1,36 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Location and name of specific items that belong to the character of the
6
+ # api key. This call can be used to retrieve the player-set name of
7
+ # containers and ships.
8
+ #
9
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_locations.html
10
+ class Locations < Greeve::BaseItem
11
+ endpoint "char/Locations"
12
+
13
+ rowset :locations, xpath: "eveapi/result/rowset[@name='locations']" do
14
+ attribute :item_id, xpath: "@itemID", type: :integer
15
+ attribute :item_name, xpath: "@itemName", type: :string
16
+ attribute :x, xpath: "@x", type: :numeric
17
+ attribute :y, xpath: "@y", type: :numeric
18
+ attribute :z, xpath: "@z", type: :numeric
19
+ end
20
+
21
+ # @param character_id [Integer] EVE character ID
22
+ #
23
+ # @option opts [Array<Integer>, Integer] :ids (nil) ID or array of IDs of
24
+ # items belonging to the character
25
+ def initialize(character_id, opts = {})
26
+ ids = opts.delete(:ids)
27
+ ids = [ids] unless ids.nil? || ids.is_a?(Array)
28
+
29
+ opts[:query_params] = { "characterID" => character_id }
30
+ opts[:query_params]["IDs"] = ids.join(",") if ids
31
+
32
+ super(opts)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,33 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Bodies of eve mail messages sent to the character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_mailbodies.html
8
+ class MailBodies < Greeve::BaseItem
9
+ endpoint "char/MailBodies"
10
+
11
+ rowset :messages, xpath: "eveapi/result/rowset[@name='messages']" do
12
+ attribute :message_id, xpath: "@messageID", type: :integer
13
+ attribute :message_text, xpath: "?[0]", type: :string
14
+ end
15
+
16
+ # @param character_id [Integer] EVE character ID
17
+ # @param message_ids [*Array<Integer>, Integer] either a single message ID,
18
+ # or a list of message IDs
19
+ #
20
+ # @!method initialize(character_id, *message_ids, opts = {})
21
+ def initialize(character_id, *message_ids)
22
+ opts = message_ids.last.is_a?(Hash) ? message_ids.pop : {}
23
+
24
+ opts[:query_params] = {
25
+ "characterID" => character_id,
26
+ "IDs" => message_ids.join(","),
27
+ }
28
+
29
+ super(opts)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,29 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # The header of eve mail messages sent to the character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_mailmessages.html
8
+ class MailMessages < Greeve::BaseItem
9
+ endpoint "char/MailMessages"
10
+
11
+ rowset :messages, xpath: "eveapi/result/rowset[@name='messages']" do
12
+ attribute :message_id, xpath: "@messageID", 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 :title, xpath: "@title", type: :string
17
+ attribute :to_corp_or_alliance_id, xpath: "@toCorpOrAllianceID", type: :integer
18
+ attribute :to_character_ids, xpath: "@toCharacterIDs", type: :integer_array
19
+ attribute :to_list_id, xpath: "@toListID", type: :integer
20
+ end
21
+
22
+ # @param character_id [Integer] EVE character ID
23
+ def initialize(character_id, opts = {})
24
+ opts[:query_params] = { "characterID" => character_id }
25
+ super(opts)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Mailing lists the character is a member of.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_mailinglists.html
8
+ class MailingLists < Greeve::BaseItem
9
+ endpoint "char/MailingLists"
10
+
11
+ rowset :mailing_lists, xpath: "eveapi/result/rowset[@name='mailingLists']" do
12
+ attribute :list_id, xpath: "@listID", type: :integer
13
+ attribute :display_name, xpath: "@displayName", type: :string
14
+ end
15
+
16
+ # @param character_id [Integer] EVE character ID
17
+ def initialize(character_id, opts = {})
18
+ opts[:query_params] = { "characterID" => character_id }
19
+ super(opts)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,42 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character market orders.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_marketorders.html
8
+ class MarketOrders < Greeve::BaseItem
9
+ endpoint "char/MarketOrders"
10
+
11
+ rowset :orders, xpath: "eveapi/result/rowset[@name='orders']" do
12
+ attribute :order_id, xpath: "@orderID", type: :integer
13
+ attribute :char_id, xpath: "@charID", type: :integer
14
+ attribute :station_id, xpath: "@stationID", type: :integer
15
+ attribute :vol_entered, xpath: "@volEntered", type: :integer
16
+ attribute :vol_remaining, xpath: "@volRemaining", type: :integer
17
+ attribute :min_volume, xpath: "@minVolume", type: :integer
18
+ attribute :order_state, xpath: "@orderState", type: :integer
19
+ attribute :type_id, xpath: "@typeID", type: :integer
20
+ attribute :range, xpath: "@range", type: :integer
21
+ attribute :account_key, xpath: "@accountKey", type: :integer
22
+ attribute :duration, xpath: "@duration", type: :integer
23
+ attribute :escrow, xpath: "@escrow", type: :numeric
24
+ attribute :price, xpath: "@price", type: :numeric
25
+ attribute :bid, xpath: "@bid", type: :boolean
26
+ attribute :issued, xpath: "@issued", type: :datetime
27
+ end
28
+
29
+ # @param character_id [Integer] EVE character ID
30
+ #
31
+ # @option opts [Integer] :order_id Optional order ID of order to retrieve
32
+ def initialize(character_id, opts = {})
33
+ order_id = opts.delete(:order_id)
34
+
35
+ opts[:query_params] = { "characterID" => character_id }
36
+ opts[:query_params]["orderID"] = order_id if order_id
37
+
38
+ super(opts)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,40 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Medals the character has received.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_medals.html
8
+ class Medals < Greeve::BaseItem
9
+ endpoint "char/Medals"
10
+
11
+ rowset :current_corporation, xpath: "eveapi/result/rowset[@name='currentCorporation']" do
12
+ attribute :medal_id, xpath: "@medalID", type: :integer
13
+ attribute :reason, xpath: "@reason", type: :string
14
+ attribute :status, xpath: "@status", type: :string
15
+ attribute :issuer_id, xpath: "@issuerID", type: :integer
16
+ attribute :issued, xpath: "@issued", type: :datetime
17
+ attribute :corporation_id, xpath: "@corporationID", type: :integer
18
+ attribute :title, xpath: "@title", type: :string
19
+ attribute :description, xpath: "@description", type: :string
20
+ end
21
+
22
+ rowset :other_corporations, xpath: "eveapi/result/rowset[@name='otherCorporations']" do
23
+ attribute :medal_id, xpath: "@medalID", type: :integer
24
+ attribute :reason, xpath: "@reason", type: :string
25
+ attribute :status, xpath: "@status", type: :string
26
+ attribute :issuer_id, xpath: "@issuerID", type: :integer
27
+ attribute :issued, xpath: "@issued", type: :datetime
28
+ attribute :corporation_id, xpath: "@corporationID", type: :integer
29
+ attribute :title, xpath: "@title", type: :string
30
+ attribute :description, xpath: "@description", type: :string
31
+ end
32
+
33
+ # @param character_id [Integer] EVE character ID
34
+ def initialize(character_id, opts = {})
35
+ opts[:query_params] = { "characterID" => character_id }
36
+ super(opts)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,27 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character notifications.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_notifications.html
8
+ class Notifications < Greeve::BaseItem
9
+ endpoint "char/Notifications"
10
+
11
+ rowset :notifications, xpath: "eveapi/result/rowset[@name='notifications']" do
12
+ attribute :notification_id, xpath: "@notificationID", type: :integer
13
+ attribute :type_id, xpath: "@typeID", type: :integer
14
+ attribute :sender_id, xpath: "@senderID", type: :integer
15
+ attribute :sender_name, xpath: "@senderName", type: :string
16
+ attribute :sent_date, xpath: "@sentDate", type: :datetime
17
+ attribute :read, xpath: "@read", type: :boolean
18
+ end
19
+
20
+ # @param character_id [Integer] EVE character ID
21
+ def initialize(character_id, opts = {})
22
+ opts[:query_params] = { "characterID" => character_id }
23
+ super(opts)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,32 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Planetary colonies owned by character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_planetarycolonies.html
8
+ class PlanetaryColonies < Greeve::BaseItem
9
+ endpoint "char/PlanetaryColonies"
10
+
11
+ rowset :colonies, xpath: "eveapi/result/rowset[@name='colonies']" do
12
+ attribute :solar_system_id, xpath: "@solarSystemID", type: :integer
13
+ attribute :solar_system_name, xpath: "@solarSystemName", type: :string
14
+ attribute :planet_id, xpath: "@planetID", type: :integer
15
+ attribute :planet_name, xpath: "@planetName", type: :string
16
+ attribute :planet_type_id, xpath: "@planetTypeID", type: :integer
17
+ attribute :planet_type_name, xpath: "@planetTypeName", type: :string
18
+ attribute :owner_id, xpath: "@ownerID", type: :integer
19
+ attribute :owner_name, xpath: "@ownerName", type: :string
20
+ attribute :last_update, xpath: "@lastUpdate", type: :datetime
21
+ attribute :upgrade_level, xpath: "@upgradeLevel", type: :integer
22
+ attribute :number_of_pins, xpath: "@numberOfPins", type: :integer
23
+ end
24
+
25
+ # @param character_id [Integer] EVE character ID
26
+ def initialize(character_id, opts = {})
27
+ opts[:query_params] = { "characterID" => character_id }
28
+ super(opts)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,30 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Planetary links for colonies owned by character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_planetarylinks.html
8
+ class PlanetaryLinks < Greeve::BaseItem
9
+ endpoint "char/PlanetaryLinks"
10
+
11
+ rowset :links, xpath: "eveapi/result/rowset[@name='links']" do
12
+ attribute :source_pin_id, xpath: "@sourcePinID", type: :integer
13
+ attribute :destination_pin_id, xpath: "@destinationPinID", type: :integer
14
+ attribute :link_level, xpath: "@linkLevel", type: :integer
15
+ end
16
+
17
+ # @param character_id [Integer] EVE character ID
18
+ # @param planet_id [Integer] planet ID. Can be obtained from
19
+ # {Character::PlanetaryColonies}
20
+ def initialize(character_id, planet_id, opts = {})
21
+ opts[:query_params] = {
22
+ "characterID" => character_id,
23
+ "planetID" => planet_id,
24
+ }
25
+
26
+ super(opts)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,41 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Planetary pins for colonies owned by character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_planetarypins.html
8
+ class PlanetaryPins < Greeve::BaseItem
9
+ endpoint "char/PlanetaryPins"
10
+
11
+ rowset :pins, xpath: "eveapi/result/rowset[@name='pins']" do
12
+ attribute :pin_id, xpath: "@pinID", type: :integer
13
+ attribute :type_id, xpath: "@typeID", type: :integer
14
+ attribute :type_name, xpath: "@typeName", type: :string
15
+ attribute :schematic_id, xpath: "@schematicID", type: :integer
16
+ attribute :last_launch_time, xpath: "@lastLaunchTime", type: :datetime
17
+ attribute :cycle_time, xpath: "@cycleTime", type: :integer
18
+ attribute :quantity_per_cycle, xpath: "@quantityPerCycle", type: :integer
19
+ attribute :install_time, xpath: "@installTime", type: :datetime
20
+ attribute :expiry_time, xpath: "@expiryTime", type: :datetime
21
+ attribute :content_type_id, xpath: "@contentTypeID", type: :integer
22
+ attribute :content_type_name, xpath: "@contentTypeName", type: :string
23
+ attribute :content_quantity, xpath: "@contentQuantity", type: :integer
24
+ attribute :longitude, xpath: "@longitude", type: :numeric
25
+ attribute :latitude, xpath: "@latitude", type: :numeric
26
+ end
27
+
28
+ # @param character_id [Integer] EVE character ID
29
+ # @param planet_id [Integer] planet ID. Can be obtained from
30
+ # {Character::PlanetaryColonies}
31
+ def initialize(character_id, planet_id, opts = {})
32
+ opts[:query_params] = {
33
+ "characterID" => character_id,
34
+ "planetID" => planet_id,
35
+ }
36
+
37
+ super(opts)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,38 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Planetary routes for colonies owned by character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_planetaryroutes.html
8
+ class PlanetaryRoutes < Greeve::BaseItem
9
+ endpoint "char/PlanetaryRoutes"
10
+
11
+ rowset :routes, xpath: "eveapi/result/rowset[@name='routes']" do
12
+ attribute :route_id, xpath: "@routeID", type: :integer
13
+ attribute :source_pin_id, xpath: "@sourcePinID", type: :integer
14
+ attribute :destination_pin_id, xpath: "@destinationPinID", type: :integer
15
+ attribute :content_type_id, xpath: "@contentTypeID", type: :integer
16
+ attribute :content_type_name, xpath: "@contentTypeName", type: :string
17
+ attribute :quantity, xpath: "@quantity", type: :integer
18
+ attribute :waypoint_1, xpath: "@waypoint1", type: :integer
19
+ attribute :waypoint_2, xpath: "@waypoint2", type: :integer
20
+ attribute :waypoint_3, xpath: "@waypoint3", type: :integer
21
+ attribute :waypoint_4, xpath: "@waypoint4", type: :integer
22
+ attribute :waypoint_5, xpath: "@waypoint5", type: :integer
23
+ end
24
+
25
+ # @param character_id [Integer] EVE character ID
26
+ # @param planet_id [Integer] planet ID. Can be obtained from
27
+ # {Character::PlanetaryColonies}
28
+ def initialize(character_id, planet_id, opts = {})
29
+ opts[:query_params] = {
30
+ "characterID" => character_id,
31
+ "planetID" => planet_id,
32
+ }
33
+
34
+ super(opts)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,26 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character research.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_research.html
8
+ class Research < Greeve::BaseItem
9
+ endpoint "char/Research"
10
+
11
+ rowset :research, xpath: "eveapi/result/rowset[@name='research']" do
12
+ attribute :agent_id, xpath: "@agentID", type: :integer
13
+ attribute :skill_type_id, xpath: "@skillTypeID", type: :integer
14
+ attribute :research_start_date, xpath: "@researchStartDate", type: :datetime
15
+ attribute :points_per_day, xpath: "@pointsPerDay", type: :numeric
16
+ attribute :remainder_points, xpath: "@remainderPoints", type: :numeric
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