eve_online 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f78e115be3dc8087c067da541c89add9acd9e4a2a043acaedf796e977d4d3dd6
4
- data.tar.gz: e6eb7cb70d743534154f7c65cafa9131639fc75fc6e8eb1993384865c6839edb
3
+ metadata.gz: 14dc83a4c1535c808c82ff40b71b9c9c479b9f861cb92c05ca0ba2ecd17cdb8c
4
+ data.tar.gz: e0da7451adf2daad235c4ebc1a6e124135f90063c7d072a0212c5e555edfb1d7
5
5
  SHA512:
6
- metadata.gz: eb76941ebb70d05c2e38ddc48a26896ecb268f29563f67ee9516059d14ef047c9fe27d0dffb9ad5d89e5be9452c0a99e8ee624fc8dcb54aa6db86fe7c23bcc8e
7
- data.tar.gz: 3a496e51abcfec897a158df2564b7051cb8cc95a00b754be9f07153e62cffc1352e467fa208245b3e8f4e9846bad2b3df95b50e67f7c4dd1f937d8d2b5e46552
6
+ metadata.gz: a842c28352abc1006a8adf89ddee45aa7d225bcecc07f17ddea0c8d7d348053a2b7bcce17f2825a007a19277e98e111542c03127d1c6c09a55509a569c56f5bf
7
+ data.tar.gz: f7cfa081751d196f98e8e657753664f45075fc0ae0277ad0a7ffff129dc4edbd6c8fcd639ba26b3cb5da2d63bdd9fcb7b4c9b616ae6f66fbdf66713dd42cd598
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.22.0
4
+
5
+ * Add `EveOnline::ESI::AllianceCorporations#etag`
6
+ * Remove `EveOnline::ESI::Models::ModelWithEtag`
7
+ * Remove `EveOnline::ESI::ResponseWithEtag`
8
+ * Remove `EveOnline::ESI::Models::Alliance#etag`
9
+ * Remove `EveOnline::ESI::Models::Corporation#etag`
10
+ * Add exception `EveOnline::Exceptions::NotModified` for case when body not present for 304 request
11
+ * Remove `EveOnline::ESI::Models::Star#etag`
12
+ * Remove `EveOnline::ESI::Models::Stargate#etag`
13
+ * Add `EveOnline::ESI::Base#etag`
14
+ * `EveOnline::ESI::Base#content` raise `EveOnline::Exceptions::NotModified` when body not present for 304 requests
15
+ * Add setter `EveOnline::ESI::Base.etag=`
16
+
3
17
  ## v0.21.0
4
18
 
5
19
  * Remove `memoist` gem
data/Gemfile CHANGED
@@ -10,7 +10,3 @@ gem 'awesome_print', require: 'ap'
10
10
  gem 'pry'
11
11
  gem 'rubocop', require: false
12
12
  gem 'rubocop-rspec', require: false
13
-
14
- # TODO: remove after new webmock release
15
- gem 'webmock', git: 'https://github.com/bblimke/webmock.git',
16
- branch: 'master'
data/Gemfile.lock CHANGED
@@ -1,17 +1,7 @@
1
- GIT
2
- remote: https://github.com/bblimke/webmock.git
3
- revision: a135a37ff5f982a43806c52f2f7e778baba80797
4
- branch: master
5
- specs:
6
- webmock (3.4.2)
7
- addressable (>= 2.3.6)
8
- crack (>= 0.3.2)
9
- hashdiff
10
-
11
1
  PATH
12
2
  remote: .
13
3
  specs:
14
- eve_online (0.21.0)
4
+ eve_online (0.22.0)
15
5
  activesupport (>= 4.2.0)
16
6
 
17
7
  GEM
@@ -32,7 +22,7 @@ GEM
32
22
  safe_yaml (~> 1.0.0)
33
23
  diff-lcs (1.3)
34
24
  docile (1.3.1)
35
- hashdiff (0.3.7)
25
+ hashdiff (0.3.8)
36
26
  i18n (1.3.0)
37
27
  concurrent-ruby (~> 1.0)
38
28
  jaro_winkler (1.5.1)
@@ -76,7 +66,7 @@ GEM
76
66
  diff-lcs (>= 1.2.0, < 2.0)
77
67
  rspec-support (~> 3.8.0)
78
68
  rspec-support (3.8.0)
79
- rubocop (0.61.1)
69
+ rubocop (0.62.0)
80
70
  jaro_winkler (~> 1.5.1)
81
71
  parallel (~> 1.10)
82
72
  parser (>= 2.5, != 2.5.1.1)
@@ -99,6 +89,10 @@ GEM
99
89
  thread_safe (~> 0.1)
100
90
  unicode-display_width (1.4.1)
101
91
  vcr (4.0.0)
92
+ webmock (3.5.1)
93
+ addressable (>= 2.3.6)
94
+ crack (>= 0.3.2)
95
+ hashdiff
102
96
 
103
97
  PLATFORMS
104
98
  ruby
@@ -117,7 +111,7 @@ DEPENDENCIES
117
111
  rubocop-rspec
118
112
  simplecov
119
113
  vcr
120
- webmock!
114
+ webmock
121
115
 
122
116
  BUNDLED WITH
