eve_online 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +0 -1
  3. data/.rubocop-thread_safety.yml +9 -0
  4. data/.rubocop.yml +26 -102
  5. data/.rubocop_general.yml +94 -0
  6. data/.rubocop_rspec.yml +61 -0
  7. data/.rubocop_todo.yml +0 -0
  8. data/.travis.yml +14 -29
  9. data/CHANGELOG.md +329 -0
  10. data/Gemfile +1 -2
  11. data/README.md +840 -1088
  12. data/eve_online.gemspec +8 -8
  13. data/lib/eve_online.rb +45 -59
  14. data/lib/eve_online/esi/alliance.rb +33 -0
  15. data/lib/eve_online/esi/alliance_icon.rb +32 -0
  16. data/lib/eve_online/esi/base.rb +3 -2
  17. data/lib/eve_online/esi/bloodlines.rb +22 -0
  18. data/lib/eve_online/esi/character.rb +13 -56
  19. data/lib/eve_online/esi/character_assets.rb +32 -0
  20. data/lib/eve_online/esi/character_attributes.rb +36 -0
  21. data/lib/eve_online/esi/character_blueprints.rb +32 -0
  22. data/lib/eve_online/esi/character_clones.rb +43 -0
  23. data/lib/eve_online/esi/character_fatigue.rb +35 -0
  24. data/lib/eve_online/esi/character_implants.rb +27 -0
  25. data/lib/eve_online/esi/character_industry_jobs.rb +33 -0
  26. data/lib/eve_online/esi/character_loyalty_points.rb +4 -3
  27. data/lib/eve_online/esi/character_portrait.rb +12 -40
  28. data/lib/eve_online/esi/character_skill_queue.rb +6 -5
  29. data/lib/eve_online/esi/character_skills.rb +6 -5
  30. data/lib/eve_online/esi/character_standings.rb +32 -0
  31. data/lib/eve_online/esi/character_wallet.rb +33 -0
  32. data/lib/eve_online/esi/corporation.rb +35 -0
  33. data/lib/eve_online/esi/corporation_industry_jobs.rb +33 -0
  34. data/lib/eve_online/esi/dogma_attribute.rb +34 -0
  35. data/lib/eve_online/esi/dogma_attributes.rb +17 -0
  36. data/lib/eve_online/esi/factions.rb +22 -0
  37. data/lib/eve_online/esi/models/alliance.rb +34 -0
  38. data/lib/eve_online/esi/models/alliance_icon.rb +22 -0
  39. data/lib/eve_online/esi/models/asset.rb +47 -0
  40. data/lib/eve_online/esi/models/attributes.rb +56 -0
  41. data/lib/eve_online/esi/models/base.rb +21 -0
  42. data/lib/eve_online/esi/models/bloodline.rb +67 -0
  43. data/lib/eve_online/esi/models/blueprint.rb +52 -0
  44. data/lib/eve_online/esi/models/character.rb +64 -0
  45. data/lib/eve_online/esi/models/character_portrait.rb +48 -0
  46. data/lib/eve_online/esi/models/corporation.rb +69 -0
  47. data/lib/eve_online/esi/models/dogma_attribute.rb +62 -0
  48. data/lib/eve_online/esi/models/faction.rb +62 -0
  49. data/lib/eve_online/esi/models/fatigue.rb +33 -0
  50. data/lib/eve_online/esi/models/home_location.rb +22 -0
  51. data/lib/eve_online/esi/models/industry_job.rb +130 -0
  52. data/lib/eve_online/esi/models/jump_clone.rb +27 -0
  53. data/lib/eve_online/esi/models/loyalty_point.rb +1 -7
  54. data/lib/eve_online/esi/models/race.rb +32 -0
  55. data/lib/eve_online/esi/models/server_status.rb +34 -0
  56. data/lib/eve_online/esi/models/skill.rb +1 -7
  57. data/lib/eve_online/esi/models/skill_queue_entry.rb +13 -17
  58. data/lib/eve_online/esi/models/standing.rb +27 -0
  59. data/lib/eve_online/esi/races.rb +22 -0
  60. data/lib/eve_online/esi/server_status.rb +8 -24
  61. data/lib/eve_online/version.rb +1 -1
  62. metadata +67 -83
  63. data/.codeclimate.yml +0 -11
  64. data/.editorconfig +0 -10
  65. data/.rspec +0 -1
  66. data/lib/eve_online/base_crest.rb +0 -11
  67. data/lib/eve_online/blueprint.rb +0 -60
  68. data/lib/eve_online/character.rb +0 -54
  69. data/lib/eve_online/character_implants.rb +0 -29
  70. data/lib/eve_online/character_jump_clone_implants.rb +0 -29
  71. data/lib/eve_online/character_jump_clones.rb +0 -29
  72. data/lib/eve_online/character_skills.rb +0 -29
  73. data/lib/eve_online/eve/character_id.rb +0 -41
  74. data/lib/eve_online/implant.rb +0 -24
  75. data/lib/eve_online/item.rb +0 -49
  76. data/lib/eve_online/jump_clone.rb +0 -34
  77. data/lib/eve_online/jump_clone_implant.rb +0 -29
  78. data/lib/eve_online/sde/chr_races.rb +0 -14
  79. data/lib/eve_online/sde/models/chr_race.rb +0 -38
  80. data/lib/eve_online/skill.rb +0 -34
  81. data/lib/eve_online/sovereignty/campaigns.rb +0 -28
  82. data/lib/eve_online/standing.rb +0 -29
  83. data/lib/eve_online/xml/account_characters.rb +0 -48
  84. data/lib/eve_online/xml/account_status.rb +0 -31
  85. data/lib/eve_online/xml/api_key_info.rb +0 -63
  86. data/lib/eve_online/xml/character_account_balance.rb +0 -59
  87. data/lib/eve_online/xml/character_asset_list.rb +0 -54
  88. data/lib/eve_online/xml/character_blueprints.rb +0 -53
  89. data/lib/eve_online/xml/character_calendar_event_attendees.rb +0 -24
  90. data/lib/eve_online/xml/character_chat_channels.rb +0 -25
  91. data/lib/eve_online/xml/character_contact_list.rb +0 -25
  92. data/lib/eve_online/xml/character_contract_bids.rb +0 -23
  93. data/lib/eve_online/xml/character_contract_items.rb +0 -24
  94. data/lib/eve_online/xml/character_contracts.rb +0 -26
  95. data/lib/eve_online/xml/character_fac_war_stats.rb +0 -23
  96. data/lib/eve_online/xml/character_industry_jobs.rb +0 -23
  97. data/lib/eve_online/xml/character_industry_jobs_history.rb +0 -23
  98. data/lib/eve_online/xml/character_kill_mails.rb +0 -25
  99. data/lib/eve_online/xml/character_locations.rb +0 -32
  100. data/lib/eve_online/xml/character_mail_bodies.rb +0 -30
  101. data/lib/eve_online/xml/character_mail_messages.rb +0 -23
  102. data/lib/eve_online/xml/character_mailing_lists.rb +0 -23
  103. data/lib/eve_online/xml/character_medals.rb +0 -23
  104. data/lib/eve_online/xml/character_notification_texts.rb +0 -32
  105. data/lib/eve_online/xml/character_notifications.rb +0 -23
  106. data/lib/eve_online/xml/character_planetary_colonies.rb +0 -23
  107. data/lib/eve_online/xml/character_planetary_links.rb +0 -24
  108. data/lib/eve_online/xml/character_planetary_pins.rb +0 -24
  109. data/lib/eve_online/xml/character_planetary_routes.rb +0 -24
  110. data/lib/eve_online/xml/character_research.rb +0 -23
  111. data/lib/eve_online/xml/character_sheet.rb +0 -231
  112. data/lib/eve_online/xml/character_skill_in_training.rb +0 -68
  113. data/lib/eve_online/xml/character_skill_queue.rb +0 -51
  114. data/lib/eve_online/xml/character_standings.rb +0 -67
  115. data/lib/eve_online/xml/character_wallet_transactions.rb +0 -24
  116. data/lib/eve_online/xml/models/account_status.rb +0 -40
  117. data/lib/eve_online/xml/models/account_type_object.rb +0 -22
  118. data/lib/eve_online/xml/models/api_key_info.rb +0 -35
  119. data/lib/eve_online/xml/models/skill_queue_entry.rb +0 -55
  120. data/lib/eve_online/xml/server_status.rb +0 -31
