eve_online 0.31.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +18 -49
  3. data/.ruby-version +1 -1
  4. data/Appraisals +0 -12
  5. data/CHANGELOG.md +22 -0
  6. data/Gemfile.lock +32 -32
  7. data/Gemfile.mutant.lock +25 -24
  8. data/README.md +214 -108
  9. data/eve_online.gemspec +2 -2
  10. data/lib/eve_online.rb +13 -6
  11. data/lib/eve_online/esi/alliance_corporations.rb +1 -1
  12. data/lib/eve_online/esi/alliances.rb +1 -1
  13. data/lib/eve_online/esi/base.rb +8 -0
  14. data/lib/eve_online/esi/character_assets.rb +1 -1
  15. data/lib/eve_online/esi/{character_bookmarks.rb → character_contracts.rb} +7 -7
  16. data/lib/eve_online/esi/character_skills.rb +1 -1
  17. data/lib/eve_online/esi/character_wallet.rb +1 -1
  18. data/lib/eve_online/esi/character_wallet_journal.rb +2 -2
  19. data/lib/eve_online/esi/character_wallet_transactions.rb +41 -0
  20. data/lib/eve_online/esi/corporation_assets.rb +1 -1
  21. data/lib/eve_online/esi/corporation_npc.rb +20 -0
  22. data/lib/eve_online/esi/killmail.rb +30 -0
  23. data/lib/eve_online/esi/market_prices.rb +27 -0
  24. data/lib/eve_online/esi/models/aggressor.rb +1 -1
  25. data/lib/eve_online/esi/models/alliance.rb +1 -1
  26. data/lib/eve_online/esi/models/alliance_icon.rb +1 -1
  27. data/lib/eve_online/esi/models/alliance_short.rb +1 -1
  28. data/lib/eve_online/esi/models/ally.rb +1 -1
  29. data/lib/eve_online/esi/models/ancestry.rb +1 -1
  30. data/lib/eve_online/esi/models/asset.rb +1 -1
  31. data/lib/eve_online/esi/models/asset_location.rb +1 -1
  32. data/lib/eve_online/esi/models/asset_name.rb +1 -1
  33. data/lib/eve_online/esi/models/asteroid_belt.rb +1 -1
  34. data/lib/eve_online/esi/models/attributes.rb +1 -1
  35. data/lib/eve_online/esi/models/bloodline.rb +1 -1
  36. data/lib/eve_online/esi/models/blueprint.rb +1 -1
  37. data/lib/eve_online/esi/models/category.rb +1 -1
  38. data/lib/eve_online/esi/models/character.rb +1 -1
  39. data/lib/eve_online/esi/models/character_corporation_history.rb +1 -1
  40. data/lib/eve_online/esi/models/character_industry_job.rb +1 -1
  41. data/lib/eve_online/esi/models/character_location.rb +1 -1
  42. data/lib/eve_online/esi/models/character_order.rb +1 -1
  43. data/lib/eve_online/esi/models/character_portrait.rb +1 -1
  44. data/lib/eve_online/esi/models/character_ship.rb +1 -1
  45. data/lib/eve_online/esi/models/constellation.rb +1 -1
  46. data/lib/eve_online/esi/models/contract.rb +132 -0
  47. data/lib/eve_online/esi/models/coordinates.rb +1 -1
  48. data/lib/eve_online/esi/models/corporation.rb +1 -1
  49. data/lib/eve_online/esi/models/corporation_alliance_history.rb +1 -1
  50. data/lib/eve_online/esi/models/corporation_industry_job.rb +1 -1
  51. data/lib/eve_online/esi/models/corporation_order.rb +1 -1
  52. data/lib/eve_online/esi/models/defender.rb +1 -1
  53. data/lib/eve_online/esi/models/dogma_attribute.rb +1 -1
  54. data/lib/eve_online/esi/models/dogma_attribute_short.rb +1 -1
  55. data/lib/eve_online/esi/models/dogma_effect.rb +1 -1
  56. data/lib/eve_online/esi/models/dogma_effect_modifier.rb +1 -1
  57. data/lib/eve_online/esi/models/dogma_effect_short.rb +1 -1
  58. data/lib/eve_online/esi/models/event.rb +1 -1
  59. data/lib/eve_online/esi/models/event_details.rb +1 -1
  60. data/lib/eve_online/esi/models/faction.rb +1 -1
  61. data/lib/eve_online/esi/models/fatigue.rb +1 -1
  62. data/lib/eve_online/esi/models/graphic.rb +1 -1
  63. data/lib/eve_online/esi/models/group.rb +1 -1
  64. data/lib/eve_online/esi/models/home_location.rb +1 -1
  65. data/lib/eve_online/esi/models/jump_clone.rb +1 -1
  66. data/lib/eve_online/esi/models/killmail.rb +47 -0
  67. data/lib/eve_online/esi/models/killmail_short.rb +1 -1
  68. data/lib/eve_online/esi/models/loyalty_point.rb +1 -1
  69. data/lib/eve_online/esi/models/loyalty_store_offer.rb +1 -1
  70. data/lib/eve_online/esi/models/mail.rb +1 -1
  71. data/lib/eve_online/esi/models/mail_label.rb +1 -1
  72. data/lib/eve_online/esi/models/mail_recipient.rb +1 -1
  73. data/lib/eve_online/esi/models/market_group.rb +1 -1
  74. data/lib/eve_online/esi/models/market_history.rb +1 -1
  75. data/lib/eve_online/esi/models/market_price.rb +29 -0
  76. data/lib/eve_online/esi/models/moon.rb +1 -1
  77. data/lib/eve_online/esi/models/notification.rb +1 -1
  78. data/lib/eve_online/esi/models/offer_required_item.rb +1 -1
  79. data/lib/eve_online/esi/models/online.rb +1 -1
  80. data/lib/eve_online/esi/models/planet.rb +1 -1
  81. data/lib/eve_online/esi/models/planet_short.rb +1 -1
  82. data/lib/eve_online/esi/models/position.rb +1 -1
  83. data/lib/eve_online/esi/models/race.rb +1 -1
  84. data/lib/eve_online/esi/models/region.rb +1 -1
  85. data/lib/eve_online/esi/models/server_status.rb +1 -1
  86. data/lib/eve_online/esi/models/skill.rb +1 -1
  87. data/lib/eve_online/esi/models/skill_queue_entry.rb +1 -1
  88. data/lib/eve_online/esi/models/standing.rb +1 -1
  89. data/lib/eve_online/esi/models/star.rb +1 -1
  90. data/lib/eve_online/esi/models/stargate.rb +1 -1
  91. data/lib/eve_online/esi/models/station.rb +1 -1
  92. data/lib/eve_online/esi/models/system.rb +1 -1
  93. data/lib/eve_online/esi/models/system_jump.rb +1 -1
  94. data/lib/eve_online/esi/models/system_kill.rb +1 -1
  95. data/lib/eve_online/esi/models/type.rb +1 -1
  96. data/lib/eve_online/esi/models/{wallet_journal_entry.rb → wallet_journal.rb} +4 -4
  97. data/lib/eve_online/esi/models/wallet_transaction.rb +66 -0
  98. data/lib/eve_online/esi/models/war.rb +1 -1
  99. data/lib/eve_online/formulas/blueprint_copy_time.rb +47 -0
  100. data/lib/eve_online/version.rb +1 -1
  101. metadata +14 -8
  102. data/lib/eve_online/esi/character_bookmark_folders.rb +0 -41
  103. data/lib/eve_online/esi/models/bookmark.rb +0 -71
  104. data/lib/eve_online/esi/models/bookmark_folder.rb +0 -24
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  killmail_hash: killmail_hash,
10
- killmail_id: killmail_id,
10
+ killmail_id: killmail_id
11
11
  }
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  corporation_id: corporation_id,
10
- loyalty_points: loyalty_points,
10
+ loyalty_points: loyalty_points
11
11
  }
