eve_online 0.30.0 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +18 -54
  3. data/.deepsource.toml +5 -0
  4. data/.ruby-version +1 -1
  5. data/Appraisals +0 -12
  6. data/CHANGELOG.md +58 -0
  7. data/Gemfile.lock +57 -53
  8. data/Gemfile.mutant.lock +49 -50
  9. data/README.md +401 -133
  10. data/eve_online.gemspec +3 -3
  11. data/lib/eve_online.rb +40 -7
  12. data/lib/eve_online/esi/alliance_corporations.rb +1 -1
  13. data/lib/eve_online/esi/alliances.rb +1 -1
  14. data/lib/eve_online/esi/base.rb +15 -6
  15. data/lib/eve_online/esi/character_assets.rb +1 -1
  16. data/lib/eve_online/esi/character_calendar.rb +1 -1
  17. data/lib/eve_online/esi/character_calendar_event.rb +1 -1
  18. data/lib/eve_online/esi/{character_bookmarks.rb → character_contracts.rb} +7 -7
  19. data/lib/eve_online/esi/character_get_mail.rb +37 -0
  20. data/lib/eve_online/esi/character_location.rb +1 -1
  21. data/lib/eve_online/esi/character_mail_labels.rb +40 -0
  22. data/lib/eve_online/esi/character_online.rb +1 -1
  23. data/lib/eve_online/esi/character_ship.rb +1 -1
  24. data/lib/eve_online/esi/character_skills.rb +1 -1
  25. data/lib/eve_online/esi/character_wallet.rb +1 -1
  26. data/lib/eve_online/esi/character_wallet_journal.rb +2 -2
  27. data/lib/eve_online/esi/character_wallet_transactions.rb +41 -0
  28. data/lib/eve_online/esi/corporation_assets.rb +1 -1
  29. data/lib/eve_online/esi/corporation_npc.rb +20 -0
  30. data/lib/eve_online/esi/killmail.rb +30 -0
  31. data/lib/eve_online/esi/market_prices.rb +27 -0
  32. data/lib/eve_online/esi/models/aggressor.rb +1 -1
  33. data/lib/eve_online/esi/models/alliance.rb +1 -1
  34. data/lib/eve_online/esi/models/alliance_icon.rb +1 -1
  35. data/lib/eve_online/esi/models/alliance_short.rb +1 -1
  36. data/lib/eve_online/esi/models/ally.rb +1 -1
  37. data/lib/eve_online/esi/models/ancestry.rb +1 -1
  38. data/lib/eve_online/esi/models/asset.rb +1 -1
  39. data/lib/eve_online/esi/models/asset_location.rb +1 -1
  40. data/lib/eve_online/esi/models/asset_name.rb +1 -1
  41. data/lib/eve_online/esi/models/asteroid_belt.rb +1 -1
  42. data/lib/eve_online/esi/models/attributes.rb +1 -1
  43. data/lib/eve_online/esi/models/bloodline.rb +1 -1
  44. data/lib/eve_online/esi/models/blueprint.rb +1 -1
  45. data/lib/eve_online/esi/models/category.rb +1 -1
  46. data/lib/eve_online/esi/models/character.rb +1 -1
  47. data/lib/eve_online/esi/models/character_corporation_history.rb +1 -1
  48. data/lib/eve_online/esi/models/character_industry_job.rb +1 -1
  49. data/lib/eve_online/esi/models/character_location.rb +1 -1
  50. data/lib/eve_online/esi/models/character_order.rb +1 -1
  51. data/lib/eve_online/esi/models/character_portrait.rb +1 -1
  52. data/lib/eve_online/esi/models/character_ship.rb +1 -1
  53. data/lib/eve_online/esi/models/constellation.rb +1 -1
  54. data/lib/eve_online/esi/models/contract.rb +132 -0
  55. data/lib/eve_online/esi/models/coordinates.rb +1 -1
  56. data/lib/eve_online/esi/models/corporation.rb +1 -1
  57. data/lib/eve_online/esi/models/corporation_alliance_history.rb +1 -1
  58. data/lib/eve_online/esi/models/corporation_industry_job.rb +1 -1
  59. data/lib/eve_online/esi/models/corporation_order.rb +1 -1
  60. data/lib/eve_online/esi/models/defender.rb +1 -1
  61. data/lib/eve_online/esi/models/dogma_attribute.rb +1 -1
  62. data/lib/eve_online/esi/models/dogma_attribute_short.rb +1 -1
  63. data/lib/eve_online/esi/models/dogma_effect.rb +1 -1
  64. data/lib/eve_online/esi/models/dogma_effect_modifier.rb +1 -1
  65. data/lib/eve_online/esi/models/dogma_effect_short.rb +1 -1
  66. data/lib/eve_online/esi/models/event.rb +1 -1
  67. data/lib/eve_online/esi/models/event_details.rb +1 -1
  68. data/lib/eve_online/esi/models/faction.rb +1 -1
  69. data/lib/eve_online/esi/models/fatigue.rb +1 -1
  70. data/lib/eve_online/esi/models/graphic.rb +1 -1
  71. data/lib/eve_online/esi/models/group.rb +1 -1
  72. data/lib/eve_online/esi/models/home_location.rb +1 -1
  73. data/lib/eve_online/esi/models/jump_clone.rb +1 -1
  74. data/lib/eve_online/esi/models/killmail.rb +47 -0
  75. data/lib/eve_online/esi/models/killmail_short.rb +1 -1
  76. data/lib/eve_online/esi/models/loyalty_point.rb +1 -1
  77. data/lib/eve_online/esi/models/loyalty_store_offer.rb +1 -1
  78. data/lib/eve_online/esi/models/mail.rb +49 -0
  79. data/lib/eve_online/esi/models/mail_label.rb +34 -0
  80. data/lib/eve_online/esi/models/mail_recipient.rb +24 -0
  81. data/lib/eve_online/esi/models/mail_recipients.rb +21 -0
  82. data/lib/eve_online/esi/models/market_group.rb +1 -1
  83. data/lib/eve_online/esi/models/market_history.rb +1 -1
  84. data/lib/eve_online/esi/models/market_price.rb +29 -0
  85. data/lib/eve_online/esi/models/moon.rb +1 -1
  86. data/lib/eve_online/esi/models/notification.rb +1 -1
  87. data/lib/eve_online/esi/models/offer_required_item.rb +1 -1
  88. data/lib/eve_online/esi/models/online.rb +1 -1
  89. data/lib/eve_online/esi/models/planet.rb +1 -1
  90. data/lib/eve_online/esi/models/planet_short.rb +1 -1
  91. data/lib/eve_online/esi/models/position.rb +1 -1
  92. data/lib/eve_online/esi/models/public_contract.rb +98 -0
  93. data/lib/eve_online/esi/models/public_contract_item.rb +59 -0
  94. data/lib/eve_online/esi/models/race.rb +3 -3
  95. data/lib/eve_online/esi/models/region.rb +5 -6
  96. data/lib/eve_online/esi/models/server_status.rb +1 -1
  97. data/lib/eve_online/esi/models/skill.rb +1 -1
  98. data/lib/eve_online/esi/models/skill_queue_entry.rb +1 -1
  99. data/lib/eve_online/esi/models/standing.rb +1 -1
  100. data/lib/eve_online/esi/models/star.rb +1 -1
  101. data/lib/eve_online/esi/models/stargate.rb +8 -2
  102. data/lib/eve_online/esi/models/station.rb +1 -1
  103. data/lib/eve_online/esi/models/system.rb +1 -1
  104. data/lib/eve_online/esi/models/system_jump.rb +1 -1
  105. data/lib/eve_online/esi/models/system_kill.rb +1 -1
  106. data/lib/eve_online/esi/models/type.rb +1 -1
  107. data/lib/eve_online/esi/models/{wallet_journal_entry.rb → wallet_journal.rb} +4 -4
  108. data/lib/eve_online/esi/models/wallet_transaction.rb +66 -0
  109. data/lib/eve_online/esi/models/war.rb +1 -1
  110. data/lib/eve_online/esi/public_contract.rb +40 -0
  111. data/lib/eve_online/esi/public_contracts.rb +40 -0
  112. data/lib/eve_online/esi/universe_region.rb +2 -2
  113. data/lib/eve_online/esi/universe_stargate.rb +1 -1
  114. data/lib/eve_online/exceptions/error_limited.rb +8 -0
  115. data/lib/eve_online/formulas/blueprint_copy_time.rb +47 -0
  116. data/lib/eve_online/version.rb +1 -1
  117. metadata +32 -15
  118. data/lib/eve_online/esi/character_bookmark_folders.rb +0 -41
  119. data/lib/eve_online/esi/models/bookmark.rb +0 -71
  120. data/lib/eve_online/esi/models/bookmark_folder.rb +0 -24
  121. data/lib/eve_online/esi/models/stargate_destination.rb +0 -24