@@ -0,0 +1,48 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class CharacterPortrait < Base
5
+ # https://eveonline-third-party-documentation.readthedocs.io/en/latest/imageserver/intro.html#character-images
6
+ # Available Sizes: 32, 64, 128, 256, 512, 1024
7
+ # https://nethackwiki.com/wiki/Physical_size
8
+ # Tiny = 0; Small = 1; Medium = 2; Large = 3; Huge = 4; Gigantic = 7.
9
+ def as_json
10
+ {
11
+ small: small,
12
+ medium: medium,
13
+ large: large,
14
+ huge: huge
15
+ }
16
+ end
17
+
18
+ def tiny
19
+ # FIXME: https://github.com/ccpgames/esi-issues/issues/270
20
+ # FIXME: https://github.com/ccpgames/esi-issues/issues/131
21
+ raise NotImplementedError
22
+ end
23
+
24
+ def small
25
+ options['px64x64']
26
+ end
27
+
28
+ def medium
29
+ options['px128x128']
30
+ end
31
+
32
+ def large
33
+ options['px256x256']
34
+ end
35
+
36
+ def huge
37
+ options['px512x512']
38
+ end
39
+
40
+ def gigantic
41
+ # FIXME: https://github.com/ccpgames/esi-issues/issues/270
42
+ # FIXME: https://github.com/ccpgames/esi-issues/issues/131
43
+ raise NotImplementedError
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,69 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class Corporation < Base
5
+ def as_json
6
+ {
7
+ alliance_id: alliance_id,
8
+ ceo_id: ceo_id,
9
+ corporation_description: corporation_description,
10
+ corporation_name: corporation_name,
11
+ creation_date: creation_date,
12
+ creator_id: creator_id,
13
+ faction: faction,
14
+ member_count: member_count,
15
+ tax_rate: tax_rate,
16
+ ticker: ticker,
17
+ corporation_url: corporation_url
18
+ }
19
+ end
20
+
21
+ def alliance_id
22
+ options['alliance_id']
23
+ end
24
+
25
+ def ceo_id
26
+ options['ceo_id']
27
+ end
28
+
29
+ def corporation_description
30
+ options['corporation_description']
31
+ end
32
+
33
+ def corporation_name
34
+ options['corporation_name']
35
+ end
36
+
37
+ def creation_date
38
+ creation_date = options['creation_date']
39
+
40
+ parse_datetime_with_timezone(creation_date) if creation_date
41
+ end
42
+
43
+ def creator_id
44
+ options['creator_id']
45
+ end
46
+
47
+ def faction
48
+ options['faction']
49
+ end
50
+
51
+ def member_count
52
+ options['member_count']
53
+ end
54
+
55
+ def tax_rate
56
+ options['tax_rate']
57
+ end
58
+
59
+ def ticker
60
+ options['ticker']
61
+ end
62
+
63
+ def corporation_url
64
+ options['url']
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,62 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class DogmaAttribute < Base
5
+ def as_json
6
+ {
7
+ id: id,
8
+ name: name,
9
+ description: description,
10
+ icon_id: icon_id,
11
+ default_value: default_value,
12
+ published: published,
13
+ display_name: display_name,
14
+ unit_id: unit_id,
15
+ stackable: stackable,
16
+ high_is_good: high_is_good
17
+ }
18
+ end
19
+
20
+ def id
21
+ options['attribute_id']
22
+ end
23
+
24
+ def name
25
+ options['name']
26
+ end
27
+
28
+ def description
29
+ options['description']
30
+ end
31
+
32
+ def icon_id
33
+ options['icon_id']
34
+ end
35
+
36
+ def default_value
37
+ options['default_value']
38
+ end
39
+
40
+ def published
41
+ options['published']
42
+ end
43
+
44
+ def display_name
45
+ options['display_name']
46
+ end
47
+
48
+ def unit_id
49
+ options['unit_id']
50
+ end
51
+
52
+ def stackable
53
+ options['stackable']
54
+ end
55
+
56
+ def high_is_good
57
+ options['high_is_good']
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,62 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class Faction < Base
5
+ def as_json
6
+ {
7
+ faction_id: faction_id,
8
+ name: name,
9
+ description: description,
10
+ solar_system_id: solar_system_id,
11
+ corporation_id: corporation_id,
12
+ militia_corporation_id: militia_corporation_id,
13
+ size_factor: size_factor,
14
+ station_count: station_count,
15
+ station_system_count: station_system_count,
16
+ is_unique: is_unique
17
+ }
18
+ end
19
+
20
+ def faction_id
21
+ options['faction_id']
22
+ end
23
+
24
+ def name
25
+ options['name']
26
+ end
27
+
28
+ def description
29
+ options['description']
30
+ end
31
+
32
+ def solar_system_id
33
+ options['solar_system_id']
34
+ end
35
+
36
+ def corporation_id
37
+ options['corporation_id']
38
+ end
39
+
40
+ def militia_corporation_id
41
+ options['militia_corporation_id']
42
+ end
43
+
44
+ def size_factor
45
+ options['size_factor']
46
+ end
47
+
48
+ def station_count
49
+ options['station_count']
50
+ end
51
+
52
+ def station_system_count
53
+ options['station_system_count']
54
+ end
55
+
56
+ def is_unique
57
+ options['is_unique']
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,33 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class Fatigue < Base
5
+ def as_json
6
+ {
7
+ jump_fatigue_expire_date: jump_fatigue_expire_date,
8
+ last_jump_date: last_jump_date,
9
+ last_update_date: last_update_date
10
+ }
11
+ end
12
+
13
+ def jump_fatigue_expire_date
14
+ jump_fatigue_expire_date = options['jump_fatigue_expire_date']
15
+
16
+ parse_datetime_with_timezone(jump_fatigue_expire_date) if jump_fatigue_expire_date
17
+ end
18
+
19
+ def last_jump_date
20
+ last_jump_date = options['last_jump_date']
21
+
22
+ parse_datetime_with_timezone(last_jump_date) if last_jump_date
23
+ end
24
+
25
+ def last_update_date
26
+ last_update_date = options['last_update_date']
27
+
28
+ parse_datetime_with_timezone(last_update_date) if last_update_date
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,22 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class HomeLocation < Base
5
+ def as_json
6
+ {
7
+ location_id: location_id,
8
+ location_type: location_type
9
+ }
10
+ end
11
+
12
+ def location_id
13
+ options['location_id']
14
+ end
15
+
16
+ def location_type
17
+ options['location_type']
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,130 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class IndustryJob < Base
5
+ def as_json
6
+ {
7
+ activity_id: activity_id,
8
+ blueprint_id: blueprint_id,
9
+ blueprint_location_id: blueprint_location_id,
10
+ blueprint_type_id: blueprint_type_id,
11
+ completed_character_id: completed_character_id,
12
+ completed_date: completed_date,
13
+ cost: cost,
14
+ duration: duration,
15
+ end_date: end_date,
16
+ facility_id: facility_id,
17
+ installer_id: installer_id,
18
+ job_id: job_id,
19
+ licensed_runs: licensed_runs,
20
+ output_location_id: output_location_id,
21
+ pause_date: pause_date,
22
+ probability: probability,
23
+ product_type_id: product_type_id,
24
+ runs: runs,
25
+ start_date: start_date,
26
+ station_id: station_id,
27
+ status: status,
28
+ successful_runs: successful_runs
29
+ }
30
+ end
31
+
32
+ def activity_id
33
+ options['activity_id']
34
+ end
35
+
36
+ def blueprint_id
37
+ options['blueprint_id']
38
+ end
39
+
40
+ def blueprint_location_id
41
+ options['blueprint_location_id']
42
+ end
43
+
44
+ def blueprint_type_id
45
+ options['blueprint_type_id']
46
+ end
47
+
48
+ def completed_character_id
49
+ options['completed_character_id']
50
+ end
51
+
52
+ def completed_date
53
+ completed_date = options['completed_date']
54
+
55
+ parse_datetime_with_timezone(completed_date) if completed_date
56
+ end
57
+
58
+ def cost
59
+ options['cost']
60
+ end
61
+
62
+ def duration
63
+ options['duration']
64
+ end
65
+
66
+ def end_date
67
+ end_date = options['end_date']
68
+
69
+ parse_datetime_with_timezone(end_date) if end_date
70
+ end
71
+
72
+ def facility_id
73
+ options['facility_id']
74
+ end
75
+
76
+ def installer_id
77
+ options['installer_id']
78
+ end
79
+
80
+ def job_id
81
+ options['job_id']
82
+ end
83
+
84
+ def licensed_runs
85
+ options['licensed_runs']
86
+ end
87
+
88
+ def output_location_id
89
+ options['output_location_id']
90
+ end
91
+
92
+ def pause_date
93
+ pause_date = options['pause_date']
94
+
95
+ parse_datetime_with_timezone(pause_date) if pause_date
96
+ end
97
+
98
+ def probability
99
+ options['probability']
100
+ end
101
+
102
+ def product_type_id
103
+ options['product_type_id']
104
+ end
105
+
106
+ def runs
107
+ options['runs']
108
+ end
109
+
110
+ def start_date
111
+ start_date = options['start_date']
112
+
113
+ parse_datetime_with_timezone(start_date) if start_date
114
+ end
115
+
116
+ def station_id
117
+ options['station_id']
118
+ end
119
+
120
+ def status
121
+ options['status']
122
+ end
123
+
124
+ def successful_runs
125
+ options['successful_runs']
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,27 @@
1
+ module EveOnline
2
+ module ESI
3
+ module Models
4
+ class JumpClone < Base
5
+ def as_json
6
+ {
7
+ location_id: location_id,
8
+ location_type: location_type,
9
+ implants: implants
10
+ }
11
+ end
12
+
13
+ def location_id
14
+ options['location_id']
15
+ end
16
+
17
+ def location_type
18
+ options['location_type']
19
+ end
20
+
21
+ def implants
22
+ options['implants']
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end