12
12
  end
13
13
 
@@ -11,7 +11,7 @@ module EveOnline
11
11
  lp_cost: lp_cost,
12
12
  offer_id: offer_id,
13
13
  quantity: quantity,
14
- type_id: type_id,
14
+ type_id: type_id
15
15
  }
16
16
  end
17
17
 
@@ -10,7 +10,7 @@ module EveOnline
10
10
  from_id: from_id,
11
11
  read: read,
12
12
  subject: subject,
13
- timestamp: timestamp,
13
+ timestamp: timestamp
14
14
  }
15
15
  end
16
16
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  color: color,
10
10
  label_id: label_id,
11
11
  name: name,
12
- unread_count: unread_count,
12
+ unread_count: unread_count
13
13
  }
14
14
  end
15
15
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  recipient_id: recipient_id,
10
- recipient_type: recipient_type,
10
+ recipient_type: recipient_type
11
11
  }
12
12
  end
13
13
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  description: description,
10
10
  market_group_id: market_group_id,
11
11
  name: name,
12
- parent_group_id: parent_group_id,
12
+ parent_group_id: parent_group_id
13
13
  }
14
14
  end
15
15
 
@@ -11,7 +11,7 @@ module EveOnline
11
11
  highest: highest,
12
12
  lowest: lowest,
13
13
  order_count: order_count,
14
- volume: volume,
14
+ volume: volume
15
15
  }
16
16
  end
