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,31 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Location of an item or character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_locations.html
8
+ class Locations < Greeve::BaseItem
9
+ endpoint "corp/Locations"
10
+
11
+ rowset :locations, xpath: "eveapi/result/rowset[@name='locations']" do
12
+ attribute :item_id, xpath: "@itemID", type: :integer
13
+ attribute :item_name, xpath: "@itemName", type: :string
14
+ attribute :x, xpath: "@x", type: :integer
15
+ attribute :y, xpath: "@y", type: :integer
16
+ attribute :z, xpath: "@z", type: :integer
17
+ end
18
+
19
+ # @param ids [Array<Integer>] IDs of items to retrieve location info for
20
+ #
21
+ # @!method initialize(*ids, opts = {})
22
+ def initialize(*ids)
23
+ opts = ids.last.is_a?(Hash) ? ids.pop : {}
24
+
25
+ opts[:query_params] = { "IDs" => ids.join(",") }
26
+
27
+ super(opts)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,39 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Corporation market orders.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_marketorders.html
8
+ class MarketOrders < Greeve::BaseItem
9
+ endpoint "corp/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
+ # @option opts [Integer] :order_id (nil) ID of an order to retrieve
30
+ def initialize(opts = {})
31
+ order_id = opts.delete(:order_id)
32
+
33
+ opts[:query_params] = { "orderID" => order_id } if order_id
34
+
35
+ super(opts)
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,38 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Information about the members of a corporation.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_membertracking.html
8
+ class MemberTracking < Greeve::BaseItem
9
+ endpoint "corp/MemberTracking"
10
+
11
+ rowset :members, xpath: "eveapi/result/rowset[@name='members']" do
12
+ attribute :character_id, xpath: "@characterID", type: :integer
13
+ attribute :name, xpath: "@name", type: :string
14
+ attribute :start_date_time, xpath: "@startDateTime", type: :datetime
15
+ attribute :base_id, xpath: "@baseID", type: :integer
16
+ attribute :base, xpath: "@base", type: :string
17
+ attribute :title, xpath: "@title", type: :string
18
+ attribute :logon_date_time, xpath: "@logonDateTime", type: :datetime
19
+ attribute :logoff_date_time, xpath: "@logoffDateTime", type: :datetime
20
+ attribute :location_id, xpath: "@locationID", type: :integer
21
+ attribute :location, xpath: "@location", type: :string
22
+ attribute :ship_type_id, xpath: "@shipTypeID", type: :integer
23
+ attribute :ship_type, xpath: "@shipType", type: :string
24
+ attribute :roles, xpath: "@roles", type: :integer
25
+ attribute :grantable_roles, xpath: "@grantableRoles", type: :integer
26
+ end
27
+
28
+ # @option opts [Boolean] :extended (false) query extended member tracking info
29
+ def initialize(opts = {})
30
+ extended = !!opts.delete(:extended)
31
+
32
+ opts[:query_params] = { "extended" => 1 } if extended
33
+
34
+ super(opts)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,30 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Standings that non-player entities have to the corporation.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_standings.html
8
+ class Standings < Greeve::BaseItem
9
+ endpoint "corp/Standings"
10
+
11
+ rowset :agents, xpath: "eveapi/result/corporationNPCStandings/rowset[@name='agents']" do
12
+ attribute :from_id, xpath: "@fromID", type: :integer
13
+ attribute :from_name, xpath: "@fromName", type: :string
14
+ attribute :standing, xpath: "@standing", type: :numeric
15
+ end
16
+
17
+ rowset :npc_corporations, xpath: "eveapi/result/corporationNPCStandings/rowset[@name='NPCCorporations']" do
18
+ attribute :from_id, xpath: "@fromID", type: :integer
19
+ attribute :from_name, xpath: "@fromName", type: :string
20
+ attribute :standing, xpath: "@standing", type: :numeric
21
+ end
22
+
23
+ rowset :factions, xpath: "eveapi/result/corporationNPCStandings/rowset[@name='factions']" do
24
+ attribute :from_id, xpath: "@fromID", type: :integer
25
+ attribute :from_name, xpath: "@fromName", type: :string
26
+ attribute :standing, xpath: "@standing", type: :numeric
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,58 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Details for a starbase.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_starbasedetail.html
8
+ class StarbaseDetail < Greeve::BaseItem
9
+ endpoint "corp/StarbaseDetail"
10
+
11
+ attribute :state, xpath: "eveapi/result/state/?[0]", type: :integer
12
+ attribute :state_timestamp, xpath: "eveapi/result/stateTimestamp/?[0]", type: :datetime
13
+ attribute :online_timestamp, xpath: "eveapi/result/onlineTimestamp/?[0]", type: :datetime
14
+
15
+ namespace :general_settings, xpath: "eveapi/result/generalSettings" do
16
+ attribute :usage_flags, xpath: "usageFlags/?[0]", type: :integer
17
+ attribute :deploy_flags, xpath: "deployFlags/?[0]", type: :integer
18
+ attribute :allow_corporation_members, xpath: "allowCorporationMembers/?[0]", type: :boolean
19
+ attribute :allow_alliance_members, xpath: "allowAllianceMembers/?[0]", type: :boolean
20
+ end
21
+
22
+ namespace :combat_settings, xpath: "eveapi/result/combatSettings" do
23
+ namespace :use_standings_from, xpath: "useStandingsFrom" do
24
+ attribute :owner_id, xpath: "@ownerID", type: :integer
25
+ end
26
+
27
+ namespace :on_standing_drop, xpath: "onStandingDrop" do
28
+ attribute :standing, xpath: "@standing", type: :integer
29
+ end
30
+
31
+ namespace :on_status_drop, xpath: "onStatusDrop" do
32
+ attribute :enabled, xpath: "@enabled", type: :boolean
33
+ attribute :standing, xpath: "@standing", type: :integer
34
+ end
35
+
36
+ namespace :on_aggression, xpath: "onAggression" do
37
+ attribute :enabled, xpath: "@enabled", type: :boolean
38
+ end
39
+
40
+ namespace :on_corporation_war, xpath: "onCorporationWar" do
41
+ attribute :enabled, xpath: "@enabled", type: :boolean
42
+ end
43
+ end
44
+
45
+ rowset :fuel, xpath: "eveapi/result/rowset[@name='fuel']" do
46
+ attribute :type_id, xpath: "@typeID", type: :integer
47
+ attribute :quantity, xpath: "@quantity", type: :integer
48
+ end
49
+
50
+ # @param item_id [Integer] ID of the POS as given in the {StarbaseList}
51
+ def initialize(item_id, opts = {})
52
+ opts[:query_params] = { "itemID" => item_id }
53
+
54
+ super(opts)
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # List of corporation starbases.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_starbaselist.html
8
+ class StarbaseList < Greeve::BaseItem
9
+ endpoint "corp/StarbaseList"
10
+
11
+ rowset :starbases, xpath: "eveapi/result/rowset[@name='starbases']" do
12
+ attribute :item_id, xpath: "@itemID", type: :integer
13
+ attribute :type_id, xpath: "@typeID", type: :integer
14
+ attribute :location_id, xpath: "@locationID", type: :integer
15
+ attribute :moon_id, xpath: "@moonID", type: :integer
16
+ attribute :state, xpath: "@state", type: :integer
17
+ attribute :state_timestamp, xpath: "@stateTimestamp", type: :datetime
18
+ attribute :online_timestamp, xpath: "@onlineTimestamp", type: :datetime
19
+ attribute :standing_owner_id, xpath: "@standingOwnerID", type: :integer
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,48 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Corporation wallet journal.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_walletjournal.html
8
+ class WalletJournal < Greeve::BaseItem
9
+ endpoint "corp/WalletJournal"
10
+
11
+ rowset :entries, xpath: "eveapi/result/rowset[@name='entries']" do
12
+ attribute :date, xpath: "@date", type: :datetime
13
+ attribute :ref_id, xpath: "@refID", type: :integer
14
+ attribute :ref_type_id, xpath: "@refTypeID", type: :integer
15
+ attribute :owner_name_1, xpath: "@ownerName1", type: :string
16
+ attribute :owner_id_1, xpath: "@ownerID1", type: :integer
17
+ attribute :owner_name_2, xpath: "@ownerName2", type: :string
18
+ attribute :owner_id_2, xpath: "@ownerID2", type: :integer
19
+ attribute :arg_name_1, xpath: "@argName1", type: :string
20
+ attribute :arg_id_1, xpath: "@argID1", type: :integer
21
+ attribute :amount, xpath: "@amount", type: :numeric
22
+ attribute :balance, xpath: "@balance", type: :numeric
23
+ attribute :reason, xpath: "@reason", type: :string
24
+ attribute :owner_1_type_id, xpath: "@owner1TypeID", type: :integer
25
+ attribute :owner_2_type_id, xpath: "@owner2TypeID", type: :integer
26
+ end
27
+
28
+ # @option opts [Integer] :account_key account key of the wallet for which
29
+ # journal entries will be returned (1000 - 1006)
30
+ # @option opts [Integer] :from_id upper bound for the ref_id of returned
31
+ # journal entries. Normally used to walk the journal backwards
32
+ # @option opts [Integer] :row_count limit on the number of rows to return.
33
+ # Default is 1000, max is 2560
34
+ def initialize(opts = {})
35
+ account_key = opts[:account_key]
36
+ from_id = opts[:from_id]
37
+ row_count = opts[:row_count]
38
+
39
+ opts[:query_params] = {}
40
+ opts[:query_params]["accountKey"] = account_key if account_key
41
+ opts[:query_params]["fromID"] = from_id if from_id
42
+ opts[:query_params]["rowCount"] = row_count if row_count
43
+
44
+ super(opts)
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,50 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Corporation wallet transactions.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_wallettransactions.html
8
+ class WalletTransactions < Greeve::BaseItem
9
+ endpoint "corp/WalletTransactions"
10
+
11
+ rowset :transactions, xpath: "eveapi/result/rowset[@name='transactions']" do
12
+ attribute :transaction_date_time, xpath: "@transactionDateTime", type: :datetime
13
+ attribute :transaction_id, xpath: "@transactionID", type: :integer
14
+ attribute :quantity, xpath: "@quantity", type: :integer
15
+ attribute :type_name, xpath: "@typeName", type: :string
16
+ attribute :type_id, xpath: "@typeID", type: :integer
17
+ attribute :price, xpath: "@price", type: :numeric
18
+ attribute :client_id, xpath: "@clientID", type: :integer
19
+ attribute :client_name, xpath: "@clientName", type: :string
20
+ attribute :character_id, xpath: "@characterID", type: :integer
21
+ attribute :character_name, xpath: "@characterName", type: :string
22
+ attribute :station_id, xpath: "@stationID", type: :integer
23
+ attribute :station_name, xpath: "@stationName", type: :string
24
+ attribute :transaction_type, xpath: "@transactionType", type: :string
25
+ attribute :transaction_for, xpath: "@transactionFor", type: :string
26
+ attribute :journal_transaction_id, xpath: "@journalTransactionID", type: :integer
27
+ attribute :client_type_id, xpath: "@clientTypeID", type: :integer
28
+ end
29
+
30
+ # @option opts [Integer] :account_key account key of the wallet for which
31
+ # transactions will be returned (1000 - 1006)
32
+ # @option opts [Integer] :from_id upper bound for the ref_id of returned
33
+ # transactions. Normally used to walk the transaction log backwards
34
+ # @option opts [Integer] :row_count limit on the number of rows to return.
35
+ # Default is 1000, max is 2560
36
+ def initialize(opts = {})
37
+ account_key = opts[:account_key]
38
+ from_id = opts[:from_id]
39
+ row_count = opts[:row_count]
40
+
41
+ opts[:query_params] = {}
42
+ opts[:query_params]["accountKey"] = account_key if account_key
43
+ opts[:query_params]["fromID"] = from_id if from_id
44
+ opts[:query_params]["rowCount"] = row_count if row_count
45
+
46
+ super(opts)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,29 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Eve
5
+ # Returns active alliances in New Eden and their member corporations.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/eve/eve_alliancelist.html
8
+ class AllianceList < Greeve::BaseItem
9
+ endpoint "eve/AllianceList"
10
+
11
+ rowset :alliances, xpath: "eveapi/result/rowset[@name='alliances']" do
12
+ attribute :name, xpath: "@name", type: :string
13
+ attribute :short_name, xpath: "@shortName", type: :string
14
+ attribute :alliance_id, xpath: "@allianceID", type: :integer
15
+ attribute :executor_corp_id, xpath: "@executorCorpID", type: :integer
16
+ attribute :member_count, xpath: "@memberCount", type: :integer
17
+ attribute :start_date, xpath: "@startDate", type: :datetime
18
+ end
19
+
20
+ # @param version [Integer] EVE Alliance List
21
+ def initialize(version, opts = {})
22
+ raise ArgumentError, "not implemented, use version=1" if version == 0
23
+
24
+ opts[:query_params] = { "version" => version }
25
+ super(opts)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,34 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Eve
5
+ # Corporations, alliances, and factions the character(s) are members of.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/eve/eve_characteraffiliation.html
8
+ class CharacterAffiliation < Greeve::BaseItem
9
+ endpoint "eve/CharacterAffiliation"
10
+
11
+ rowset :characters, xpath: "eveapi/result/rowset[@name='characters']" do
12
+ attribute :character_id, xpath: "@characterID", type: :integer
13
+ attribute :character_name, xpath: "@characterName", type: :string
14
+ attribute :corporation_id, xpath: "@corporationID", type: :integer
15
+ attribute :corporation_name, xpath: "@corporationName", type: :string
16
+ attribute :alliance_id, xpath: "@allianceID", type: :integer
17
+ attribute :alliance_name, xpath: "@allianceName", type: :string
18
+ attribute :faction_id, xpath: "@factionID", type: :integer
19
+ attribute :faction_name, xpath: "@factionName", type: :string
20
+ end
21
+
22
+ # @param ids [Array<Integer>] IDs of characters
23
+ #
24
+ # @!method initialize(*ids, opts = {})
25
+ def initialize(*ids)
26
+ opts = ids.last.is_a?(Hash) ? ids.pop : {}
27
+
28
+ opts[:query_params] = { "IDs" => ids.join(",") }
29
+
30
+ super(opts)
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Eve
5
+ # Retrieves character IDs based on names.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/eve/eve_characterid.html
8
+ class CharacterID < Greeve::BaseItem
9
+ endpoint "eve/CharacterID"
10
+
11
+ rowset :characters, xpath: "eveapi/result/rowset[@name='characters']" do
12
+ attribute :name, xpath: "@name", type: :string
13
+ attribute :character_id, xpath: "@characterID", type: :integer
14
+ end
15
+
16
+ # @param names [Array<Integer>] names of characters
17
+ #
18
+ # @!method initialize(*names, opts = {})
19
+ def initialize(*names)
20
+ opts = names.last.is_a?(Hash) ? names.pop : {}
21
+
22
+ opts[:query_params] = { "names" => names.join(",") }
23
+
24
+ super(opts)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -2,7 +2,10 @@ require_relative "../base_item"
2
2
 
