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,27 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character skill in training.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_skillintraining.html
8
+ class SkillInTraining < Greeve::BaseItem
9
+ endpoint "char/SkillInTraining"
10
+
11
+ attribute :current_tq_time, xpath: "eveapi/result/currentTQTime/?[0]", type: :datetime
12
+ attribute :training_end_time, xpath: "eveapi/result/trainingEndTime/?[0]", type: :datetime
13
+ attribute :training_start_time, xpath: "eveapi/result/trainingStartTime/?[0]", type: :datetime
14
+ attribute :training_type_id, xpath: "eveapi/result/trainingTypeID/?[0]", type: :integer
15
+ attribute :training_start_sp, xpath: "eveapi/result/trainingStartSP/?[0]", type: :integer
16
+ attribute :training_destination_sp, xpath: "eveapi/result/trainingDestinationSP/?[0]", type: :integer
17
+ attribute :training_to_level, xpath: "eveapi/result/trainingToLevel/?[0]", type: :integer
18
+ attribute :skill_in_training, xpath: "eveapi/result/skillInTraining/?[0]", type: :boolean
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,28 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character skill queue.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_skillqueue.html
8
+ class SkillQueue < Greeve::BaseItem
9
+ endpoint "char/SkillQueue"
10
+
11
+ rowset :skillqueue, xpath: "eveapi/result/rowset[@name='skillqueue']" do
12
+ attribute :queue_position, xpath: "@queuePosition", type: :integer
13
+ attribute :type_id, xpath: "@typeID", type: :integer
14
+ attribute :level, xpath: "@level", type: :integer
15
+ attribute :start_sp, xpath: "@startSP", type: :integer
16
+ attribute :end_sp, xpath: "@endSP", type: :integer
17
+ attribute :start_time, xpath: "@startTime", type: :datetime
18
+ attribute :end_time, xpath: "@endTime", type: :datetime
19
+ end
20
+
21
+ # @param character_id [Integer] EVE character ID
22
+ def initialize(character_id, opts = {})
23
+ opts[:query_params] = { "characterID" => character_id }
24
+ super(opts)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Known skills of a character.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_skills.html
8
+ class Skills < Greeve::BaseItem
9
+ endpoint "char/Skills"
10
+
11
+ attribute :free_skill_points, xpath: "eveapi/result/freeSkillPoints/?[0]", type: :integer
12
+
13
+ rowset :skills, xpath: "eveapi/result/rowset[@name='skills']" do
14
+ attribute :type_id, xpath: "@typeID", type: :integer
15
+ attribute :type_name, xpath: "@typeName", type: :string
16
+ attribute :skillpoints, xpath: "@skillpoints", type: :integer
17
+ attribute :level, xpath: "@level", type: :integer
18
+ attribute :published, xpath: "@published", type: :boolean
19
+ end
20
+
21
+ # @param character_id [Integer] EVE character ID
22
+ def initialize(character_id, opts = {})
23
+ opts[:query_params] = { "characterID" => character_id }
24
+ super(opts)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,36 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character standings (does not take character skills into account).
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_standings.html
8
+ class Standings < Greeve::BaseItem
9
+ endpoint "char/Standings"
10
+
11
+ rowset :agents, xpath: "eveapi/result/characterNPCStandings/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/characterNPCStandings/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/characterNPCStandings/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
+
29
+ # @param character_id [Integer] EVE character ID
30
+ def initialize(character_id, opts = {})
31
+ opts[:query_params] = { "characterID" => character_id }
32
+ super(opts)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,31 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character upcoming calendar events.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_upcomingcalendarevents.html
8
+ class UpcomingCalendarEvents < Greeve::BaseItem
9
+ endpoint "char/UpcomingCalendarEvents"
10
+
11
+ rowset :upcoming_events, xpath: "eveapi/result/rowset[@name='upcomingEvents']" do
12
+ attribute :event_id, xpath: "@eventID", type: :integer
13
+ attribute :owner_id, xpath: "@ownerID", type: :integer
14
+ attribute :owner_name, xpath: "@ownerName", type: :string
15
+ attribute :owner_type_id, xpath: "@ownerTypeID", type: :integer
16
+ attribute :event_date, xpath: "@eventDate", type: :datetime
17
+ attribute :event_title, xpath: "@eventTitle", type: :string
18
+ attribute :duration, xpath: "@duration", type: :integer
19
+ attribute :importance, xpath: "@importance", type: :boolean
20
+ attribute :response, xpath: "@response", type: :string
21
+ attribute :event_text, xpath: "@eventText", type: :string
22
+ end
23
+
24
+ # @param character_id [Integer] EVE character ID
25
+ def initialize(character_id, opts = {})
26
+ opts[:query_params] = { "characterID" => character_id }
27
+ super(opts)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,49 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character wallet journal.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_walletjournal.html
8
+ class WalletJournal < Greeve::BaseItem
9
+ endpoint "char/WalletJournal"
10
+
11
+ rowset :transactions, xpath: "eveapi/result/rowset[@name='transactions']" 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 :tax_receiver_id, xpath: "@taxReceiverID", type: :integer
25
+ attribute :tax_amount, xpath: "@taxAmount", type: :numeric
26
+ attribute :owner_1_type_id, xpath: "@owner1TypeID", type: :integer
27
+ attribute :owner_2_type_id, xpath: "@owner2TypeID", type: :integer
28
+ end
29
+
30
+ # @param character_id [Integer] EVE character ID
31
+ #
32
+ # @option opts [Integer] :from_id Optional upper bound for the ref ID of
33
+ # returned journal entries. This argument is normally used to walk to
34
+ # the journal backwards.
35
+ # @option opts [Integer] :row_count Optional limit on number of rows to
36
+ # return. Default is 1000. Maximum is 2560.
37
+ def initialize(character_id, opts = {})
38
+ from_id = opts.delete(:from_id)
39
+ row_count = opts.delete(:row_count)
40
+
41
+ opts[:query_params] = { "characterID" => character_id }
42
+ opts[:query_params]["fromID"] = from_id if from_id
43
+ opts[:query_params]["rowCount"] = row_count if row_count
44
+
45
+ super(opts)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,47 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Character
5
+ # Character wallet transactions.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_wallettransactions.html
8
+ class WalletTransactions < Greeve::BaseItem
9
+ endpoint "char/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 :station_id, xpath: "@stationID", type: :integer
21
+ attribute :station_name, xpath: "@stationName", type: :string
22
+ attribute :transaction_type, xpath: "@transactionType", type: :string
23
+ attribute :transaction_for, xpath: "@transactionFor", type: :string
24
+ attribute :journal_transaction_id, xpath: "@journalTransactionID", type: :integer
25
+ attribute :client_type_id, xpath: "@clientTypeID", type: :integer
26
+ end
27
+
28
+ # @param character_id [Integer] EVE character ID
29
+ #
30
+ # @option opts [Integer] :from_id Optional upper bound for the transaction
31
+ # ID of returned transactions.
32
+ # @option opts [Integer] :row_count Optional upper bound for the
33
+ # transaction ID of returned transactions. This argument is normally
34
+ # used to walk to the transaction log backwards.
35
+ def initialize(character_id, opts = {})
36
+ from_id = opts.delete(:from_id)
37
+ row_count = opts.delete(:row_count)
38
+
39
+ opts[:query_params] = { "characterID" => character_id }
40
+ opts[:query_params]["fromID"] = from_id if from_id
41
+ opts[:query_params]["rowCount"] = row_count if row_count
42
+
43
+ super(opts)
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,16 @@
1
+ module Greeve
2
+ # Greeve configuration options.
3
+ class Config
4
+ private_class_method :new
5
+
6
+ # @return [String] HTTP client User-Agent
7
+ def self.user_agent
8
+ Typhoeus::Config.user_agent
9
+ end
10
+
11
+ # @param user_agent [String] HTTP client User-Agent
12
+ def self.user_agent=(user_agent)
13
+ Typhoeus::Config.user_agent = user_agent
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Corporation account balances.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_accountbalance.html
8
+ class AccountBalance < Greeve::BaseItem
9
+ endpoint "corp/AccountBalance"
10
+
11
+ rowset :accounts, xpath: "eveapi/result/rowset[@name='accounts']" do
12
+ attribute :account_id, xpath: "@accountID", type: :integer
13
+ attribute :account_key, xpath: "@accountKey", type: :integer
14
+ attribute :balance, xpath: "@balance", type: :numeric
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,46 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Availabile contracts for a corporation.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_contracts.html
8
+ class Contracts < Greeve::BaseItem
9
+ endpoint "corp/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 :date_completed, xpath: "@dateCompleted", type: :datetime
28
+ attribute :num_days, xpath: "@numDays", type: :integer
29
+ attribute :price, xpath: "@price", type: :numeric
30
+ attribute :reward, xpath: "@reward", type: :numeric
31
+ attribute :colalteral, xpath: "@collateral", type: :numeric
32
+ attribute :buyout, xpath: "@buyout", type: :numeric
33
+ attribute :volume, xpath: "@volume", type: :numeric
34
+ end
35
+
36
+ # @option opts [Integer] :contract_id (nil) ID of a specific contract
37
+ def initialize(opts = {})
38
+ contract_id = opts.delete(:contract_id)
39
+
40
+ opts[:query_params] = { "contractID" => contract_id } if contract_id
41
+
42
+ super(opts)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,43 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Details for a specific corporation.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_corporationsheet.html
8
+ class CorporationSheet < Greeve::BaseItem
9
+ endpoint "corp/CorporationSheet"
10
+
11
+ attribute :corporation_id, xpath: "eveapi/result/corporationID/?[0]", type: :integer
12
+ attribute :corporation_name, xpath: "eveapi/result/corporationName/?[0]", type: :string
13
+ attribute :ticker, xpath: "eveapi/result/ticker/?[0]", type: :string
14
+ attribute :ceo_id, xpath: "eveapi/result/ceoID/?[0]", type: :integer
15
+ attribute :ceo_name, xpath: "eveapi/result/ceoName/?[0]", type: :string
16
+ attribute :station_id, xpath: "eveapi/result/stationID/?[0]", type: :integer
17
+ attribute :station_name, xpath: "eveapi/result/stationName/?[0]", type: :string
18
+ attribute :description, xpath: "eveapi/result/description/?[0]", type: :string
19
+ attribute :url, xpath: "eveapi/result/url/?[0]", type: :string
20
+ attribute :alliance_id, xpath: "eveapi/result/allianceID/?[0]", type: :integer
21
+ attribute :faction_id, xpath: "eveapi/result/factionID/?[0]", type: :integer
22
+ attribute :tax_rate, xpath: "eveapi/result/taxRate/?[0]", type: :numeric
23
+ attribute :member_count, xpath: "eveapi/result/memberCount/?[0]", type: :integer
24
+ attribute :shares, xpath: "eveapi/result/shares/?[0]", type: :integer
25
+
26
+ namespace :logo, xpath: "eveapi/result/logo" do
27
+ attribute :graphic_id, xpath: "graphicID/?[0]", type: :integer
28
+ attribute :shape1, xpath: "shape1/?[0]", type: :integer
29
+ attribute :shape2, xpath: "shape2/?[0]", type: :integer
30
+ attribute :shape3, xpath: "shape3/?[0]", type: :integer
31
+ attribute :color1, xpath: "color1/?[0]", type: :integer
32
+ attribute :color2, xpath: "color2/?[0]", type: :integer
33
+ attribute :color3, xpath: "color3/?[0]", type: :integer
34
+ end
35
+
36
+ # @param corporation_id [Integer] EVE corporation ID
37
+ def initialize(corporation_id, opts = {})
38
+ opts[:query_params] = { "corporationID" => corporation_id }
39
+ super(opts)
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,42 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Unfinished corporation industry jobs.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_industryjobs.html
8
+ class IndustryJobs < Greeve::BaseItem
9
+ endpoint "corp/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
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ require_relative "../base_item"
2
+
3
+ module Greeve
4
+ module Corporation
5
+ # Finished corporation industry jobs.
6
+ #
7
+ # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/corporation/corp_industryjobshistory.html
8
+ class IndustryJobsHistory < Greeve::BaseItem
9
+ endpoint "corp/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
+ end
41
+ end
42
+ end