@@ -3,7 +3,7 @@
3
3
  module EveOnline
4
4
  module ESI
5
5
  class CorporationAssets < Base
6
- API_PATH = "/v3/corporations/%<corporation_id>s/assets/"
6
+ API_PATH = "/v5/corporations/%<corporation_id>s/assets/"
7
7
 
8
8
  attr_reader :corporation_id, :page
9
9
 
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module ESI
5
+ class CorporationNPC < Base
6
+ API_PATH = "/v1/corporations/npccorps/"
7
+
8
+ def corporation_npc_ids
9
+ response
10
+ end
11
+
12
+ def scope
13
+ end
14
+
15
+ def path
16
+ API_PATH
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module ESI
5
+ class Killmail < Base
6
+ API_PATH = "/v1/killmails/%<killmail_id>s/%<killmail_hash>s/"
7
+
8
+ attr_reader :killmail_id, :killmail_hash
9
+
10
+ def initialize(options)
11
+ super
12
+
13
+ @killmail_id = options.fetch(:killmail_id)
14
+ @killmail_hash = options.fetch(:killmail_hash)
15
+ end
16
+
17
+ # TODO: implement
18
+ def as_json
19
+ {}
20
+ end
21
+
22
+ def scope
23
+ end
24
+
25
+ def path
26
+ format(API_PATH, killmail_id: killmail_id, killmail_hash: killmail_hash)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module ESI
5
+ class MarketPrices < Base
6
+ API_PATH = "/v1/markets/prices/"
7
+
8
+ def market_prices
9
+ @market_prices ||=
10
+ begin
11
+ output = []
12
+ response.each do |market_price|
13
+ output << Models::MarketPrice.new(market_price)
14
+ end
15
+ output
16
+ end
17
+ end
18
+
19
+ def scope
20
+ end
21
+
22
+ def path
23
+ API_PATH
24
+ end
25
+ end
26
+ end
27
+ end
@@ -9,7 +9,7 @@ module EveOnline
9
9
  alliance_id: alliance_id,