17
17
 
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module ESI
5
+ module Models
6
+ class MarketPrice < Base
7
+ def as_json
8
+ {
9
+ adjusted_price: adjusted_price,
10
+ average_price: average_price,
11
+ type_id: type_id
12
+ }
13
+ end
14
+
15
+ def adjusted_price
16
+ options["adjusted_price"]
17
+ end
18
+
19
+ def average_price
20
+ options["average_price"]
21
+ end
22
+
23
+ def type_id
24
+ options["type_id"]
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  moon_id: moon_id,
10
10
  name: name,
11
- system_id: system_id,
11
+ system_id: system_id
12
12
  }
13
13
  end
14
14
 
@@ -12,7 +12,7 @@ module EveOnline
12
12
  sender_type: sender_type,
13
13
  text: text,
14
14
  timestamp: timestamp,
15
- type: type,
15
+ type: type
16
16
  }
17
17
  end
18
18
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  quantity: quantity,
10
- type_id: type_id,
10
+ type_id: type_id
11
11
  }
12
12
  end
13
13
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  last_login: last_login,
10
10
  last_logout: last_logout,
11
11
  logins: logins,
12
- online: online,
12
+ online: online
13
13
  }
14
14
  end
15
15
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  name: name,
10
10
  planet_id: planet_id,
11
11
  system_id: system_id,
12
- type_id: type_id,
12
+ type_id: type_id
13
13
  }
14
14
  end
15
15
 
@@ -6,7 +6,7 @@ module EveOnline
6
6
  class PlanetShort < Base
7
7
  def as_json
8
8
  {
9
- planet_id: planet_id,
9
+ planet_id: planet_id
10
10
  }
11
11
  end
12
12
 
@@ -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
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  alliance_id: alliance_id,
10
10
  description: description,
11
11
  name: name,
12
- race_id: race_id,
12
+ race_id: race_id
13
13
  }
14
14
  end
15
15
 
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  description: description,
10
10
  name: name,
11
- region_id: region_id,
11
+ region_id: region_id
12
12
  }
13
13
  end
14
14
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  players: players,
10
10
  server_version: server_version,
11
11
  start_time: start_time,
12
- vip: vip,
12
+ vip: vip
13
13
  }
14
14
  end
15
15
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  active_skill_level: active_skill_level,
10
10
  skill_id: skill_id,
11
11
  skillpoints_in_skill: skillpoints_in_skill,
12
- trained_skill_level: trained_skill_level,
12
+ trained_skill_level: trained_skill_level
13
13
  }
14
14
  end
15
15
 
@@ -13,7 +13,7 @@ module EveOnline
13
13
  queue_position: queue_position,
14
14
  skill_id: skill_id,
15
15
  start_date: start_date,
16
- training_start_sp: training_start_sp,
16
+ training_start_sp: training_start_sp
17
17
  }
18
18
  end
19
19
 
@@ -8,7 +8,7 @@ module EveOnline
8
8
  {
9
9
  from_id: from_id,
10
10
  from_type: from_type,
11
- standing: standing,
11
+ standing: standing
12
12
  }
13
13
  end
14
14
 
@@ -13,7 +13,7 @@ module EveOnline
13
13
  solar_system_id: solar_system_id,
14
14
  spectral_class: spectral_class,
15
15
  temperature: temperature,
16
- type_id: type_id,
16
+ type_id: type_id
17
17
  }
18
18
  end
19
19
 
@@ -11,7 +11,7 @@ module EveOnline
11
11
  system_id: system_id,
12
12
  type_id: type_id,
13
13
  destination_stargate_id: destination_stargate_id,
14
- destination_system_id: destination_system_id,
14
+ destination_system_id: destination_system_id
15
15
  }
16
16
  end
17
17
 
@@ -16,7 +16,7 @@ module EveOnline
16
16
  services: services,
17
17
  station_id: station_id,
18
18
  system_id: system_id,
19
- type_id: type_id,
19
+ type_id: type_id
20
20
  }
21
21
  end
22
22
 
@@ -11,7 +11,7 @@ module EveOnline
11
11
  security_class: security_class,
12
12
  security_status: security_status,
13
13
  star_id: star_id,
14
- system_id: system_id,
14
+ system_id: system_id
15
15
  }
16
16
  end
17
17
 
@@ -7,7 +7,7 @@ module EveOnline
7
7
  def as_json
8
8
  {
9
9
  ship_jumps: ship_jumps,
10
- system_id: system_id,
10
+ system_id: system_id
11
11
  }
12
12
  end
13
13
 
@@ -9,7 +9,7 @@ module EveOnline
9
9
  npc_kills: npc_kills,
10
10
  pod_kills: pod_kills,
11
11
  ship_kills: ship_kills,
12
- system_id: system_id,
12
+ system_id: system_id
13
13
  }
14
14
  end
15
15
 
@@ -19,7 +19,7 @@ module EveOnline
19
19
  published: published,