3
3
  module Greeve
4
4
  module Eve
5
- # Public character info.
5
+ # Information about the character. Has three data sets it can return
6
+ # depending on the access mask.
7
+ #
8
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/eve/eve_characterinfo.html
6
9
  class CharacterInfo < Greeve::BaseItem
7
10
  endpoint "eve/CharacterInfo"
8
11
 
@@ -0,0 +1,29 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Eve
5
+ # Returns the names for a comma-separated list of owner IDs for characters,
6
+ # corporations, alliances, etc.
7
+ #
8
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/eve/eve_charactername.html
9
+ class CharacterName < Greeve::BaseItem
10
+ endpoint "eve/CharacterName"
11
+
12
+ rowset :characters, xpath: "eveapi/result/rowset[@name='characters']" do
13
+ attribute :name, xpath: "@name", type: :string
14
+ attribute :character_id, xpath: "@characterID", type: :integer
15
+ end
16
+
17
+ # @param ids [Array<Integer>] IDs of characters
18
+ #
19
+ # @!method initialize(*ids, opts = {})
20
+ def initialize(*ids)
21
+ opts = ids.last.is_a?(Hash) ? ids.pop : {}
22
+
23
+ opts[:query_params] = { "IDs" => ids.join(",") }
24
+
25
+ super(opts)
26
+ end
27
+ end
28
+ end
29
+ end