10
10
  corporation_id: corporation_id,
11
11
  isk_destroyed: isk_destroyed,
12
- ships_killed: ships_killed,
12
+ ships_killed: ships_killed
13
13
  }
14
14
  end
15
15
 
@@ -12,7 +12,7 @@ module EveOnline
12
12
  executor_corporation_id: executor_corporation_id,
13
13
  faction_id: faction_id,
14
14
  name: name,
15
- ticker: ticker,
15
+ ticker: ticker
16
16
  }
17
17
  end
18
18
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  icon_medium: icon_medium,
10
- icon_small: icon_small,
10
+ icon_small: icon_small
11
11
  }
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  alliance_id: alliance_id,
10
- alliance_name: alliance_name,
10
+ alliance_name: alliance_name
11
11
  }
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  alliance_id: alliance_id,
10
- corporation_id: corporation_id,
10
+ corporation_id: corporation_id
11
11
  }
12
12
  end
13
13
 
@@ -11,7 +11,7 @@ module EveOnline
11
11
  icon_id: icon_id,
12
12
  ancestry_id: ancestry_id,
13
13
  name: name,
14
- short_description: short_description,
14
+ short_description: short_description
15
15
  }
16
16
  end
17
17
 
@@ -13,7 +13,7 @@ module EveOnline
13
13
  location_id: location_id,
14
14
  location_type: location_type,
15
15
  quantity: quantity,
16
- type_id: type_id,
16
+ type_id: type_id
17
17
  }
18
18
  end
19
19
 
@@ -6,7 +6,7 @@ module EveOnline
6
6
  class AssetLocation < Base
7
7
  def as_json
8
8
  {
9
- item_id: item_id,
9
+ item_id: item_id
10
10
  }
11
11
  end
12
12
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  item_id: item_id,
10
- name: name,
10
+ name: name
11
11
  }
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  name: name,
10
- system_id: system_id,
10
+ system_id: system_id
11
11
  }
12
12
  end
13
13
 
@@ -13,7 +13,7 @@ module EveOnline
13
13
  last_remap_date: last_remap_date,
14
14
  memory: memory,
15
15
  perception: perception,
16
- willpower: willpower,
16
+ willpower: willpower
17
17
  }
18
18
  end
19
19
 
@@ -16,7 +16,7 @@ module EveOnline
16
16
  perception: perception,
17
17
  race_id: race_id,
18
18
  ship_type_id: ship_type_id,
19
- willpower: willpower,
19
+ willpower: willpower
20
20
  }
21
21
  end
22
22
 
@@ -13,7 +13,7 @@ module EveOnline
13
13
  quantity: quantity,
14
14
  runs: runs,
15
15
  time_efficiency: time_efficiency,
16
- type_id: type_id,
16
+ type_id: type_id
17
17
  }
18
18
  end
19
19
 
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  category_id: category_id,
10
10
  name: name,
11
- published: published,
11
+ published: published
12
12
  }
13
13
  end
14
14
 
@@ -17,7 +17,7 @@ module EveOnline
17
17
  name: name,
18
18
  race_id: race_id,
19
19
  security_status: security_status,
20
- title: title,
20
+ title: title
21
21
  }
22
22
  end
23
23
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  corporation_id: corporation_id,
10
10
  is_deleted: is_deleted,
11
11
  record_id: record_id,