20
20
  radius: radius,
21
21
  type_id: type_id,
22
- volume: volume,
22
+ volume: volume
23
23
  }
24
24
  end
25
25
 
@@ -3,7 +3,7 @@
3
3
  module EveOnline
4
4
  module ESI
5
5
  module Models
6
- class WalletJournalEntry < Base
6
+ class WalletJournal < Base
7
7
  def as_json
8
8
  {
9
9
  amount: amount,
@@ -13,12 +13,12 @@ module EveOnline
13
13
  date: date,
14
14
  description: description,
15
15
  first_party_id: first_party_id,
16
- id: id,
16
+ wallet_journal_id: wallet_journal_id,
17
17
  reason: reason,
18
18
  ref_type: ref_type,
19
19
  second_party_id: second_party_id,
20
20
  tax: tax,
21
- tax_receiver_id: tax_receiver_id,
21
+ tax_receiver_id: tax_receiver_id
22
22
  }
23
23
  end
24
24
 
@@ -52,7 +52,7 @@ module EveOnline
52
52
  options["first_party_id"]
53
53
  end
54
54
 
55
- def id
55
+ def wallet_journal_id
56
56
  options["id"]
57
57
  end
58
58
 
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module ESI
5
+ module Models
6
+ class WalletTransaction < Base
7
+ def as_json
8
+ {
9
+ client_id: client_id,
10
+ date: date,
11
+ is_buy: is_buy,
12
+ is_personal: is_personal,
13
+ journal_ref_id: journal_ref_id,
14
+ location_id: location_id,
15
+ quantity: quantity,
16
+ transaction_id: transaction_id,
17
+ type_id: type_id,
18
+ unit_price: unit_price
19
+ }
20
+ end
21
+
22
+ def client_id
23
+ options["client_id"]
24
+ end
25
+
26
+ def date
27
+ date = options["date"]
28
+
29
+ parse_datetime_with_timezone(date) if date
30
+ end
31
+
32
+ def is_buy
33
+ options["is_buy"]
34
+ end
35
+
36
+ def is_personal
37
+ options["is_personal"]
38
+ end
39
+
40
+ def journal_ref_id
41
+ options["journal_ref_id"]
42
+ end
43
+
44
+ def location_id
45
+ options["location_id"]
46
+ end
47
+
48
+ def quantity
49
+ options["quantity"]
50
+ end
51
+
52
+ def transaction_id
53
+ options["transaction_id"]
54
+ end
55
+
56
+ def type_id
57
+ options["type_id"]
58
+ end
59
+
60
+ def unit_price
61
+ options["unit_price"]
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -12,7 +12,7 @@ module EveOnline
12
12
  mutual: mutual,
13
13
  open_for_allies: open_for_allies,
14
14
  retracted: retracted,
15
- started: started,
15
+ started: started
16
16
  }
17
17
  end
18
18
 
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module Formulas
5
+ class BlueprintCopyTime
6
+ attr_reader :seconds, :science_level, :advanced_industry_level,
7
+ :science_copy_speed_bonus_per_level,
8
+ :advanced_industry_skill_industry_job_time_bonus_per_level, :runs
9
+
10
+ def initialize(seconds, science_level, advanced_industry_level,
11
+ science_copy_speed_bonus_per_level,
12
+ advanced_industry_skill_industry_job_time_bonus_per_level,
13
+ runs = 1)
14
+ @seconds = seconds
15
+ @science_level = science_level
16
+ @advanced_industry_level = advanced_industry_level
17
+ @science_copy_speed_bonus_per_level = science_copy_speed_bonus_per_level
18
+ @advanced_industry_skill_industry_job_time_bonus_per_level = advanced_industry_skill_industry_job_time_bonus_per_level
19
+ @runs = runs
20
+ end
21
+
22
+ def time
23
+ (BigDecimal(seconds.to_s) * BigDecimal(time_modifier.to_s) * BigDecimal(runs.to_s)).to_f
24
+ end
25
+
26
+ def time_modifier
27
+ science_copy_bonus_time_modifier * advanced_industry_job_time_bonus_time_modifier
28
+ end
29
+
30
+ def science_copy_bonus
31
+ science_level * science_copy_speed_bonus_per_level
32
+ end
33
+
34
+ def science_copy_bonus_time_modifier
35
+ (100.0 + science_copy_bonus) / 100.0
36
+ end
37
+
38
+ def advanced_industry_job_time_bonus
39
+ advanced_industry_level * advanced_industry_skill_industry_job_time_bonus_per_level
40
+ end
41
+
42
+ def advanced_industry_job_time_bonus_time_modifier
43
+ (100.0 + advanced_industry_job_time_bonus) / 100.0
44
+ end
45
+ end
46
+ end
47
+ end