eve_online 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_rspec.yml +4 -0
- data/.ruby-version +1 -1
- data/.travis.yml +6 -8
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +7 -7
- data/Gemfile.mutant.lock +4 -4
- data/README.md +37 -33
- data/lib/eve_online.rb +1 -0
- data/lib/eve_online/esi/alliance.rb +2 -2
- data/lib/eve_online/esi/alliance_corporations.rb +2 -2
- data/lib/eve_online/esi/alliance_icon.rb +2 -2
- data/lib/eve_online/esi/alliances.rb +2 -2
- data/lib/eve_online/esi/base.rb +22 -0
- data/lib/eve_online/esi/character.rb +2 -2
- data/lib/eve_online/esi/character_assets.rb +2 -2
- data/lib/eve_online/esi/character_assets_locations.rb +2 -2
- data/lib/eve_online/esi/character_assets_names.rb +2 -2
- data/lib/eve_online/esi/character_attributes.rb +2 -2
- data/lib/eve_online/esi/character_blueprints.rb +2 -2
- data/lib/eve_online/esi/character_bookmark_folders.rb +2 -2
- data/lib/eve_online/esi/character_bookmarks.rb +2 -2
- data/lib/eve_online/esi/character_calendar.rb +4 -2
- data/lib/eve_online/esi/character_clones.rb +2 -2
- data/lib/eve_online/esi/character_fatigue.rb +2 -2
- data/lib/eve_online/esi/character_implants.rb +2 -2
- data/lib/eve_online/esi/character_industry_jobs.rb +2 -2
- data/lib/eve_online/esi/character_killmails_recent.rb +2 -2
- data/lib/eve_online/esi/character_location.rb +2 -2
- data/lib/eve_online/esi/character_loyalty_points.rb +2 -2
- data/lib/eve_online/esi/character_notifications.rb +2 -2
- data/lib/eve_online/esi/character_online.rb +2 -2
- data/lib/eve_online/esi/character_orders.rb +2 -2
- data/lib/eve_online/esi/character_portrait.rb +2 -2
- data/lib/eve_online/esi/character_ship.rb +2 -2
- data/lib/eve_online/esi/character_skill_queue.rb +2 -2
- data/lib/eve_online/esi/character_skills.rb +2 -2
- data/lib/eve_online/esi/character_standings.rb +2 -2
- data/lib/eve_online/esi/character_wallet.rb +2 -2
- data/lib/eve_online/esi/character_wallet_journal.rb +2 -2
- data/lib/eve_online/esi/corporation.rb +2 -2
- data/lib/eve_online/esi/corporation_blueprints.rb +2 -2
- data/lib/eve_online/esi/corporation_industry_jobs.rb +2 -2
- data/lib/eve_online/esi/corporation_killmails_recent.rb +2 -2
- data/lib/eve_online/esi/corporation_orders.rb +2 -2
- data/lib/eve_online/esi/dogma_attribute.rb +2 -2
- data/lib/eve_online/esi/dogma_attributes.rb +2 -2
- data/lib/eve_online/esi/dogma_effect.rb +2 -2
- data/lib/eve_online/esi/dogma_effects.rb +2 -2
- data/lib/eve_online/esi/market_history.rb +2 -2
- data/lib/eve_online/esi/models/bookmark.rb +5 -15
- data/lib/eve_online/esi/models/coordinates.rb +30 -0
- data/lib/eve_online/esi/models/jump_clone.rb +1 -2
- data/lib/eve_online/esi/server_status.rb +2 -2
- data/lib/eve_online/esi/universe_ancestries.rb +2 -2
- data/lib/eve_online/esi/universe_asteroid_belt.rb +2 -2
- data/lib/eve_online/esi/universe_bloodlines.rb +2 -2
- data/lib/eve_online/esi/universe_categories.rb +2 -2
- data/lib/eve_online/esi/universe_category.rb +2 -2
- data/lib/eve_online/esi/universe_constellation.rb +2 -2
- data/lib/eve_online/esi/universe_constellations.rb +2 -2
- data/lib/eve_online/esi/universe_factions.rb +2 -2
- data/lib/eve_online/esi/universe_graphic.rb +2 -2
- data/lib/eve_online/esi/universe_graphics.rb +2 -2
- data/lib/eve_online/esi/universe_group.rb +2 -2
- data/lib/eve_online/esi/universe_groups.rb +2 -2
- data/lib/eve_online/esi/universe_moon.rb +2 -2
- data/lib/eve_online/esi/universe_planet.rb +2 -2
- data/lib/eve_online/esi/universe_races.rb +2 -2
- data/lib/eve_online/esi/universe_region.rb +2 -2
- data/lib/eve_online/esi/universe_regions.rb +2 -2
- data/lib/eve_online/esi/universe_star.rb +2 -2
- data/lib/eve_online/esi/universe_stargate.rb +2 -2
- data/lib/eve_online/esi/universe_station.rb +2 -2
- data/lib/eve_online/esi/universe_structures.rb +2 -2
- data/lib/eve_online/esi/universe_system.rb +2 -2
- data/lib/eve_online/esi/universe_system_jumps.rb +2 -2
- data/lib/eve_online/esi/universe_system_kills.rb +2 -2
- data/lib/eve_online/esi/universe_systems.rb +2 -2
- data/lib/eve_online/esi/universe_type.rb +2 -2
- data/lib/eve_online/esi/universe_types.rb +2 -2
- data/lib/eve_online/esi/war_killmails.rb +2 -2
- data/lib/eve_online/esi/wars.rb +7 -2
- data/lib/eve_online/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f18b7165f625908db58cebbc9ebaa15b026cc5a0841cf443a8749f588112dd
|
4
|
+
data.tar.gz: 5808d20b3e10be75d73b756b4a32574a4f68dcebedb7782752225391e49d1040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f7350038b2d81059ba064e68a8036438716947ba2f51b520bdd244ba8f2635278cf78bad8776205e59f13cf96d4242b66380211d23ef3af2a0bbcccf1129cf4
|
7
|
+
data.tar.gz: 36c7e707c931ebc095cae90a89c4d68ebd16b0f4f7cd1fd4c06d7c37772397f6edd42329cf4a82992bc84e6931fd82ca08600d04882559a773445a034d4d4cef
|
data/.rubocop_rspec.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.1
|
data/.travis.yml
CHANGED
@@ -5,9 +5,8 @@ rvm:
|
|
5
5
|
- 2.3.8
|
6
6
|
- 2.4.5
|
7
7
|
- 2.5.3
|
8
|
-
- 2.6.
|
8
|
+
- 2.6.1
|
9
9
|
- ruby-head
|
10
|
-
- rbx-3
|
11
10
|
|
12
11
|
gemfile:
|
13
12
|
- gemfiles/activesupport_42.gemfile
|
@@ -24,7 +23,7 @@ matrix:
|
|
24
23
|
exclude:
|
25
24
|
- rvm: ruby-head
|
26
25
|
gemfile: gemfiles/activesupport_42.gemfile
|
27
|
-
- rvm: 2.6.
|
26
|
+
- rvm: 2.6.1
|
28
27
|
gemfile: gemfiles/activesupport_42.gemfile
|
29
28
|
- rvm: 2.5.3
|
30
29
|
gemfile: gemfiles/activesupport_42.gemfile
|
@@ -33,19 +32,19 @@ matrix:
|
|
33
32
|
- rvm: 2.4.5
|
34
33
|
gemfile: gemfiles/activesupport_edge.gemfile
|
35
34
|
include:
|
36
|
-
- rvm: jruby-9.2.
|
35
|
+
- rvm: jruby-9.2.6.0
|
37
36
|
gemfile: gemfiles/activesupport_42.gemfile
|
38
37
|
jdk: oraclejdk8
|
39
38
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
40
|
-
- rvm: jruby-9.2.
|
39
|
+
- rvm: jruby-9.2.6.0
|
41
40
|
gemfile: gemfiles/activesupport_50.gemfile
|
42
41
|
jdk: oraclejdk8
|
43
42
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
44
|
-
- rvm: jruby-9.2.
|
43
|
+
- rvm: jruby-9.2.6.0
|
45
44
|
gemfile: gemfiles/activesupport_51.gemfile
|
46
45
|
jdk: oraclejdk8
|
47
46
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
48
|
-
- rvm: jruby-9.2.
|
47
|
+
- rvm: jruby-9.2.6.0
|
49
48
|
gemfile: gemfiles/activesupport_52.gemfile
|
50
49
|
jdk: oraclejdk8
|
51
50
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
@@ -73,7 +72,6 @@ matrix:
|
|
73
72
|
allow_failures:
|
74
73
|
- rvm: ruby-head
|
75
74
|
- rvm: jruby-head
|
76
|
-
- rvm: rbx-3
|
77
75
|
fast_finish: true
|
78
76
|
|
79
77
|
before_script:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.24.0
|
4
|
+
|
5
|
+
* Remove `implants` from `EveOnline::ESI::Models::JumpClone#as_json`
|
6
|
+
* Rename `EveOnline::ESI::Models::JumpClone#implants` to `#implant_ids`
|
7
|
+
* Add `EveOnline::ESI::Models::Coordinates`
|
8
|
+
* Remove `coordinate_x` from `EveOnline::ESI::Models::Bookmark#as_json`
|
9
|
+
* Remove `coordinate_y` from `EveOnline::ESI::Models::Bookmark#as_json`
|
10
|
+
* Remove `coordinate_z` from `EveOnline::ESI::Models::Bookmark#as_json`
|
11
|
+
* Remove `EveOnline::ESI::Models::Bookmark#coordinate_x`
|
12
|
+
* Remove `EveOnline::ESI::Models::Bookmark#coordinate_y`
|
13
|
+
* Remove `EveOnline::ESI::Models::Bookmark#coordinate_z`
|
14
|
+
* Add `EveOnline::ESI::Models::Bookmark#coordinates`
|
15
|
+
* Drop Rubinius support
|
16
|
+
* Add ruby 2.6.0 write_timeout and write_timeout= support (#201)
|
17
|
+
|
3
18
|
## v0.23.0
|
4
19
|
|
5
20
|
* Sync with new ESI API
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eve_online (0.
|
4
|
+
eve_online (0.24.0)
|
5
5
|
activesupport (>= 4.2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -12,7 +12,7 @@ GEM
|
|
12
12
|
i18n (>= 0.7, < 2)
|
13
13
|
minitest (~> 5.1)
|
14
14
|
tzinfo (~> 1.1)
|
15
|
-
addressable (2.
|
15
|
+
addressable (2.6.0)
|
16
16
|
public_suffix (>= 2.0.2, < 4.0)
|
17
17
|
ast (2.4.0)
|
18
18
|
awesome_print (1.8.0)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
diff-lcs (1.3)
|
24
24
|
docile (1.3.1)
|
25
25
|
hashdiff (0.3.8)
|
26
|
-
i18n (1.5.
|
26
|
+
i18n (1.5.3)
|
27
27
|
concurrent-ruby (~> 1.0)
|
28
28
|
jaro_winkler (1.5.2)
|
29
29
|
json (2.1.0)
|
@@ -40,8 +40,8 @@ GEM
|
|
40
40
|
tomlrb
|
41
41
|
nokogiri (1.10.1)
|
42
42
|
mini_portile2 (~> 2.4.0)
|
43
|
-
parallel (1.
|
44
|
-
parser (2.
|
43
|
+
parallel (1.13.0)
|
44
|
+
parser (2.6.0.0)
|
45
45
|
ast (~> 2.4.0)
|
46
46
|
powerpack (0.1.2)
|
47
47
|
pry (0.12.2)
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
67
67
|
rspec-support (~> 3.8.0)
|
68
68
|
rspec-support (3.8.0)
|
69
|
-
rubocop (0.
|
69
|
+
rubocop (0.64.0)
|
70
70
|
jaro_winkler (~> 1.5.1)
|
71
71
|
parallel (~> 1.10)
|
72
72
|
parser (>= 2.5, != 2.5.1.1)
|
@@ -74,7 +74,7 @@ GEM
|
|
74
74
|
rainbow (>= 2.2.2, < 4.0)
|
75
75
|
ruby-progressbar (~> 1.7)
|
76
76
|
unicode-display_width (~> 1.4.0)
|
77
|
-
rubocop-rspec (1.
|
77
|
+
rubocop-rspec (1.32.0)
|
78
78
|
rubocop (>= 0.60.0)
|
79
79
|
ruby-progressbar (1.10.0)
|
80
80
|
safe_yaml (1.0.4)
|
data/Gemfile.mutant.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eve_online (0.
|
4
|
+
eve_online (0.24.0)
|
5
5
|
activesupport (>= 4.2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -16,9 +16,9 @@ GEM
|
|
16
16
|
adamantium (0.2.0)
|
17
17
|
ice_nine (~> 0.11.0)
|
18
18
|
memoizable (~> 0.4.0)
|
19
|
-
addressable (2.
|
19
|
+
addressable (2.6.0)
|
20
20
|
public_suffix (>= 2.0.2, < 4.0)
|
21
|
-
anima (0.3.
|
21
|
+
anima (0.3.1)
|
22
22
|
abstract_type (~> 0.0.7)
|
23
23
|
adamantium (~> 0.2)
|
24
24
|
equalizer (~> 0.0.11)
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
docile (1.3.1)
|
34
34
|
equalizer (0.0.11)
|
35
35
|
hashdiff (0.3.8)
|
36
|
-
i18n (1.5.
|
36
|
+
i18n (1.5.3)
|
37
37
|
concurrent-ruby (~> 1.0)
|
38
38
|
ice_nine (0.11.2)
|
39
39
|
json (2.1.0)
|
data/README.md
CHANGED
@@ -51,9 +51,8 @@ gem install eve_online
|
|
51
51
|
* MRI 2.5
|
52
52
|
* MRI 2.6
|
53
53
|
* MRI (head)
|
54
|
-
* JRuby 9.2.
|
54
|
+
* JRuby 9.2.6.0
|
55
55
|
* JRuby (head)
|
56
|
-
* Rubinuis (latest)
|
57
56
|
|
58
57
|
## Supported rails versions
|
59
58
|
|
@@ -259,9 +258,6 @@ character_bookmarks.bookmarks.size # => 20
|
|
259
258
|
bookmark = character_bookmarks.bookmarks.first
|
260
259
|
|
261
260
|
bookmark.as_json # => {:bookmark_id=>4,
|
262
|
-
# :coordinate_x=>-144951231521.81625,
|
263
|
-
# :coordinate_y=>164030047870.25558,
|
264
|
-
# :coordinate_z=>211467631848.1311,
|
265
261
|
# :created=>Mon, 09 Jul 2012 22:38:31 UTC +00:00,
|
266
262
|
# :creator_id=>2112625428,
|
267
263
|
# :folder_id=>5,
|
@@ -272,9 +268,6 @@ bookmark.as_json # => {:bookmark_id=>4,
|
|
272
268
|
# :notes=>"This is a stargate"}
|
273
269
|
|
274
270
|
bookmark.bookmark_id # => 4
|
275
|
-
bookmark.coordinate_x # => -144951231521.81625
|
276
|
-
bookmark.coordinate_y # => 164030047870.25558
|
277
|
-
bookmark.coordinate_z # => 211467631848.1311
|
278
271
|
bookmark.created # => Mon, 09 Jul 2012 22:38:31 UTC +00:00
|
279
272
|
bookmark.creator_id # => 2112625428
|
280
273
|
bookmark.folder_id # => 5
|
@@ -284,6 +277,10 @@ bookmark.label # => "Stargate"
|
|
284
277
|
bookmark.location_id # => 30003430
|
285
278
|
bookmark.notes # => "This is a stargate"
|
286
279
|
|
280
|
+
bookmark.coordinates.as_json # => {:x=>-144951231521.81625,
|
281
|
+
# :y=>164030047870.25558,
|
282
|
+
# :z=>211467631848.1311}
|
283
|
+
|
287
284
|
# TODO: character_bookmarks.etag
|
288
285
|
```
|
289
286
|
|
@@ -566,18 +563,18 @@ character_clones.jump_clones.size # => 2
|
|
566
563
|
|
567
564
|
jump_clone = character_clones.jump_clones.first
|
568
565
|
|
569
|
-
jump_clone.as_json # => {:
|
570
|
-
# :jump_clone_id=>22357400,
|
566
|
+
jump_clone.as_json # => {:jump_clone_id=>22357400,
|
571
567
|
# :location_id=>61000032,
|
572
568
|
# :location_type=>"station",
|
573
569
|
# :name=>nil}
|
574
570
|
|
575
|
-
jump_clone.implants # => [22118]
|
576
571
|
jump_clone.jump_clone_id # => 22357400
|
577
572
|
jump_clone.location_id # => 61000032
|
578
573
|
jump_clone.location_type # => "station"
|
579
574
|
jump_clone.name # => nil
|
580
575
|
|
576
|
+
jump_clone.implant_ids # => [22118]
|
577
|
+
|
581
578
|
character_clones.last_clone_jump_date # => Fri, 27 Jul 2012 14:50:11 UTC +00:00
|
582
579
|
|
583
580
|
character_clones.last_station_change_date # => Tue, 30 Jun 2015 21:51:13 UTC +00:00
|
@@ -812,7 +809,7 @@ dogma_attribute.published # => nil
|
|
812
809
|
dogma_attribute.stackable # => true
|
813
810
|
dogma_attribute.unit_id # => nil
|
814
811
|
|
815
|
-
#
|
812
|
+
dogma_attribute.etag # => "acc1e563574a55f79ebe4a2a99845dd6c28f4e412e11fd084b8485fd"
|
816
813
|
```
|
817
814
|
|
818
815
|
#### Get dynamic item information
|
@@ -824,11 +821,11 @@ dogma_effects = EveOnline::ESI::DogmaEffects.new
|
|
824
821
|
|
825
822
|
dogma_effects.scope # => nil
|
826
823
|
|
827
|
-
dogma_effects.
|
824
|
+
dogma_effects.effect_ids.size # => 4166
|
828
825
|
|
829
|
-
dogma_effects.
|
826
|
+
dogma_effects.effect_ids.first # => 4
|
830
827
|
|
831
|
-
#
|
828
|
+
dogma_effects.etag # => "5c9218218aca123ef8c106f6607bfe8e6e086d2fc2b972bbd8ff03d2"
|
832
829
|
```
|
833
830
|
|
834
831
|
#### Get effect information
|
@@ -900,7 +897,7 @@ modifier.modified_attribute_id # => 73
|
|
900
897
|
modifier.modifying_attribute_id # => 2458
|
901
898
|
modifier.operator # => 6
|
902
899
|
|
903
|
-
#
|
900
|
+
dogma_effect.etag # => "acc1e563574a55f79ebe4a2a99845dd6c28f4e412e11fd084b8485fd"
|
904
901
|
```
|
905
902
|
|
906
903
|
### Faction Warfare
|
@@ -1206,7 +1203,7 @@ character_online.last_logout # => Sun, 15 Jan 2017 11:31:22 UTC +00:00
|
|
1206
1203
|
character_online.logins # => 370
|
1207
1204
|
character_online.online # => false
|
1208
1205
|
|
1209
|
-
#
|
1206
|
+
character_online.etag # => "43c82cdefedc4275da30d7731200df96b905dc94b8486d55bedb5fe6"
|
1210
1207
|
```
|
1211
1208
|
|
1212
1209
|
#### Get current ship
|
@@ -1368,25 +1365,25 @@ market_history.scope # => nil
|
|
1368
1365
|
|
1369
1366
|
statistics = market_history.history
|
1370
1367
|
|
1371
|
-
statistics.size # =>
|
1368
|
+
statistics.size # => 412
|
1372
1369
|
|
1373
1370
|
stats_today = statistics.last
|
1374
1371
|
|
1375
|
-
stats_today.as_json # => {:average=>
|
1376
|
-
# :date=>
|
1377
|
-
# :highest=>
|
1378
|
-
# :lowest=>
|
1379
|
-
# :order_count=>
|
1380
|
-
# :volume=>
|
1372
|
+
stats_today.as_json # => {:average=>602326589.84,
|
1373
|
+
# :date=>Wed, 16 Jan 2019 00:00:00 UTC +00:00,
|
1374
|
+
# :highest=>620169950.0,
|
1375
|
+
# :lowest=>579060022.71,
|
1376
|
+
# :order_count=>44,
|
1377
|
+
# :volume=>44}
|
1381
1378
|
|
1382
|
-
stats_today.average # =>
|
1383
|
-
stats_today.date # =>
|
1384
|
-
stats_today.highest # =>
|
1385
|
-
stats_today.lowest # =>
|
1386
|
-
stats_today.order_count # =>
|
1387
|
-
stats_today.volume # =>
|
1379
|
+
stats_today.average # => 602326589.84
|
1380
|
+
stats_today.date # => Wed, 16 Jan 2019 00:00:00 UTC +00:00
|
1381
|
+
stats_today.highest # => 620169950.0
|
1382
|
+
stats_today.lowest # => 579060022.71
|
1383
|
+
stats_today.order_count # => 44
|
1384
|
+
stats_today.volume # => 44
|
1388
1385
|
|
1389
|
-
#
|
1386
|
+
market_history.etag # => "01636947a53db63a0369aab78bbc98bae94a49cd6aa3950c29d588ae"
|
1390
1387
|
```
|
1391
1388
|
|
1392
1389
|
#### List orders in a region
|
@@ -2498,12 +2495,14 @@ http = Net::HTTP.new
|
|
2498
2495
|
|
2499
2496
|
http.read_timeout = 60
|
2500
2497
|
http.open_timeout = 60
|
2498
|
+
# if ruby >= 2.6.0
|
2499
|
+
http.write_timeout = 60
|
2501
2500
|
```
|
2502
2501
|
|
2503
|
-
You can configure default timeouts with adding `read_timeout:` and `open_timeout:` to default hash with options:
|
2502
|
+
You can configure default timeouts with adding `read_timeout:` and `open_timeout:` (and `write_timeout` for ruby >= 2.6.0) to default hash with options:
|
2504
2503
|
|
2505
2504
|
```ruby
|
2506
|
-
options = { read_timeout: 120, open_timeout: 120 } # 120 seconds
|
2505
|
+
options = { read_timeout: 120, open_timeout: 120, write_timeout: 120 } # 120 seconds
|
2507
2506
|
|
2508
2507
|
races = EveOnline::ESI::UniverseRaces.new(options)
|
2509
2508
|
```
|
@@ -2520,6 +2519,11 @@ races.open_timeout # => 120
|
|
2520
2519
|
races.read_timeout # => 60
|
2521
2520
|
races.read_timeout = 120
|
2522
2521
|
races.read_timeout # => 120
|
2522
|
+
|
2523
|
+
# if ruby >= 2.6.0
|
2524
|
+
races.write_timeout # => 60
|
2525
|
+
races.write_timeout = 120
|
2526
|
+
races.write_timeout # => 120
|
2523
2527
|
```
|
2524
2528
|
|
2525
2529
|
## Datasource
|
data/lib/eve_online.rb
CHANGED
@@ -110,6 +110,7 @@ require 'eve_online/esi/war_killmails'
|
|
110
110
|
require 'eve_online/esi/models/base'
|
111
111
|
|
112
112
|
require 'eve_online/esi/models/position'
|
113
|
+
require 'eve_online/esi/models/coordinates'
|
113
114
|
require 'eve_online/esi/models/loyalty_point'
|
114
115
|
require 'eve_online/esi/models/skill_queue_entry'
|
115
116
|
require 'eve_online/esi/models/skill'
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class Alliance < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
|
10
|
+
API_PATH = '/v3/alliances/%<alliance_id>s/?datasource=%<datasource>s'
|
11
11
|
|
12
12
|
attr_reader :alliance_id
|
13
13
|
|
@@ -28,7 +28,7 @@ module EveOnline
|
|
28
28
|
def scope; end
|
29
29
|
|
30
30
|
def url
|
31
|
-
format(
|
31
|
+
format("#{ API_HOST }#{ API_PATH }", alliance_id: alliance_id, datasource: datasource)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class AllianceCorporations < Base
|
6
|
-
|
6
|
+
API_PATH = '/v1/alliances/%<alliance_id>s/corporations/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :alliance_id
|
9
9
|
|
@@ -20,7 +20,7 @@ module EveOnline
|
|
20
20
|
def scope; end
|
21
21
|
|
22
22
|
def url
|
23
|
-
format(
|
23
|
+
format("#{ API_HOST }#{ API_PATH }", alliance_id: alliance_id, datasource: datasource)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class AllianceIcon < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
|
10
|
+
API_PATH = '/v1/alliances/%<alliance_id>s/icons/?datasource=%<datasource>s'
|
11
11
|
|
12
12
|
attr_reader :alliance_id
|
13
13
|
|
@@ -26,7 +26,7 @@ module EveOnline
|
|
26
26
|
def scope; end
|
27
27
|
|
28
28
|
def url
|
29
|
-
format(
|
29
|
+
format("#{ API_HOST }#{ API_PATH }", alliance_id: alliance_id, datasource: datasource)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class Alliances < Base
|
6
|
-
|
6
|
+
API_PATH = '/v1/alliances/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
def alliance_ids
|
9
9
|
response
|
@@ -12,7 +12,7 @@ module EveOnline
|
|
12
12
|
def scope; end
|
13
13
|
|
14
14
|
def url
|
15
|
-
format(
|
15
|
+
format("#{ API_HOST }#{ API_PATH }", datasource: datasource)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/eve_online/esi/base.rb
CHANGED
@@ -8,14 +8,23 @@ require 'active_support/time'
|
|
8
8
|
module EveOnline
|
9
9
|
module ESI
|
10
10
|
class Base
|
11
|
+
API_HOST = 'https://esi.evetech.net'
|
12
|
+
|
11
13
|
attr_reader :token, :parser, :_read_timeout, :_open_timeout, :_etag,
|
12
14
|
:datasource, :language
|
13
15
|
|
16
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
|
17
|
+
attr_reader :_write_timeout
|
18
|
+
end
|
19
|
+
|
14
20
|
def initialize(options = {})
|
15
21
|
@token = options.fetch(:token, nil)
|
16
22
|
@parser = options.fetch(:parser, JSON)
|
17
23
|
@_read_timeout = options.fetch(:read_timeout, 60)
|
18
24
|
@_open_timeout = options.fetch(:open_timeout, 60)
|
25
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
|
26
|
+
@_write_timeout = options.fetch(:write_timeout, 60)
|
27
|
+
end
|
19
28
|
@_etag = options.fetch(:etag, nil)
|
20
29
|
@datasource = options.fetch(:datasource, 'tranquility')
|
21
30
|
@language = options.fetch(:language, 'en-us')
|
@@ -53,6 +62,16 @@ module EveOnline
|
|
53
62
|
client.open_timeout = value
|
54
63
|
end
|
55
64
|
|
65
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
|
66
|
+
def write_timeout
|
67
|
+
client.write_timeout
|
68
|
+
end
|
69
|
+
|
70
|
+
def write_timeout=(value)
|
71
|
+
client.write_timeout = value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
56
75
|
def etag=(value)
|
57
76
|
@_etag = value
|
58
77
|
end
|
@@ -72,6 +91,9 @@ module EveOnline
|
|
72
91
|
http = Net::HTTP.new(uri.host, uri.port)
|
73
92
|
http.read_timeout = _read_timeout
|
74
93
|
http.open_timeout = _open_timeout
|
94
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
|
95
|
+
http.write_timeout = _write_timeout
|
96
|
+
end
|
75
97
|
http.use_ssl = true
|
76
98
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
77
99
|
# http.set_debug_output($stdout)
|