12
- start_date: start_date,
12
+ start_date: start_date
13
13
  }
14
14
  end
15
15
 
@@ -27,7 +27,7 @@ module EveOnline
27
27
  start_date: start_date,
28
28
  station_id: station_id,
29
29
  status: status,
30
- successful_runs: successful_runs,
30
+ successful_runs: successful_runs
31
31
  }
32
32
  end
33
33
 
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  solar_system_id: solar_system_id,
10
10
  station_id: station_id,
11
- structure_id: structure_id,
11
+ structure_id: structure_id
12
12
  }
13
13
  end
14
14
 
@@ -19,7 +19,7 @@ module EveOnline
19
19
  region_id: region_id,
20
20
  type_id: type_id,
21
21
  volume_remain: volume_remain,
22
- volume_total: volume_total,
22
+ volume_total: volume_total
23
23
  }
24
24
  end
25
25
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  medium: medium,
10
10
  large: large,
11
11
  huge: huge,
12
- small: small,
12
+ small: small
13
13
  }
14
14
  end
15
15
 
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  ship_item_id: ship_item_id,
10
10
  ship_name: ship_name,
11
- ship_type_id: ship_type_id,
11
+ ship_type_id: ship_type_id
12
12
  }
13
13
  end
14
14
 
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  constellation_id: constellation_id,
10
10
  name: name,
11
- region_id: region_id,
11
+ region_id: region_id
12
12
  }
13
13
  end
14
14
 
@@ -0,0 +1,132 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module ESI
5
+ module Models
6
+ class Contract < Base
7
+ def as_json
8
+ {
9
+ acceptor_id: acceptor_id,
10
+ assignee_id: assignee_id,
11
+ availability: availability,
12
+ buyout: buyout,
13
+ collateral: collateral,
14
+ contract_id: contract_id,
15
+ date_accepted: date_accepted,
16
+ date_completed: date_completed,
17
+ date_expired: date_expired,
18
+ date_issued: date_issued,
19
+ days_to_complete: days_to_complete,
20
+ end_location_id: end_location_id,
21
+ for_corporation: for_corporation,
22
+ issuer_corporation_id: issuer_corporation_id,
23
+ issuer_id: issuer_id,
24
+ price: price,
25
+ reward: reward,
26
+ start_location_id: start_location_id,
27
+ status: status,
28
+ title: title,
29
+ type: type,
30
+ volume: volume
31
+ }
32
+ end
33
+
34
+ def acceptor_id
35
+ options["acceptor_id"]
36
+ end
37
+
38
+ def assignee_id
39
+ options["assignee_id"]
40
+ end
41
+
42
+ def availability
43
+ options["availability"]
44
+ end
45
+
46
+ def buyout
47
+ options["buyout"]
48
+ end
49
+
50
+ def collateral
51
+ options["collateral"]
52
+ end
53
+
54
+ def contract_id
55
+ options["contract_id"]
56
+ end
57
+
58
+ def date_accepted
59
+ date_accepted = options["date_accepted"]
60
+
61
+ parse_datetime_with_timezone(date_accepted) if date_accepted
62
+ end
63
+
64
+ def date_completed
65
+ date_completed = options["date_completed"]
66
+
67
+ parse_datetime_with_timezone(date_completed) if date_completed
68
+ end
69
+
70
+ def date_expired
71
+ date_expired = options["date_expired"]
72
+
73
+ parse_datetime_with_timezone(date_expired) if date_expired
74
+ end
75
+
76
+ def date_issued
77
+ date_issued = options["date_issued"]
78
+
79
+ parse_datetime_with_timezone(date_issued) if date_issued
80
+ end
81
+
82
+ def days_to_complete
83
+ options["days_to_complete"]
84
+ end
85
+
86
+ def end_location_id
87
+ options["end_location_id"]
88
+ end
89
+
90
+ def for_corporation
91
+ options["for_corporation"]
92
+ end
93
+
94
+ def issuer_corporation_id
95
+ options["issuer_corporation_id"]
96
+ end
97
+
98
+ def issuer_id
99
+ options["issuer_id"]
100
+ end
101
+
102
+ def price
103
+ options["price"]
104
+ end
105
+
106
+ def reward
107
+ options["reward"]
108
+ end
109
+
110
+ def start_location_id
111
+ options["start_location_id"]
112
+ end
113
+
114
+ def status
115
+ options["status"]
116
+ end
117
+
118
+ def title
119
+ options["title"]
120
+ end
121
+
122
+ def type
123
+ options["type"]
124
+ end
125
+
126
+ def volume
127
+ options["volume"]
128
+ end
129
+ end
130
+ end
131
+ end
132
+ end
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  x: x,
10
10
  y: y,
11
- z: z,
11
+ z: z
12
12
  }
13
13
  end
14
14