123
- 1.17.2
117
+ 1.17.3
data/Gemfile.mutant.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eve_online (0.21.0)
4
+ eve_online (0.22.0)
5
5
  activesupport (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -32,7 +32,7 @@ GEM
32
32
  diff-lcs (1.3)
33
33
  docile (1.3.1)
34
34
  equalizer (0.0.11)
35
- hashdiff (0.3.7)
35
+ hashdiff (0.3.8)
36
36
  i18n (1.3.0)
37
37
  concurrent-ruby (~> 1.0)
38
38
  ice_nine (0.11.2)
@@ -58,7 +58,7 @@ GEM
58
58
  equalizer (~> 0.0.9)
59
59
  ice_nine (~> 0.11.0)
60
60
  procto (~> 0.0.2)
61
- mutant (0.8.23)
61
+ mutant (0.8.24)
62
62
  abstract_type (~> 0.0.7)
63
63
  adamantium (~> 0.2.0)
64
64
  anima (~> 0.3.0)
@@ -73,8 +73,8 @@ GEM
73
73
  procto (~> 0.0.2)
74
74
  regexp_parser (~> 1.2)
75
75
  unparser (~> 0.4.2)
76
- mutant-rspec (0.8.23)
77
- mutant (~> 0.8.23)
76
+ mutant-rspec (0.8.24)
77
+ mutant (~> 0.8.24)
78
78
  rspec-core (>= 3.4.0, < 4.0.0)
79
79
  nokogiri (1.9.1)
80
80
  mini_portile2 (~> 2.4.0)
@@ -119,7 +119,7 @@ GEM
119
119
  parser (>= 2.3.1.2, < 2.6)
120
120
  procto (~> 0.0.2)
121
121
  vcr (4.0.0)
122
- webmock (3.4.2)
122
+ webmock (3.5.1)
123
123
  addressable (>= 2.3.6)
124
124
  crack (>= 0.3.2)
125
125
  hashdiff
@@ -142,4 +142,4 @@ DEPENDENCIES
142
142
  webmock
143
143
 
144
144
  BUNDLED WITH
145
- 1.17.2
145
+ 1.17.3
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2018 Igor Zubkov
3
+ Copyright (c) 2015-2019 Igor Zubkov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -96,8 +96,7 @@ alliance.as_json # => {:creator_corporation_id=>98306624,
96
96
  # :executor_corporation_id=>98306624,
97
97
  # :faction_id=>nil,
98
98
  # :name=>"Kids With Guns Alliance",
99
- # :ticker=>"-KWG-",
100
- # :etag=>"6780e53a01c7d9715b5f445126c4f2c137da4be79e4debe541ce3ab2"}
99
+ # :ticker=>"-KWG-"}
101
100
 
102
101
  alliance.creator_corporation_id # => 98306624
103
102
  alliance.creator_id # => 94195096
@@ -106,6 +105,7 @@ alliance.executor_corporation_id # => 98306624
106
105
  alliance.faction_id # => nil
107
106
  alliance.name # => "Kids With Guns Alliance"
108
107
  alliance.ticker # => "-KWG-"
108
+
109
109
  alliance.etag # => "6780e53a01c7d9715b5f445126c4f2c137da4be79e4debe541ce3ab2"
110
110
  ```
111
111
 
@@ -118,9 +118,11 @@ alliance_corporations = EveOnline::ESI::AllianceCorporations.new(options)
118
118
 
119
119
  alliance_corporations.scope # => nil
120
120
 
121
- alliance_corporations.corporation_ids.size # => 33
121
+ alliance_corporations.corporation_ids.size # => 70
122
+
123
+ alliance_corporations.corporation_ids.first # => 98091533
122
124
 
123
- alliance_corporations.corporation_ids.first # => 98134807
125
+ alliance_corporations.etag # => "9b6810d8ddbd9a13bb4ad09cf4bfefd9f29974bffd543eb30ce25132"
124
126
  ```
125
127
 
126
128
  #### Get alliance icon
@@ -137,6 +139,8 @@ alliance_icon.as_json # => {:icon_medium=>"http://image.eveonline.com/Alliance/9
137
139
 
138
140
  alliance_icon.icon_medium # => "http://image.eveonline.com/Alliance/99005443_128.png"
139
141
  alliance_icon.icon_small # => "http://image.eveonline.com/Alliance/99005443_64.png"
142
+
143
+ alliance_icon.etag # => "e3f6a76b4a1287f54966c6253f8f5d6ac6460bc43d47570331b43e0b"
140
144
  ```
141
145
 
142
146
  ### Assets
@@ -175,6 +179,8 @@ asset.location_id # => 1027847409779
175
179
  asset.location_type # => "other"
176
180
  asset.quantity # => 1
177
181
  asset.type_id # => 1010
182
+
183
+ # TODO: character_assets.etag
178
184
  ```
179
185
 
180
186
  #### Get character asset locations
@@ -201,6 +207,8 @@ asset_location.position.as_json # => {:x=>-928621543221.3319,
201
207
  asset_location.position.x # => -928621543221.3319
202
208
  asset_location.position.y # => 297645715142.40234
203
209
  asset_location.position.z # => -971212198300.4812
210
+
211
+ # TODO: character_assets_locations.etag
204
212
  ```
205
213
 
206
214
  #### Get character asset names
@@ -221,6 +229,8 @@ character_asset_name.as_json # => {:item_id=>1001215602246,
221
229
 
222
230
  character_asset_name.item_id # => 1001215602246
223
231
  character_asset_name.name # => "HOLE"
232
+
233
+ # TODO: character_assets_names.etag
224
234
  ```
225
235
 
226
236
  #### Get corporation assets
@@ -273,6 +283,8 @@ bookmark.item_type_id # => 5
273
283
  bookmark.label # => "Stargate"
274
284
  bookmark.location_id # => 30003430
275
285
  bookmark.notes # => "This is a stargate"
286
+
287
+ # TODO: character_bookmarks.etag
276
288
  ```
277
289
 
278
290
  #### List bookmark folders
@@ -297,6 +309,8 @@ bookmark_folder.as_json # => {:folder_id=>5,
297
309
 
298
310
  bookmark_folder.folder_id # => 5
299
311
  bookmark_folder.name # => "Icecream"
312
+
313
+ # TODO: character_bookmark_folders.etag
300
314
  ```
301
315
 
302
316
  #### List corporation bookmarks
@@ -331,6 +345,7 @@ event.importance # => 0
331
345
  event.title # => "Moon extraction for 66-PMM - GoldMine-5-"
332
346
 
333
347
  # TODO: add from_event support
348
+ # TODO: character_calendar.etag
334
349
  ```
335
350
 
336
351
  #### Get an event
@@ -373,6 +388,8 @@ character.gender # => "male"
373
388
  character.name # => "Green Black"
374
389
  character.race_id # => 2
375
390
  character.security_status # => 1.8694881661345457
391
+
392
+ # TODO: character.etag
376
393
  ```
377
394
 
378
395
  #### Get agents research
@@ -411,6 +428,8 @@ blueprint.quantity # => -2
411
428
  blueprint.runs # => 300
412
429
  blueprint.time_efficiency # => 0
413
430
  blueprint.type_id # => 1010
431
+
432
+ # TODO: character_blueprints.etag
414
433
  ```
415
434
 
416
435
  #### Get corporation history
@@ -435,6 +454,8 @@ character_fatigue.last_jump_date # => nil
435
454
  character_fatigue.last_update_date # => nil
436
455
 
437
456
  # TODO: add real data here
457
+
458
+ # TODO: character_fatigue.etag
438
459
  ```
439
460
 
440
461
  #### Get medals
@@ -467,6 +488,8 @@ notification.sender_type # => "corporation"
467
488
  notification.text # => "againstID: 99005443\ncost: 0\ndeclaredByID: 98442842\ndelayHours: 24\nhostileState: 0\n"
468
489
  notification.timestamp # => Thu, 01 Mar 2018 13:48:00 UTC +00:00
469
490
  notification.type # => "AllWarDeclaredMsg"
491
+
492
+ # TODO: character_notifications.etag
470
493
  ```
471
494
 
472
495
  #### Get new contact notifications
@@ -489,6 +512,8 @@ character_portrait.medium # => "http://image.eveonline.com/Character/90729314_12
489
512
  character_portrait.large # => "http://image.eveonline.com/Character/90729314_256.jpg"
490
513
  character_portrait.huge # => "http://image.eveonline.com/Character/90729314_512.jpg"
491
514
  character_portrait.small # => "http://image.eveonline.com/Character/90729314_64.jpg"
515
+
516
+ # TODO: character_portrait.etag
492
517
  ```
493
518
 
494
519
  #### Get character corporation roles
@@ -513,6 +538,8 @@ standing.as_json # => {:from_id=>500001,
513
538
  standing.from_id # => 500001
514
539
  standing.from_type # => "faction"
515
540
  standing.standing # => 0.3303719111639991
541
+
542
+ # TODO: character_standing.etag
516
543
  ```
517
544
 
518
545
  #### Yearly aggregate stats
@@ -554,6 +581,8 @@ jump_clone.name # => nil
554
581
  character_clones.last_clone_jump_date # => Fri, 27 Jul 2012 14:50:11 UTC +00:00
555
582
 
556
583
  character_clones.last_station_change_date # => Tue, 30 Jun 2015 21:51:13 UTC +00:00
584
+
585
+ # TODO: character_clones.etag
557
586
  ```
558
587
 
559
588
  #### Get active implants
@@ -568,6 +597,8 @@ character_implants.scope # => "esi-clones.read_implants.v1"
568
597
  character_implants.implant_ids.size # => 5
569
598
 
570
599
  character_implants.implant_ids # => [9899, 9941, 9942, 9943, 9956]
600
+
601
+ # TODO: character_implants.etag
571
602
  ```
572
603
 
573
604
  ### Contacts
@@ -633,8 +664,7 @@ corporation.as_json # => {:alliance_id=>99001258,
633
664
  # :shares=>1000,
634
665
  # :tax_rate=>0.1,
635
666
  # :ticker=>"BUBIC",
636
- # :corporation_url=>"http://",
637
- # :etag=>"9f1b3761e93aba36ceaea6328e62031ec777317c70b7439b665d93fe"}
667
+ # :corporation_url=>"http://"}
638
668
 
639
669
  corporation.alliance_id # => 99001258
640
670
  corporation.ceo_id # => 1721864142
@@ -649,6 +679,7 @@ corporation.shares # => 1000
649
679
  corporation.tax_rate # => 0.1
650
680
  corporation.ticker # => "BUBIC"
651
681
  corporation.corporation_url # => "http://"
682
+
652
683
  corporation.etag # => "9f1b3761e93aba36ceaea6328e62031ec777317c70b7439b665d93fe"
653
684
  ```
654
685
 
@@ -690,6 +721,8 @@ blueprint.time_efficiency # => 20
690
721
  blueprint.type_id # => 31803
691
722
 
692
723
  # TODO: add roles
724
+
725
+ # TODO: corporation_blueprints.etag
693
726
  ```
694
727
 
695
728
  #### Get all corporation ALSC logs
@@ -742,6 +775,8 @@ dogma_attributes.scope # => nil
742
775
  dogma_attributes.attribute_ids.size # => 2385
743
776
 
744
777
  dogma_attributes.attribute_ids.first # => 2
778
+
779
+ # TODO: dogma_attributes.etag
745
780
  ```
746
781
 
747
782
  #### Get attribute information
@@ -774,6 +809,8 @@ dogma_attribute.name # => "isOnline"
774
809
  dogma_attribute.published # => nil
775
810
  dogma_attribute.stackable # => true
776
811
  dogma_attribute.unit_id # => nil
812
+
813
+ # TODO: dogma_attribute.etag
777
814
  ```
778
815
 
779
816
  #### Get dynamic item information
@@ -788,6 +825,8 @@ dogma_effects.scope # => nil
788
825
  dogma_effects.effects_ids.size # => 4123
789
826
 
790
827
  dogma_effects.effects_ids.first # => 4
828
+
829
+ # TODO: dogma_effects.etag
791
830
  ```
792
831
 
793
832
  #### Get effect information
@@ -858,6 +897,8 @@ modifier.func # => "LocationRequiredSkillModifier"
858
897
  modifier.modified_attribute_id # => 73
859
898
  modifier.modifying_attribute_id # => 2458
860
899
  modifier.operator # => 6
900
+
901
+ # TODO: dogma_effect.etag
861
902
  ```
862
903
 
863
904
  ### Faction Warfare
@@ -980,6 +1021,8 @@ job.start_date # => Sat, 18 Nov 2017 10:16:14 UTC +00:00
980
1021
  job.station_id # => 1023579231924
981
1022
  job.status # => "active"
982
1023
  job.successful_runs # => nil
1024
+
1025
+ # TODO: character_jobs.etag
983
1026
  ```
984
1027
 
985
1028
  #### Character mining ledger
@@ -1052,6 +1095,8 @@ job.runs # => 1
1052
1095
  job.start_date # => Sat, 18 Nov 2017 11:20:14 UTC +00:00
1053
1096
  job.status # => "active"
1054
1097
  job.successful_runs # => nil
1098
+
1099
+ # TODO: corporation_jobs.etag
1055
1100
  ```
1056
1101
 
1057
1102
  #### List industry facilities
@@ -1086,6 +1131,8 @@ killmail.as_json # => {:killmail_hash=>"07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5
1086
1131
 
1087
1132
  killmail.killmail_hash # => "07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5"
1088
1133
  killmail.killmail_id # => 72410059
1134
+
1135
+ # TODO: character_killmails.etag
1089
1136
  ```
1090
1137
 
1091
1138
  #### Get a corporation's recent kills and losses
@@ -1110,6 +1157,8 @@ killmail.as_json # => {:killmail_hash=>"07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5
1110
1157
 
1111
1158
  killmail.killmail_hash # => "07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5"
1112
1159
  killmail.killmail_id # => 72410059
1160
+
1161
+ # TODO: corporation_killmails.etag
1113
1162
  ```
1114
1163
 
1115
1164
  #### Get a single killmail
@@ -1132,6 +1181,8 @@ character_location.as_json # => {:solar_system_id=>30004971,
1132
1181
  character_location.solar_system_id # => 30004971
1133
1182
  character_location.station_id # => 60014689
1134
1183
  character_location.structure_id # => nil
1184
+
1185
+ # TODO: character_location.etag
1135
1186
  ```
1136
1187
 
1137
1188
  #### Get character online
@@ -1152,12 +1203,13 @@ character_online.last_login # => Sun, 15 Jan 2017 11:39:24 UTC +00:00
1152
1203
  character_online.last_logout # => Sun, 15 Jan 2017 11:31:22 UTC +00:00
1153
1204
  character_online.logins # => 370
1154
1205
  character_online.online # => false
1206
+
1207
+ # TODO: character_online.etag
1155
1208
  ```
1156
1209
 
1157
1210
  #### Get current ship
1158
1211
 
1159
1212
  ```ruby
1160
-
1161
1213
  options = { token: 'token123', character_id: 90729314 }
1162
1214
 
1163
1215
  character_ship = EveOnline::ESI::CharacterShip.new(options)
@@ -1171,6 +1223,8 @@ character_ship.as_json # => {:ship_item_id=>1002312158069,
1171
1223
  character_ship.ship_item_id # => 1002312158069
1172
1224
  character_ship.ship_name # => "Green Black's Velator"
1173
1225
  character_ship.ship_type_id # => 606
1226
+
1227
+ # TODO: character_ship.etag
1174
1228
  ```
1175
1229
 
1176
1230
  ### Loyalty
@@ -1192,6 +1246,8 @@ loyalty_point.as_json # => {:corporation_id=>1000035, :loyalty_points=>14163}
1192
1246
 
1193
1247
  loyalty_point.corporation_id # => 1000035
1194
1248
  loyalty_point.loyalty_points # => 14163
1249
+
1250
+ # TODO: character_loyalty_points.etag
1195
1251
  ```
1196
1252
 
1197
1253
  #### List loyalty store offers
@@ -1249,6 +1305,8 @@ order.volume_remain
1249
1305
  order.volume_total
1250
1306
 
1251
1307
  # TODO: update example
1308
+
1309
+ # TODO: character_orders.etag
1252
1310
  ```
1253
1311
 
1254
1312
  #### List historical orders by a character
@@ -1291,6 +1349,8 @@ order.wallet_division
1291
1349
  # TODO: update example
1292
1350
 
1293
1351
  # TODO: update
1352
+
1353
+ # TODO: corporation_orders.etag
1294
1354
  ```
1295
1355
 
1296
1356
  #### List historical orders from a corporation
@@ -1323,6 +1383,8 @@ stats_today.highest # => 769999999.99
1323
1383
  stats_today.lowest # => 701100002.49
1324
1384
  stats_today.order_count # => 52
1325
1385
  stats_today.volume # => 52
1386
+
1387
+ # TODO: market_history.etag
1326
1388
  ```
1327
1389
 
1328
1390
  #### List orders in a region
@@ -1397,6 +1459,8 @@ character_attributes.last_remap_date # => Sat, 07 May 2011 12:58:06 UTC +00:00
1397
1459
  character_attributes.memory # => 24
1398
1460
  character_attributes.perception # => 23
1399
1461
  character_attributes.willpower # => 23
1462
+
1463
+ # TODO: character_attributes.etag
1400
1464
  ```
1401
1465
 
1402
1466
  #### Get character's skill queue
@@ -1429,6 +1493,8 @@ skill_queue_entry.queue_position # => 0
1429
1493
  skill_queue_entry.skill_id # => 12487
1430
1494
  skill_queue_entry.start_date # => Sun, 15 Jan 2017 11:38:25 UTC +00:00
1431
1495
  skill_queue_entry.training_start_sp # => 7263
1496
+
1497
+ # TODO: character_skill_queue.etag
1432
1498
  ```
1433
1499
 
1434
1500
  #### Get character skills
@@ -1458,6 +1524,8 @@ skill.trained_skill_level # => 1
1458
1524
 
1459
1525
  character_skills.total_sp # => 50362576
1460
1526
  character_skills.unallocated_sp # => 656000
1527
+
1528
+ # TODO: character_skills.etag
1461
1529
  ```
1462
1530
 
1463
1531
  ### Sovereignty
@@ -1486,6 +1554,8 @@ server_status.players # => 34545
1486
1554
  server_status.server_version # => "1135520"
1487
1555
  server_status.start_time # => Tue, 11 Apr 2017 11:05:35 UTC +00:00
1488
1556
  server_status.vip # => nil
1557
+
1558
+ # TODO: server_status.etag
1489
1559
  ```
1490
1560
 
1491
1561
  ### Universe
@@ -1542,6 +1612,8 @@ asteroid_belt.position.as_json # => {:x=>161967513600.0,
1542
1612
  asteroid_belt.position.x # => 161967513600.0
1543
1613
  asteroid_belt.position.y # => 21288837120.0
1544
1614
  asteroid_belt.position.z # => -73505464320.0
1615
+
1616
+ # TODO: asteroid_belt.etag
1545
1617
  ```
1546
1618
 
1547
1619
  #### Get bloodlines
@@ -1594,6 +1666,8 @@ categories.scope # => nil
1594
1666
  categories.category_ids.size # => 43
1595
1667
 
1596
1668
  categories.category_ids.first # => 0
1669
+
1670
+ # TODO: categories.etag
1597
1671
  ```
1598
1672
 
1599
1673
  #### Get item category information
@@ -1615,6 +1689,8 @@ category.published # => true
1615
1689
 
1616
1690
  category.group_ids.size # => 46
1617
1691
  category.group_ids.first # => 25
1692
+
1693
+ # TODO: category.etag
1618
1694
  ```
1619
1695
 
1620
1696
  #### Get constellations
@@ -1627,6 +1703,8 @@ constellations.scope # => nil
1627
1703
  constellations.constellation_ids.size # => 1146
1628
1704
 
1629
1705
  constellations.constellation_ids.first # => 20000001
1706
+
1707
+ # TODO: constellations.etag
1630
1708
  ```
1631
1709
 
1632
1710
  #### Get constellation information
@@ -1655,6 +1733,8 @@ constellation.position.as_json # => {:x=>-9.404655970099134e+16,
1655
1733
  constellation.position.x # => -9.404655970099134e+16
1656
1734
  constellation.position.y # => 4.952015315379885e+16
1657
1735
  constellation.position.z # => -4.273873181840197e+16
1736
+
1737
+ # TODO: constellation.etag
1658
1738
  ```
1659
1739
 
1660
1740
  #### Get factions
@@ -1705,6 +1785,8 @@ graphics.scope # => nil
1705
1785
  graphics.graphic_ids.size # => 3624
1706
1786
 
1707
1787
  graphics.graphic_ids.first # => 20481
1788
+
1789
+ # TODO: graphics.etag
1708
1790
  ```
1709
1791
 
1710
1792
  #### Get graphic information
@@ -1733,6 +1815,8 @@ graphic.sof_dna # => "ai1_t1:tash-murkon:amarr"
1733
1815
  graphic.sof_fation_name # => "tash-murkon"
1734
1816
  graphic.sof_hull_name # => "ai1_t1"
1735
1817
  graphic.sof_race_name # => "amarr"
1818
+
1819
+ # TODO: graphic.etag
1736
1820
  ```
1737
1821
 
1738
1822
  #### Get item groups
@@ -1751,6 +1835,8 @@ groups.total_pages # => 2
1751
1835
  groups.group_ids.size # => 1000
1752
1836
 
1753
1837
  groups.group_ids.first # => 0
1838
+
1839
+ # TODO: groups.etag
1754
1840
  ```
1755
1841
 
1756
1842
  #### Get item group information
@@ -1772,6 +1858,8 @@ group.group_id # => 450
1772
1858
  group.name # => "Arkonor"
1773
1859
  group.published # => true
1774
1860
  group.type_ids # => [22, 17425, 17426, 26852, 28367, 28385, 28387, 28625, 46678, 46691]
1861
+
1862
+ # TODO: group.etag
1775
1863
  ```
1776
1864
 
1777
1865
  #### Bulk names to IDs
@@ -1800,6 +1888,8 @@ moon.position.as_json # => {:x=>162088094286.0,
1800
1888
  moon.position.x # => 162088094286.0
1801
1889
  moon.position.y # => 21314854783.0
1802
1890
  moon.position.z # => -73598621491.0
1891
+
1892
+ # TODO: moon.etag
1803
1893
  ```
1804
1894
 
1805
1895
  #### Get names and categories for a set of ID's
@@ -1830,6 +1920,8 @@ planet.position.as_json # => {:x=>161891117336.0,
1830
1920
  planet.position.x # => 161891117336.0
1831
1921
  planet.position.y # => 21288951986.0
1832
1922
  planet.position.z # => -73529712226.0
1923
+
1924
+ # TODO: planet.etag
1833
1925
  ```
1834
1926
 
1835
1927
  #### Get character races
@@ -1868,6 +1960,8 @@ regions.scope # => nil
1868
1960
  regions.universe_region_ids.size # => 106
1869
1961
 
1870
1962
  regions.universe_region_ids.first # => 10000001
1963
+
1964
+ # TODO: regions.etag
1871
1965
  ```
1872
1966
 
1873
1967
  #### Get region information
@@ -1888,6 +1982,8 @@ region.constellations # => [20000001,20000002,20000003,20000016]
1888
1982
  region.description # => "The Derelik region..."
1889
1983
  region.name # => "Derelik"
1890
1984
  region.region_id # => 10000001
1985
+
1986
+ # TODO: region.etag
1891
1987
  ```
1892
1988
 
1893
1989
  #### Get stargate information
@@ -1902,14 +1998,12 @@ stargate.scope # => nil
1902
1998
  stargate.as_json # => {:name=>"Stargate (Akpivem)",
1903
1999
  # :stargate_id=>50000056,
1904
2000
  # :system_id=>30000001,
1905
- # :type_id=>29624,
1906
- # :etag=>"2e28835f91024608719726b655591d531125a023e122859d174923d5"}
2001
+ # :type_id=>29624}
1907
2002
 
1908
2003
  stargate.name # => "Stargate (Akpivem)"
1909
2004
  stargate.stargate_id # => 50000056
1910
2005
  stargate.system_id # => 30000001
1911
2006
  stargate.type_id # => 29624
1912
- stargate.etag # => "2e28835f91024608719726b655591d531125a023e122859d174923d5"
1913
2007
 
1914
2008
  stargate.destination.as_json # => {:stargate_id=>50000342,
1915
2009
  # :system_id=>30000003}
@@ -1924,6 +2018,8 @@ stargate.position.as_json # => {:x=>331516354560.0,
1924
2018
  stargate.position.x # => 331516354560.0
1925
2019
  stargate.position.y # => 43597455360.0
1926
2020
  stargate.position.z # => -586353991680.0
2021
+
2022
+ stargate.etag # => "2e28835f91024608719726b655591d531125a023e122859d174923d5"
1927
2023
  ```
1928
2024
 
1929
2025
  #### Get star information
@@ -1942,8 +2038,7 @@ star.as_json # => {:age=>14262808228,
1942
2038
  # :solar_system_id=>30000001,
1943
2039
  # :spectral_class=>"K2 V",
1944
2040
  # :temperature=>4567,
1945
- # :type_id=>45041,
1946
- # :etag=>"2e28835f91024608719726b655591d531125a023e122859d174923d5"}
2041
+ # :type_id=>45041}
1947
2042
 
1948
2043
  star.age # => 14262808228
1949
2044
  star.luminosity # => 0.01575000025331974
@@ -1953,6 +2048,7 @@ star.solar_system_id # => 30000001
1953
2048
  star.spectral_class # => "K2 V"
1954
2049
  star.temperature # => 4567
1955
2050
  star.type_id # => 45041
2051
+
1956
2052
  star.etag # => "2e28835f91024608719726b655591d531125a023e122859d174923d5"
1957
2053
 
1958
2054
  # options = { id: 60012526 }
@@ -2031,6 +2127,8 @@ station.position.as_json # => {:x=>-1106145239040.0,
2031
2127
  station.position.x # => -1106145239040.0
2032
2128
  station.position.y # => -145460060160.0
2033
2129
  station.position.z # => 182618726400.0
2130
+
2131
+ # TODO: station.etag
2034
2132
  ```
2035
2133
 
2036
2134
  #### List all public structures
@@ -2043,6 +2141,8 @@ structures.scope # => nil
2043
2141
  structures.structure_ids.size # => 4181
2044
2142
 
2045
2143
  structures.structure_ids.first # => 1028178624512
2144
+
2145
+ # TODO: structures.etag
2046
2146
  ```
2047
2147
 
2048
2148
  #### Get structure information
@@ -2062,6 +2162,8 @@ jump.as_json # => {:ship_jumps=>22, :system_id=>30005327}
2062
2162
 
2063
2163
  jump.ship_jumps # => 22
2064
2164
  jump.system_id # => 30005327
2165
+
2166
+ # TODO: system_jumps.etag
2065
2167
  ```
2066
2168
 
2067
2169
  #### Get system kills
@@ -2084,6 +2186,8 @@ system_kill.npc_kills # => 231
2084
2186
  system_kill.pod_kills # => 0
2085
2187
  system_kill.ship_kills # => 0
2086
2188
  system_kill.system_id # => 30001746
2189
+
2190
+ # TODO: system_kills.etag
2087
2191
  ```
2088
2192
 
2089
2193
  #### Get solar systems
@@ -2096,6 +2200,8 @@ systems.scope # => nil
2096
2200
  systems.universe_system_ids.size # => 8285
2097
2201
 
2098
2202
  systems.universe_system_ids.first # => 30000001
2203
+
2204
+ # TODO: systems.etag
2099
2205
  ```
2100
2206
 
2101
2207
  #### Get solar system information
@@ -2144,6 +2250,8 @@ planet.moon_ids # => [40000004]
2144
2250
  system.stargate_ids # => [50000056, 50000057, 50000058]
2145
2251
 
2146
2252
  system.station_ids # => [60012526, 60014437]
2253
+
2254
+ # TODO: system.etag
2147
2255
  ```
2148
2256
 
2149
2257
  #### Get types
@@ -2162,6 +2270,8 @@ types.total_pages # => 35
2162
2270
  types.universe_type_ids.size # => 1000
2163
2271
 
2164
2272
  types.universe_type_ids.first # => 0
2273
+
2274
+ # TODO: types.etag
2165
2275
  ```
2166
2276
 
2167
2277
  #### Get type information
@@ -2222,6 +2332,8 @@ type_dogma_effect.as_json # => {:effect_id=>596,
2222
2332
 
2223
2333
  type_dogma_effect.effect_id # => 596
2224
2334
  type_dogma_effect.is_default # => false
2335
+
2336
+ # TODO: type.etag
2225
2337
  ```
2226
2338
 
2227
2339
  ### User Interface
@@ -2250,6 +2362,8 @@ character_wallet.scope # => "esi-wallet.read_character_wallet.v1"
2250
2362
  character_wallet.as_json # => {:wallet=>409488252.49}
2251
2363
 
2252
2364
  character_wallet.wallet # => 409488252.49
2365
+
2366
+ # TODO: character_wallet.etag
2253
2367
  ```
2254
2368
 
2255
2369
  #### Get character wallet journal
@@ -2286,6 +2400,8 @@ wallet_journal_entry.tax
2286
2400
  wallet_journal_entry.tax_receiver_id
2287
2401
 
2288
2402
  # TODO: update example
2403
+
2404
+ # TODO: character_wallet_journal.etag
2289
2405
  ```
2290
2406
 
2291
2407
  #### Get wallet transactions
@@ -2310,6 +2426,8 @@ wars.war_ids.size # => 2000
2310
2426
  wars.war_ids.first # => 615639
2311
2427
 
2312
2428
  # TODO: max_war_id
2429
+
2430
+ # TODO: wars.etag
2313
2431
  ```
2314
2432
 
2315
2433
  #### Get war information
@@ -2336,6 +2454,8 @@ killmail.as_json # => {:killmail_hash=>"07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5
2336
2454
 
2337
2455
  killmail.killmail_hash # => "07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5"
2338
2456
  killmail.killmail_id # => 72410059
2457
+
2458
+ # TODO: war_killmails.etag
2339
2459
  ```
2340
2460
 
2341
2461
  ## Exceptions
@@ -2357,6 +2477,7 @@ end
2357
2477
  List of exceptions:
2358
2478
 
2359
2479
  * `EveOnline::Exceptions::NoContent` when response returns status 204 without body.
2480
+ * `EveOnline::Exceptions::NotModified` when response returns status 304 without body.
2360
2481
  * `EveOnline::Exceptions::BadRequest` when response returns status 400.
2361
2482
  * `EveOnline::Exceptions::Unauthorized` when response returns status 401.
2362
2483
  * `EveOnline::Exceptions::Forbidden` when response returns status 403.
data/lib/eve_online.rb CHANGED
@@ -13,12 +13,11 @@ require 'eve_online/exceptions/internal_server_error'
13
13
  require 'eve_online/exceptions/bad_gateway'
14
14
  require 'eve_online/exceptions/service_unavailable'
15
15
  require 'eve_online/exceptions/no_content'
16
+ require 'eve_online/exceptions/not_modified'
16
17
 
17
18
  # ESI API
18
19
  require 'eve_online/esi/base'
19
20
 
20
- require 'eve_online/esi/response_with_etag'
21
-
22
21
  require 'eve_online/esi/alliances'
23
22
  require 'eve_online/esi/alliance'
24
23
  require 'eve_online/esi/alliance_corporations'
@@ -110,8 +109,6 @@ require 'eve_online/esi/war_killmails'
110
109
  # Models
111
110
  require 'eve_online/esi/models/base'
112
111
 
113
- require 'eve_online/esi/models/model_with_etag'
114
-
115
112
  require 'eve_online/esi/models/position'
116
113
  require 'eve_online/esi/models/loyalty_point'
117
114
  require 'eve_online/esi/models/skill_queue_entry'
@@ -7,8 +7,6 @@ module EveOnline
7
7
  class Alliance < Base
8
8
  extend Forwardable
9
9
 
10
- include ResponseWithEtag
11
-
12
10
  API_ENDPOINT = 'https://esi.evetech.net/v3/alliances/%<alliance_id>s/?datasource=%<datasource>s'
13
11
 
14
12
  attr_reader :alliance_id
@@ -21,10 +19,10 @@ module EveOnline
21
19
 
22
20
  def_delegators :model, :as_json, :creator_corporation_id, :creator_id,
23
21
  :date_founded, :executor_corporation_id, :faction_id,
24
- :name, :ticker, :etag
22
+ :name, :ticker
25
23
 
26
24
  def model
27
- @model ||= Models::Alliance.new(response_with_etag)
25
+ @model ||= Models::Alliance.new(response)
28
26
  end
29
27
 
30
28
  def scope; end
@@ -9,10 +9,6 @@ module EveOnline
9
9
  response
10
10
  end
11
11
 
12
- def etag
13
- current_etag
14
- end
15
-
16
12
  def scope; end
17
13
 
18
14
  def url
@@ -53,7 +53,11 @@ module EveOnline
53
53
  client.open_timeout = value
54
54
  end
55
55
 
56
- def current_etag
56
+ def etag=(value)
57
+ @_etag = value
58
+ end
59
+
60
+ def etag
57
61
  resource.header['Etag']&.gsub('W/', '')&.gsub('"', '')
58
62
  end
59
63
 
@@ -112,12 +116,9 @@ module EveOnline
112
116
  # TODO: write
113
117
  raise NotImplementedError
114
118
  when Net::HTTPNoContent
115
- # TODO: write
116
- # raise NotImplementedError
117
119
  raise EveOnline::Exceptions::NoContent
118
120
  when Net::HTTPNotModified
119
- # TODO: write etag support
120
- raise NotImplementedError
121
+ raise EveOnline::Exceptions::NotModified
121
122
  when Net::HTTPBadRequest
122
123
  raise EveOnline::Exceptions::BadRequest
123
124
  when Net::HTTPUnauthorized
@@ -7,8 +7,6 @@ module EveOnline
7
7
  class Corporation < Base
8
8
  extend Forwardable
9
9
 
10
- include ResponseWithEtag
11
-
12
10
  API_ENDPOINT = 'https://esi.evetech.net/v4/corporations/%<corporation_id>s/?datasource=%<datasource>s'
13
11
 
14
12
  attr_reader :corporation_id
@@ -23,10 +21,10 @@ module EveOnline
23
21
  def_delegators :model, :as_json, :alliance_id, :ceo_id, :creator_id,
24
22
  :date_founded, :description, :faction_id,
25
23
  :home_station_id, :member_count, :name, :shares,
26
- :tax_rate, :ticker, :corporation_url, :etag
24
+ :tax_rate, :ticker, :corporation_url
27
25
 
28
26
  def model
29
- @model ||= Models::Corporation.new(response_with_etag)
27
+ @model ||= Models::Corporation.new(response)
30
28
  end
31
29
 
32
30
  def scope; end
@@ -4,8 +4,6 @@ module EveOnline
4
4
  module ESI
5
5
  module Models
6
6
  class Alliance < Base
7
- include ModelWithEtag
8
-
9
7
  def as_json
10
8
  {
11
9
  creator_corporation_id: creator_corporation_id,
@@ -14,8 +12,7 @@ module EveOnline
14
12
  executor_corporation_id: executor_corporation_id,
15
13
  faction_id: faction_id,
16
14
  name: name,
17
- ticker: ticker,
18
- etag: etag
15
+ ticker: ticker
19
16
  }
20
17
  end
21
18
 
@@ -4,8 +4,6 @@ module EveOnline
4
4
  module ESI
5
5
  module Models
6
6
  class Corporation < Base
7
- include ModelWithEtag
8
-
9
7
  def as_json
10
8
  {
11
9
  alliance_id: alliance_id,
@@ -20,8 +18,7 @@ module EveOnline
20
18
  shares: shares,
21
19
  tax_rate: tax_rate,
22
20
  ticker: ticker,
23
- corporation_url: corporation_url,
24
- etag: etag
21
+ corporation_url: corporation_url
25
22
  }
26
23
  end
27
24
 
@@ -4,8 +4,6 @@ module EveOnline
4
4
  module ESI
5
5
  module Models
6
6
  class Star < Base
7
- include ModelWithEtag
8
-
9
7
  def as_json
10
8
  {
11
9
  age: age,
@@ -15,8 +13,7 @@ module EveOnline
15
13
  solar_system_id: solar_system_id,
16
14
  spectral_class: spectral_class,
17
15
  temperature: temperature,
18
- type_id: type_id,
19
- etag: etag
16
+ type_id: type_id
20
17
  }
21
18
  end
22
19
 
@@ -4,15 +4,12 @@ module EveOnline
4
4
  module ESI
5
5
  module Models
6
6
  class Stargate < Base
7
- include ModelWithEtag
8
-
9
7
  def as_json
10
8
  {
11
9
  name: name,
12
10
  stargate_id: stargate_id,
13
11
  system_id: system_id,
14
- type_id: type_id,
15
- etag: etag
12
+ type_id: type_id
16
13
  }
17
14
  end
18
15
 
@@ -16,10 +16,6 @@ module EveOnline
16
16
  end
17
17
  end
18
18
 
19
- def etag
20
- current_etag
21
- end
22
-
23
19
  def scope; end
24
20
 
25
21
  def url
@@ -16,10 +16,6 @@ module EveOnline
16
16
  end
17
17
  end
18
18
 
19
- def etag
20
- current_etag
21
- end
22
-
23
19
  def scope; end
24
20
 
25
21
  def url
@@ -16,10 +16,6 @@ module EveOnline
16
16
  end
17
17
  end
18
18
 
19
- def etag
20
- current_etag
21
- end
22
-
23
19
  def scope; end
24
20
 
25
21
  def url
@@ -16,10 +16,6 @@ module EveOnline
16
16
  end
17
17
  end
18
18
 
19
- def etag
20
- current_etag
21
- end
22
-
23
19
  def scope; end
24
20
 
25
21
  def url
@@ -7,8 +7,6 @@ module EveOnline
7
7
  class UniverseStar < Base
8
8
  extend Forwardable
9
9
 
10
- include ResponseWithEtag
11
-
12
10
  API_ENDPOINT = 'https://esi.evetech.net/v1/universe/stars/%<star_id>s/?datasource=%<datasource>s'
13
11
 
14
12
  attr_reader :id
@@ -21,10 +19,10 @@ module EveOnline
21
19
 
22
20
  def_delegators :model, :as_json, :age, :luminosity, :name, :radius,
23
21
  :solar_system_id, :spectral_class, :temperature,
24
- :type_id, :etag
22
+ :type_id
25
23
 
26
24
  def model
27
- @model ||= Models::Star.new(response_with_etag)
25
+ @model ||= Models::Star.new(response)
28
26
  end
29
27
 
30
28
  def scope; end
@@ -7,8 +7,6 @@ module EveOnline
7
7
  class UniverseStargate < Base
8
8
  extend Forwardable
9
9
 
10
- include ResponseWithEtag
11
-
12
10
  API_ENDPOINT = 'https://esi.evetech.net/v1/universe/stargates/%<stargate_id>s/?datasource=%<datasource>s'
13
11
 
14
12
  attr_reader :id
@@ -20,10 +18,10 @@ module EveOnline
20
18
  end
21
19
 
22
20
  def_delegators :model, :as_json, :name, :stargate_id, :system_id,
23
- :type_id, :destination, :position, :etag
21
+ :type_id, :destination, :position
24
22
 
25
23
  def model
26
- @model ||= Models::Stargate.new(response_with_etag)
24
+ @model ||= Models::Stargate.new(response)
27
25
  end
28
26
 
29
27
  def scope; end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EveOnline
4
+ module Exceptions
5
+ class NotModified < Base
6
+ end
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EveOnline
4
- VERSION = '0.21.0'
4
+ VERSION = '0.22.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eve_online
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Zubkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-25 00:00:00.000000000 Z
11
+ date: 2019-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -252,7 +252,6 @@ files:
252
252
  - lib/eve_online/esi/models/killmail_short.rb
253
253
  - lib/eve_online/esi/models/loyalty_point.rb
254
254
  - lib/eve_online/esi/models/market_history.rb
255
- - lib/eve_online/esi/models/model_with_etag.rb
256
255
  - lib/eve_online/esi/models/moon.rb
257
256
  - lib/eve_online/esi/models/notification.rb
258
257
  - lib/eve_online/esi/models/online.rb
@@ -275,7 +274,6 @@ files:
275
274
  - lib/eve_online/esi/models/system_kill.rb
276
275
  - lib/eve_online/esi/models/type.rb
277
276
  - lib/eve_online/esi/models/wallet_journal_entry.rb
278
- - lib/eve_online/esi/response_with_etag.rb
279
277
  - lib/eve_online/esi/server_status.rb
280
278
  - lib/eve_online/esi/universe_ancestries.rb
281
279
  - lib/eve_online/esi/universe_asteroid_belt.rb
@@ -312,6 +310,7 @@ files:
312
310
  - lib/eve_online/exceptions/forbidden.rb
313
311
  - lib/eve_online/exceptions/internal_server_error.rb
314
312
  - lib/eve_online/exceptions/no_content.rb
313
+ - lib/eve_online/exceptions/not_modified.rb
315
314
  - lib/eve_online/exceptions/resource_not_found.rb
316
315
  - lib/eve_online/exceptions/service_unavailable.rb
317
316
  - lib/eve_online/exceptions/timeout.rb
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module EveOnline
4
- module ESI
5
- module Models
6
- module ModelWithEtag
7
- def etag
8
- options['etag']
9
- end
10
- end
11
- end
12
- end
13
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module EveOnline
4
- module ESI
5
- module ResponseWithEtag
6
- def response_with_etag
7
- @response_with_etag ||= response.merge('etag' => current_etag)
8
- end
9
- end
10
- end
11
- end