eve_online 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.rubocop_general.yml +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +10 -13
- data/CHANGELOG.md +12 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +27 -18
- data/Gemfile.mutant.lock +12 -12
- data/README.md +116 -23
- data/eve_online.gemspec +1 -1
- data/lib/eve_online.rb +3 -0
- data/lib/eve_online/esi/base.rb +6 -2
- data/lib/eve_online/esi/character_assets_locations.rb +4 -0
- data/lib/eve_online/esi/character_assets_names.rb +4 -0
- data/lib/eve_online/esi/corporation_assets.rb +41 -0
- data/lib/eve_online/esi/corporation_assets_locations.rb +53 -0
- data/lib/eve_online/esi/corporation_assets_names.rb +53 -0
- data/lib/eve_online/esi/corporation_blueprints.rb +4 -0
- data/lib/eve_online/esi/corporation_industry_jobs.rb +4 -0
- data/lib/eve_online/esi/corporation_killmails_recent.rb +4 -0
- data/lib/eve_online/esi/corporation_orders.rb +3 -4
- data/lib/eve_online/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cf2ec48048ec528132dde02a38264dd5cd4016a9f922f4dc26bcf7d1f4f73ba
|
|
4
|
+
data.tar.gz: 9a9e616de22668ed2b4114a5531b24633edfc96987e9d0dd349bf8a19db59c8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9c16ff0283e5db41e4c56f36d0c5e5627e3af6c24bd86e87f397e2d77ac58057c44d84626aac9984635b1843b6720bbde8bd0064ec0fe0994824e5a31fdaa82
|
|
7
|
+
data.tar.gz: a357b8bbde81d5ef77340206fa301a4c970733437903b8955fc9d4f484479e8730f180f7ba8afe03fd6abe75e0ab20d098eaf72517fb86019869ec1b82594eeb
|
data/.rubocop.yml
CHANGED
data/.rubocop_general.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.3
|
data/.travis.yml
CHANGED
|
@@ -2,10 +2,9 @@ language: ruby
|
|
|
2
2
|
sudo: false
|
|
3
3
|
cache: bundler
|
|
4
4
|
rvm:
|
|
5
|
-
- 2.
|
|
6
|
-
- 2.
|
|
7
|
-
- 2.
|
|
8
|
-
- 2.6.1
|
|
5
|
+
- 2.4.6
|
|
6
|
+
- 2.5.5
|
|
7
|
+
- 2.6.3
|
|
9
8
|
- ruby-head
|
|
10
9
|
|
|
11
10
|
gemfile:
|
|
@@ -23,28 +22,26 @@ matrix:
|
|
|
23
22
|
exclude:
|
|
24
23
|
- rvm: ruby-head
|
|
25
24
|
gemfile: gemfiles/activesupport_42.gemfile
|
|
26
|
-
- rvm: 2.6.
|
|
25
|
+
- rvm: 2.6.3
|
|
27
26
|
gemfile: gemfiles/activesupport_42.gemfile
|
|
28
|
-
- rvm: 2.5.
|
|
27
|
+
- rvm: 2.5.5
|
|
29
28
|
gemfile: gemfiles/activesupport_42.gemfile
|
|
30
|
-
- rvm: 2.
|
|
31
|
-
gemfile: gemfiles/activesupport_edge.gemfile
|
|
32
|
-
- rvm: 2.4.5
|
|
29
|
+
- rvm: 2.4.6
|
|
33
30
|
gemfile: gemfiles/activesupport_edge.gemfile
|
|
34
31
|
include:
|
|
35
|
-
- rvm: jruby-9.2.
|
|
32
|
+
- rvm: jruby-9.2.7.0
|
|
36
33
|
gemfile: gemfiles/activesupport_42.gemfile
|
|
37
34
|
jdk: oraclejdk8
|
|
38
35
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
|
39
|
-
- rvm: jruby-9.2.
|
|
36
|
+
- rvm: jruby-9.2.7.0
|
|
40
37
|
gemfile: gemfiles/activesupport_50.gemfile
|
|
41
38
|
jdk: oraclejdk8
|
|
42
39
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
|
43
|
-
- rvm: jruby-9.2.
|
|
40
|
+
- rvm: jruby-9.2.7.0
|
|
44
41
|
gemfile: gemfiles/activesupport_51.gemfile
|
|
45
42
|
jdk: oraclejdk8
|
|
46
43
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
|
47
|
-
- rvm: jruby-9.2.
|
|
44
|
+
- rvm: jruby-9.2.7.0
|
|
48
45
|
gemfile: gemfiles/activesupport_52.gemfile
|
|
49
46
|
jdk: oraclejdk8
|
|
50
47
|
env: JRUBY_OPTS='--debug' # get more accurate coverage data
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.25.0
|
|
4
|
+
|
|
5
|
+
* `EveOnline::ESI::CharacterAssetsLocations#etag` raise `NotImplementedError` from now
|
|
6
|
+
* `EveOnline::ESI::CharacterAssetsNames#etag` raise `NotImplementedError` from now
|
|
7
|
+
* Add corporation roles support
|
|
8
|
+
* Add `EveOnline::ESI::CorporationAssets`
|
|
9
|
+
* Add `EveOnline::ESI::CorporationAssetsLocations`
|
|
10
|
+
* Add `EveOnline::ESI::CorporationAssetsNames`
|
|
11
|
+
* Drop ruby 2.3 support
|
|
12
|
+
* `EveOnline::ESI::Base#not_modified?` handle timeout exceptions
|
|
13
|
+
* Rescue `Net::WriteTimeout` too
|
|
14
|
+
|
|
3
15
|
## v0.24.0
|
|
4
16
|
|
|
5
17
|
* Remove `implants` from `EveOnline::ESI::Models::JumpClone#as_json`
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
eve_online (0.
|
|
4
|
+
eve_online (0.25.0)
|
|
5
5
|
activesupport (>= 4.2.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (5.2.
|
|
10
|
+
activesupport (5.2.3)
|
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
12
|
i18n (>= 0.7, < 2)
|
|
13
13
|
minitest (~> 5.1)
|
|
@@ -17,16 +17,20 @@ GEM
|
|
|
17
17
|
ast (2.4.0)
|
|
18
18
|
awesome_print (1.8.0)
|
|
19
19
|
coderay (1.1.2)
|
|
20
|
-
|
|
20
|
+
colorize (0.8.1)
|
|
21
|
+
concurrent-ruby (1.1.5)
|
|
21
22
|
crack (0.4.3)
|
|
22
23
|
safe_yaml (~> 1.0.0)
|
|
23
24
|
diff-lcs (1.3)
|
|
24
25
|
docile (1.3.1)
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
fasterer (0.5.1)
|
|
27
|
+
colorize (~> 0.7)
|
|
28
|
+
ruby_parser (>= 3.13.0)
|
|
29
|
+
hashdiff (0.3.9)
|
|
30
|
+
i18n (1.6.0)
|
|
27
31
|
concurrent-ruby (~> 1.0)
|
|
28
32
|
jaro_winkler (1.5.2)
|
|
29
|
-
json (2.
|
|
33
|
+
json (2.2.0)
|
|
30
34
|
kramdown (1.17.0)
|
|
31
35
|
mdl (0.5.0)
|
|
32
36
|
kramdown (~> 1.12, >= 1.12.0)
|
|
@@ -38,12 +42,11 @@ GEM
|
|
|
38
42
|
mixlib-cli (1.7.0)
|
|
39
43
|
mixlib-config (2.2.18)
|
|
40
44
|
tomlrb
|
|
41
|
-
nokogiri (1.10.
|
|
45
|
+
nokogiri (1.10.3)
|
|
42
46
|
mini_portile2 (~> 2.4.0)
|
|
43
|
-
parallel (1.
|
|
44
|
-
parser (2.6.
|
|
47
|
+
parallel (1.17.0)
|
|
48
|
+
parser (2.6.3.0)
|
|
45
49
|
ast (~> 2.4.0)
|
|
46
|
-
powerpack (0.1.2)
|
|
47
50
|
pry (0.12.2)
|
|
48
51
|
coderay (~> 1.1.0)
|
|
49
52
|
method_source (~> 0.9.0)
|
|
@@ -56,28 +59,32 @@ GEM
|
|
|
56
59
|
rspec-mocks (~> 3.8.0)
|
|
57
60
|
rspec-core (3.8.0)
|
|
58
61
|
rspec-support (~> 3.8.0)
|
|
59
|
-
rspec-expectations (3.8.
|
|
62
|
+
rspec-expectations (3.8.3)
|
|
60
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
61
64
|
rspec-support (~> 3.8.0)
|
|
62
|
-
rspec-its (1.
|
|
65
|
+
rspec-its (1.3.0)
|
|
63
66
|
rspec-core (>= 3.0.0)
|
|
64
67
|
rspec-expectations (>= 3.0.0)
|
|
65
68
|
rspec-mocks (3.8.0)
|
|
66
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
67
70
|
rspec-support (~> 3.8.0)
|
|
68
71
|
rspec-support (3.8.0)
|
|
69
|
-
rubocop (0.
|
|
72
|
+
rubocop (0.68.1)
|
|
70
73
|
jaro_winkler (~> 1.5.1)
|
|
71
74
|
parallel (~> 1.10)
|
|
72
75
|
parser (>= 2.5, != 2.5.1.1)
|
|
73
|
-
powerpack (~> 0.1)
|
|
74
76
|
rainbow (>= 2.2.2, < 4.0)
|
|
75
77
|
ruby-progressbar (~> 1.7)
|
|
76
|
-
unicode-display_width (
|
|
78
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
|
79
|
+
rubocop-performance (1.2.0)
|
|
80
|
+
rubocop (>= 0.68.0)
|
|
77
81
|
rubocop-rspec (1.32.0)
|
|
78
82
|
rubocop (>= 0.60.0)
|
|
79
83
|
ruby-progressbar (1.10.0)
|
|
80
|
-
|
|
84
|
+
ruby_parser (3.13.1)
|
|
85
|
+
sexp_processor (~> 4.9)
|
|
86
|
+
safe_yaml (1.0.5)
|
|
87
|
+
sexp_processor (4.12.0)
|
|
81
88
|
simplecov (0.16.1)
|
|
82
89
|
docile (~> 1.1)
|
|
83
90
|
json (>= 1.8, < 3)
|
|
@@ -87,7 +94,7 @@ GEM
|
|
|
87
94
|
tomlrb (1.2.8)
|
|
88
95
|
tzinfo (1.2.5)
|
|
89
96
|
thread_safe (~> 0.1)
|
|
90
|
-
unicode-display_width (1.
|
|
97
|
+
unicode-display_width (1.5.0)
|
|
91
98
|
vcr (4.0.0)
|
|
92
99
|
webmock (3.5.1)
|
|
93
100
|
addressable (>= 2.3.6)
|
|
@@ -101,6 +108,7 @@ DEPENDENCIES
|
|
|
101
108
|
awesome_print
|
|
102
109
|
bundler
|
|
103
110
|
eve_online!
|
|
111
|
+
fasterer
|
|
104
112
|
mdl
|
|
105
113
|
nokogiri
|
|
106
114
|
pry
|
|
@@ -108,10 +116,11 @@ DEPENDENCIES
|
|
|
108
116
|
rspec
|
|
109
117
|
rspec-its
|
|
110
118
|
rubocop
|
|
119
|
+
rubocop-performance
|
|
111
120
|
rubocop-rspec
|
|
112
121
|
simplecov
|
|
113
122
|
vcr
|
|
114
123
|
webmock
|
|
115
124
|
|
|
116
125
|
BUNDLED WITH
|
|
117
|
-
|
|
126
|
+
2.0.1
|
data/Gemfile.mutant.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
eve_online (0.
|
|
4
|
+
eve_online (0.25.0)
|
|
5
5
|
activesupport (>= 4.2.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
10
|
abstract_type (0.0.7)
|
|
11
|
-
activesupport (5.2.
|
|
11
|
+
activesupport (5.2.3)
|
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
13
13
|
i18n (>= 0.7, < 2)
|
|
14
14
|
minitest (~> 5.1)
|
|
@@ -26,17 +26,17 @@ GEM
|
|
|
26
26
|
concord (0.1.5)
|
|
27
27
|
adamantium (~> 0.2.0)
|
|
28
28
|
equalizer (~> 0.0.9)
|
|
29
|
-
concurrent-ruby (1.1.
|
|
29
|
+
concurrent-ruby (1.1.5)
|
|
30
30
|
crack (0.4.3)
|
|
31
31
|
safe_yaml (~> 1.0.0)
|
|
32
32
|
diff-lcs (1.3)
|
|
33
33
|
docile (1.3.1)
|
|
34
34
|
equalizer (0.0.11)
|
|
35
|
-
hashdiff (0.3.
|
|
36
|
-
i18n (1.
|
|
35
|
+
hashdiff (0.3.9)
|
|
36
|
+
i18n (1.6.0)
|
|
37
37
|
concurrent-ruby (~> 1.0)
|
|
38
38
|
ice_nine (0.11.2)
|
|
39
|
-
json (2.
|
|
39
|
+
json (2.2.0)
|
|
40
40
|
kramdown (1.17.0)
|
|
41
41
|
mdl (0.5.0)
|
|
42
42
|
kramdown (~> 1.12, >= 1.12.0)
|
|
@@ -76,31 +76,31 @@ GEM
|
|
|
76
76
|
mutant-rspec (0.8.24)
|
|
77
77
|
mutant (~> 0.8.24)
|
|
78
78
|
rspec-core (>= 3.4.0, < 4.0.0)
|
|
79
|
-
nokogiri (1.10.
|
|
79
|
+
nokogiri (1.10.3)
|
|
80
80
|
mini_portile2 (~> 2.4.0)
|
|
81
81
|
parser (2.5.3.0)
|
|
82
82
|
ast (~> 2.4.0)
|
|
83
83
|
procto (0.0.3)
|
|
84
84
|
public_suffix (3.0.3)
|
|
85
85
|
rake (12.3.2)
|
|
86
|
-
regexp_parser (1.
|
|
86
|
+
regexp_parser (1.4.0)
|
|
87
87
|
rspec (3.8.0)
|
|
88
88
|
rspec-core (~> 3.8.0)
|
|
89
89
|
rspec-expectations (~> 3.8.0)
|
|
90
90
|
rspec-mocks (~> 3.8.0)
|
|
91
91
|
rspec-core (3.8.0)
|
|
92
92
|
rspec-support (~> 3.8.0)
|
|
93
|
-
rspec-expectations (3.8.
|
|
93
|
+
rspec-expectations (3.8.3)
|
|
94
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
95
|
rspec-support (~> 3.8.0)
|
|
96
|
-
rspec-its (1.
|
|
96
|
+
rspec-its (1.3.0)
|
|
97
97
|
rspec-core (>= 3.0.0)
|
|
98
98
|
rspec-expectations (>= 3.0.0)
|
|
99
99
|
rspec-mocks (3.8.0)
|
|
100
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
101
101
|
rspec-support (~> 3.8.0)
|
|
102
102
|
rspec-support (3.8.0)
|
|
103
|
-
safe_yaml (1.0.
|
|
103
|
+
safe_yaml (1.0.5)
|
|
104
104
|
simplecov (0.16.1)
|
|
105
105
|
docile (~> 1.1)
|
|
106
106
|
json (>= 1.8, < 3)
|
|
@@ -142,4 +142,4 @@ DEPENDENCIES
|
|
|
142
142
|
webmock
|
|
143
143
|
|
|
144
144
|
BUNDLED WITH
|
|
145
|
-
|
|
145
|
+
2.0.1
|
data/README.md
CHANGED
|
@@ -46,12 +46,11 @@ gem install eve_online
|
|
|
46
46
|
|
|
47
47
|
## Supported ruby versions
|
|
48
48
|
|
|
49
|
-
* MRI 2.3
|
|
50
49
|
* MRI 2.4
|
|
51
50
|
* MRI 2.5
|
|
52
51
|
* MRI 2.6
|
|
53
52
|
* MRI (head)
|
|
54
|
-
* JRuby 9.2.
|
|
53
|
+
* JRuby 9.2.7.0
|
|
55
54
|
* JRuby (head)
|
|
56
55
|
|
|
57
56
|
## Supported rails versions
|
|
@@ -147,7 +146,7 @@ alliance_icon.etag # => "e3f6a76b4a1287f54966c6253f8f5d6ac6460bc43d47570331b43e0
|
|
|
147
146
|
#### Get character assets
|
|
148
147
|
|
|
149
148
|
```ruby
|
|
150
|
-
options = { token: 'token123', character_id:
|
|
149
|
+
options = { token: 'token123', character_id: 90_729_314, page: 1 }
|
|
151
150
|
|
|
152
151
|
character_assets = EveOnline::ESI::CharacterAssets.new(options)
|
|
153
152
|
|
|
@@ -179,13 +178,13 @@ asset.location_type # => "other"
|
|
|
179
178
|
asset.quantity # => 1
|
|
180
179
|
asset.type_id # => 1010
|
|
181
180
|
|
|
182
|
-
#
|
|
181
|
+
character_assets.etag # => "29da11b30974e55cd440a879199a629a8492a4c0a49894a2cd22f90b"
|
|
183
182
|
```
|
|
184
183
|
|
|
185
184
|
#### Get character asset locations
|
|
186
185
|
|
|
187
186
|
```ruby
|
|
188
|
-
options = { token: 'token123', character_id:
|
|
187
|
+
options = { token: 'token123', character_id: 1_337_512_245, item_ids: [1_001_215_602_246] }
|
|
189
188
|
|
|
190
189
|
character_assets_locations = EveOnline::ESI::CharacterAssetsLocations.new(options)
|
|
191
190
|
|
|
@@ -207,13 +206,13 @@ asset_location.position.x # => -928621543221.3319
|
|
|
207
206
|
asset_location.position.y # => 297645715142.40234
|
|
208
207
|
asset_location.position.z # => -971212198300.4812
|
|
209
208
|
|
|
210
|
-
#
|
|
209
|
+
character_assets_locations.etag # => NotImplementedError
|
|
211
210
|
```
|
|
212
211
|
|
|
213
212
|
#### Get character asset names
|
|
214
213
|
|
|
215
214
|
```ruby
|
|
216
|
-
options = { token: 'token123', character_id:
|
|
215
|
+
options = { token: 'token123', character_id: 1_337_512_245, item_ids: [1_001_215_602_246] }
|
|
217
216
|
|
|
218
217
|
character_assets_names = EveOnline::ESI::CharacterAssetsNames.new(options)
|
|
219
218
|
|
|
@@ -221,29 +220,117 @@ character_assets_names.scope # => "esi-assets.read_assets.v1"
|
|
|
221
220
|
|
|
222
221
|
character_assets_names.assets_names.size # => 1
|
|
223
222
|
|
|
224
|
-
|
|
223
|
+
asset_name = character_assets_names.assets_names.first
|
|
225
224
|
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
asset_name.as_json # => {:item_id=>1001215602246,
|
|
226
|
+
# :name=>"HOLE"}
|
|
228
227
|
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
asset_name.item_id # => 1001215602246
|
|
229
|
+
asset_name.name # => "HOLE"
|
|
231
230
|
|
|
232
|
-
#
|
|
231
|
+
character_assets_names.etag # => NotImplementedError
|
|
233
232
|
```
|
|
234
233
|
|
|
235
234
|
#### Get corporation assets
|
|
236
235
|
|
|
236
|
+
```ruby
|
|
237
|
+
options = { token: 'token123', corporation_id: 98_134_807, page: 1 }
|
|
238
|
+
|
|
239
|
+
corporation_assets = EveOnline::ESI::CorporationAssets.new(options)
|
|
240
|
+
|
|
241
|
+
corporation_assets.scope # => "esi-assets.read_corporation_assets.v1"
|
|
242
|
+
|
|
243
|
+
corporation_assets.roles # => ["Director"]
|
|
244
|
+
|
|
245
|
+
corporation_assets.page # => 1
|
|
246
|
+
|
|
247
|
+
corporation_assets.total_pages # => 1
|
|
248
|
+
|
|
249
|
+
corporation_assets.assets.size # => 486
|
|
250
|
+
|
|
251
|
+
asset = corporation_assets.assets.first
|
|
252
|
+
|
|
253
|
+
asset.as_json # => {:is_blueprint_copy=>true,
|
|
254
|
+
# :is_singleton=>true,
|
|
255
|
+
# :item_id=>716338097,
|
|
256
|
+
# :location_flag=>"Hangar",
|
|
257
|
+
# :location_id=>1027847409779,
|
|
258
|
+
# :location_type=>"other",
|
|
259
|
+
# :quantity=>1
|
|
260
|
+
# :type_id=>1010}
|
|
261
|
+
|
|
262
|
+
asset.is_blueprint_copy # => true
|
|
263
|
+
asset.is_singleton # => true
|
|
264
|
+
asset.item_id # => 716338097
|
|
265
|
+
asset.location_flag # => "Hangar"
|
|
266
|
+
asset.location_id # => 1027847409779
|
|
267
|
+
asset.location_type # => "other"
|
|
268
|
+
asset.quantity # => 1
|
|
269
|
+
asset.type_id # => 1010
|
|
270
|
+
|
|
271
|
+
# TODO: corporation_assets.etag
|
|
272
|
+
```
|
|
273
|
+
|
|
237
274
|
#### Get corporation asset locations
|
|
238
275
|
|
|
276
|
+
```ruby
|
|
277
|
+
options = { token: 'token123', corporation_id: 98_134_807, item_ids: [1_001_215_602_246] }
|
|
278
|
+
|
|
279
|
+
corporation_assets_locations = EveOnline::ESI::CorporationAssetsLocations.new(options)
|
|
280
|
+
|
|
281
|
+
corporation_assets_locations.scope # => "esi-assets.read_corporation_assets.v1"
|
|
282
|
+
|
|
283
|
+
corporation_assets_locations.roles # => ["Director"]
|
|
284
|
+
|
|
285
|
+
corporation_assets_locations.assets_locations.size # => 1
|
|
286
|
+
|
|
287
|
+
asset_location = corporation_assets_locations.assets_locations.first
|
|
288
|
+
|
|
289
|
+
asset_location.as_json # => {:item_id=>1001215602246}
|
|
290
|
+
|
|
291
|
+
asset_location.item_id # => 1001215602246
|
|
292
|
+
|
|
293
|
+
asset_location.position.as_json # => {:x=>-928621543221.3319,
|
|
294
|
+
# :y=>297645715142.40234,
|
|
295
|
+
# :z=>-971212198300.4812}
|
|
296
|
+
|
|
297
|
+
asset_location.position.x # => -928621543221.3319
|
|
298
|
+
asset_location.position.y # => 297645715142.40234
|
|
299
|
+
asset_location.position.z # => -971212198300.4812
|
|
300
|
+
|
|
301
|
+
corporation_assets_locations.etag # => NotImplementedError
|
|
302
|
+
```
|
|
303
|
+
|
|
239
304
|
#### Get corporation asset names
|
|
240
305
|
|
|
306
|
+
```ruby
|
|
307
|
+
options = { token: 'token123', corporation_id: 98_134_807, item_ids: [1_001_215_602_246] }
|
|
308
|
+
|
|
309
|
+
corporation_assets_names = EveOnline::ESI::CorporationAssetsNames.new(options)
|
|
310
|
+
|
|
311
|
+
corporation_assets_names.scope # => "esi-assets.read_corporation_assets.v1"
|
|
312
|
+
|
|
313
|
+
corporation_assets_names.roles # => ["Director"]
|
|
314
|
+
|
|
315
|
+
corporation_assets_names.assets_names.size # => 1
|
|
316
|
+
|
|
317
|
+
asset_name = corporation_assets_names.assets_names.first
|
|
318
|
+
|
|
319
|
+
asset_name.as_json # => {:item_id=>1001215602246,
|
|
320
|
+
# :name=>"HOLE"}
|
|
321
|
+
|
|
322
|
+
asset_name.item_id # => 1001215602246
|
|
323
|
+
asset_name.name # => "HOLE"
|
|
324
|
+
|
|
325
|
+
corporation_assets_names.etag # => NotImplementedError
|
|
326
|
+
```
|
|
327
|
+
|
|
241
328
|
### Bookmarks
|
|
242
329
|
|
|
243
330
|
#### List bookmarks
|
|
244
331
|
|
|
245
332
|
```ruby
|
|
246
|
-
options = { token: 'token123', character_id:
|
|
333
|
+
options = { token: 'token123', character_id: 90_729_314, page: 1 }
|
|
247
334
|
|
|
248
335
|
character_bookmarks = EveOnline::ESI::CharacterBookmarks.new(options)
|
|
249
336
|
|
|
@@ -287,7 +374,7 @@ bookmark.coordinates.as_json # => {:x=>-144951231521.81625,
|
|
|
287
374
|
#### List bookmark folders
|
|
288
375
|
|
|
289
376
|
```ruby
|
|
290
|
-
options = { token: 'token123', character_id:
|
|
377
|
+
options = { token: 'token123', character_id: 90_729_314, page: 1 }
|
|
291
378
|
|
|
292
379
|
character_bookmark_folders = EveOnline::ESI::CharacterBookmarkFolders.new(options)
|
|
293
380
|
|
|
@@ -319,7 +406,7 @@ bookmark_folder.name # => "Icecream"
|
|
|
319
406
|
#### List calendar event summaries
|
|
320
407
|
|
|
321
408
|
```ruby
|
|
322
|
-
options = { token: 'token123', character_id:
|
|
409
|
+
options = { token: 'token123', character_id: 90_729_314 }
|
|
323
410
|
|
|
324
411
|
character_calendar = EveOnline::ESI::CharacterCalendar.new(options)
|
|
325
412
|
|
|
@@ -386,7 +473,7 @@ character.name # => "Green Black"
|
|
|
386
473
|
character.race_id # => 2
|
|
387
474
|
character.security_status # => 1.8694881661345457
|
|
388
475
|
|
|
389
|
-
#
|
|
476
|
+
character.etag # => "22c39689783a86032b8d43fa0b2e8f4809c4f38a585e39471035aa8b"
|
|
390
477
|
```
|
|
391
478
|
|
|
392
479
|
#### Get agents research
|
|
@@ -687,7 +774,7 @@ corporation.etag # => "046430260be73e5d7ad3a9251954310bd547498eeb38f99e8d305796"
|
|
|
687
774
|
#### Get corporation blueprints
|
|
688
775
|
|
|
689
776
|
```ruby
|
|
690
|
-
options =
|
|
777
|
+
options = { token: 'token123', corporation_id: 98260237, page: 1 }
|
|
691
778
|
|
|
692
779
|
corporation_blueprints = EveOnline::ESI::CorporationBlueprints.new(options)
|
|
693
780
|
|
|
@@ -719,7 +806,7 @@ blueprint.runs # => 300
|
|
|
719
806
|
blueprint.time_efficiency # => 20
|
|
720
807
|
blueprint.type_id # => 31803
|
|
721
808
|
|
|
722
|
-
#
|
|
809
|
+
corporation_blueprints.roles # => ["Director"]
|
|
723
810
|
|
|
724
811
|
# TODO: corporation_blueprints.etag
|
|
725
812
|
```
|
|
@@ -1035,7 +1122,7 @@ job.successful_runs # => nil
|
|
|
1035
1122
|
#### List corporation industry jobs
|
|
1036
1123
|
|
|
1037
1124
|
```ruby
|
|
1038
|
-
options = { token: 'token123', corporation_id:
|
|
1125
|
+
options = { token: 'token123', corporation_id: 98_146_630 }
|
|
1039
1126
|
|
|
1040
1127
|
corporation_jobs = EveOnline::ESI::CorporationIndustryJobs.new(options)
|
|
1041
1128
|
|
|
@@ -1095,6 +1182,8 @@ job.start_date # => Sat, 18 Nov 2017 11:20:14 UTC +00:00
|
|
|
1095
1182
|
job.status # => "active"
|
|
1096
1183
|
job.successful_runs # => nil
|
|
1097
1184
|
|
|
1185
|
+
corporation_jobs.roles # => ["Factory_Manager"]
|
|
1186
|
+
|
|
1098
1187
|
# TODO: corporation_jobs.etag
|
|
1099
1188
|
```
|
|
1100
1189
|
|
|
@@ -1111,7 +1200,7 @@ job.successful_runs # => nil
|
|
|
1111
1200
|
#### Get a character's recent kills and losses
|
|
1112
1201
|
|
|
1113
1202
|
```ruby
|
|
1114
|
-
options = { token: 'token123', character_id:
|
|
1203
|
+
options = { token: 'token123', character_id: 90_729_314 }
|
|
1115
1204
|
|
|
1116
1205
|
character_killmails = EveOnline::ESI::CharacterKillmailsRecent.new(options)
|
|
1117
1206
|
|
|
@@ -1137,7 +1226,7 @@ killmail.killmail_id # => 72410059
|
|
|
1137
1226
|
#### Get a corporation's recent kills and losses
|
|
1138
1227
|
|
|
1139
1228
|
```ruby
|
|
1140
|
-
options = { token: 'token123', corporation_id:
|
|
1229
|
+
options = { token: 'token123', corporation_id: 98_146_630 }
|
|
1141
1230
|
|
|
1142
1231
|
corporation_killmails = EveOnline::ESI::CorporationKillmailsRecent.new(options)
|
|
1143
1232
|
|
|
@@ -1157,6 +1246,8 @@ killmail.as_json # => {:killmail_hash=>"07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5
|
|
|
1157
1246
|
killmail.killmail_hash # => "07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5"
|
|
1158
1247
|
killmail.killmail_id # => 72410059
|
|
1159
1248
|
|
|
1249
|
+
corporation_killmails.roles # => ["Director"]
|
|
1250
|
+
|
|
1160
1251
|
# TODO: corporation_killmails.etag
|
|
1161
1252
|
```
|
|
1162
1253
|
|
|
@@ -1313,7 +1404,7 @@ order.volume_total
|
|
|
1313
1404
|
#### List open orders from a corporation
|
|
1314
1405
|
|
|
1315
1406
|
```ruby
|
|
1316
|
-
options = { token: 'token123', corporation_id:
|
|
1407
|
+
options = { token: 'token123', corporation_id: 1_000_168, page: 1 }
|
|
1317
1408
|
|
|
1318
1409
|
corporation_orders = EveOnline::ESI::CorporationOrders.new(options)
|
|
1319
1410
|
|
|
@@ -1349,6 +1440,8 @@ order.wallet_division
|
|
|
1349
1440
|
|
|
1350
1441
|
# TODO: update
|
|
1351
1442
|
|
|
1443
|
+
corporation_orders.roles # => ["Accountant", "Trader"]
|
|
1444
|
+
|
|
1352
1445
|
# TODO: corporation_orders.etag
|
|
1353
1446
|
```
|
|
1354
1447
|
|
data/eve_online.gemspec
CHANGED
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
|
|
27
27
|
spec.require_paths = ['lib']
|
|
28
28
|
|
|
29
|
-
spec.required_ruby_version = '>= 2.
|
|
29
|
+
spec.required_ruby_version = '>= 2.4'
|
|
30
30
|
|
|
31
31
|
spec.add_development_dependency 'bundler'
|
|
32
32
|
spec.add_development_dependency 'rake'
|
data/lib/eve_online.rb
CHANGED
|
@@ -26,6 +26,9 @@ require 'eve_online/esi/alliance_icon'
|
|
|
26
26
|
require 'eve_online/esi/character_assets'
|
|
27
27
|
require 'eve_online/esi/character_assets_locations'
|
|
28
28
|
require 'eve_online/esi/character_assets_names'
|
|
29
|
+
require 'eve_online/esi/corporation_assets'
|
|
30
|
+
require 'eve_online/esi/corporation_assets_locations'
|
|
31
|
+
require 'eve_online/esi/corporation_assets_names'
|
|
29
32
|
|
|
30
33
|
require 'eve_online/esi/character_bookmarks'
|
|
31
34
|
require 'eve_online/esi/character_bookmark_folders'
|
data/lib/eve_online/esi/base.rb
CHANGED
|
@@ -117,12 +117,18 @@ module EveOnline
|
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
|
|
121
|
+
class Net::WriteTimeout < StandardError; end
|
|
122
|
+
end
|
|
123
|
+
|
|
120
124
|
def uri
|
|
121
125
|
@uri ||= URI.parse(url)
|
|
122
126
|
end
|
|
123
127
|
|
|
124
128
|
def resource
|
|
125
129
|
@resource ||= client.request(request)
|
|
130
|
+
rescue Net::OpenTimeout, Net::ReadTimeout, Net::WriteTimeout
|
|
131
|
+
raise EveOnline::Exceptions::Timeout
|
|
126
132
|
end
|
|
127
133
|
|
|
128
134
|
def not_modified?
|
|
@@ -159,8 +165,6 @@ module EveOnline
|
|
|
159
165
|
# raise EveOnline::Exceptions::UnknownStatus
|
|
160
166
|
raise NotImplementedError
|
|
161
167
|
end
|
|
162
|
-
rescue Net::OpenTimeout, Net::ReadTimeout
|
|
163
|
-
raise EveOnline::Exceptions::Timeout
|
|
164
168
|
end
|
|
165
169
|
|
|
166
170
|
def response
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EveOnline
|
|
4
|
+
module ESI
|
|
5
|
+
class CorporationAssets < Base
|
|
6
|
+
API_PATH = '/v3/corporations/%<corporation_id>s/assets/?datasource=%<datasource>s&page=%<page>s'
|
|
7
|
+
|
|
8
|
+
attr_reader :corporation_id, :page
|
|
9
|
+
|
|
10
|
+
def initialize(options)
|
|
11
|
+
super
|
|
12
|
+
|
|
13
|
+
@corporation_id = options.fetch(:corporation_id)
|
|
14
|
+
@page = options.fetch(:page, 1)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def assets
|
|
18
|
+
@assets ||=
|
|
19
|
+
begin
|
|
20
|
+
output = []
|
|
21
|
+
response.each do |asset|
|
|
22
|
+
output << Models::Asset.new(asset)
|
|
23
|
+
end
|
|
24
|
+
output
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def scope
|
|
29
|
+
'esi-assets.read_corporation_assets.v1'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def roles
|
|
33
|
+
['Director']
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def url
|
|
37
|
+
format("#{ API_HOST }#{ API_PATH }", corporation_id: corporation_id, datasource: datasource, page: page)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EveOnline
|
|
4
|
+
module ESI
|
|
5
|
+
class CorporationAssetsLocations < Base
|
|
6
|
+
API_PATH = '/v2/corporations/%<corporation_id>s/assets/locations/?datasource=%<datasource>s'
|
|
7
|
+
|
|
8
|
+
attr_reader :corporation_id, :item_ids
|
|
9
|
+
|
|
10
|
+
def initialize(options)
|
|
11
|
+
super
|
|
12
|
+
|
|
13
|
+
@corporation_id = options.fetch(:corporation_id)
|
|
14
|
+
@item_ids = options.fetch(:item_ids)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def assets_locations
|
|
18
|
+
@assets_locations ||=
|
|
19
|
+
begin
|
|
20
|
+
output = []
|
|
21
|
+
response.each do |asset_location|
|
|
22
|
+
output << Models::AssetLocation.new(asset_location)
|
|
23
|
+
end
|
|
24
|
+
output
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def http_method
|
|
29
|
+
'Post'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def payload
|
|
33
|
+
item_ids.to_json
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def scope
|
|
37
|
+
'esi-assets.read_corporation_assets.v1'
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def roles
|
|
41
|
+
['Director']
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def etag
|
|
45
|
+
raise NotImplementedError
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def url
|
|
49
|
+
format("#{ API_HOST }#{ API_PATH }", corporation_id: corporation_id, datasource: datasource)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EveOnline
|
|
4
|
+
module ESI
|
|
5
|
+
class CorporationAssetsNames < Base
|
|
6
|
+
API_PATH = '/v1/corporations/%<corporation_id>s/assets/names/?datasource=%<datasource>s'
|
|
7
|
+
|
|
8
|
+
attr_reader :corporation_id, :item_ids
|
|
9
|
+
|
|
10
|
+
def initialize(options)
|
|
11
|
+
super
|
|
12
|
+
|
|
13
|
+
@corporation_id = options.fetch(:corporation_id)
|
|
14
|
+
@item_ids = options.fetch(:item_ids)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def assets_names
|
|
18
|
+
@assets_names ||=
|
|
19
|
+
begin
|
|
20
|
+
output = []
|
|
21
|
+
response.each do |asset_name|
|
|
22
|
+
output << Models::AssetName.new(asset_name)
|
|
23
|
+
end
|
|
24
|
+
output
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def http_method
|
|
29
|
+
'Post'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def payload
|
|
33
|
+
item_ids.to_json
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def scope
|
|
37
|
+
'esi-assets.read_corporation_assets.v1'
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def roles
|
|
41
|
+
['Director']
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def etag
|
|
45
|
+
raise NotImplementedError
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def url
|
|
49
|
+
format("#{ API_HOST }#{ API_PATH }", corporation_id: corporation_id, datasource: datasource)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -30,6 +30,10 @@ module EveOnline
|
|
|
30
30
|
'esi-industry.read_corporation_jobs.v1'
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def roles
|
|
34
|
+
['Factory_Manager']
|
|
35
|
+
end
|
|
36
|
+
|
|
33
37
|
def url
|
|
34
38
|
format("#{ API_HOST }#{ API_PATH }", corporation_id: corporation_id, include_completed: include_completed, datasource: datasource, page: page)
|
|
35
39
|
end
|
|
@@ -29,10 +29,9 @@ module EveOnline
|
|
|
29
29
|
'esi-markets.read_corporation_orders.v1'
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# end
|
|
32
|
+
def roles
|
|
33
|
+
['Accountant', 'Trader']
|
|
34
|
+
end
|
|
36
35
|
|
|
37
36
|
def url
|
|
38
37
|
format("#{ API_HOST }#{ API_PATH }", corporation_id: corporation_id, datasource: datasource, page: page)
|
data/lib/eve_online/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.25.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: 2019-
|
|
11
|
+
date: 2019-05-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -200,6 +200,9 @@ files:
|
|
|
200
200
|
- lib/eve_online/esi/character_wallet.rb
|
|
201
201
|
- lib/eve_online/esi/character_wallet_journal.rb
|
|
202
202
|
- lib/eve_online/esi/corporation.rb
|
|
203
|
+
- lib/eve_online/esi/corporation_assets.rb
|
|
204
|
+
- lib/eve_online/esi/corporation_assets_locations.rb
|
|
205
|
+
- lib/eve_online/esi/corporation_assets_names.rb
|
|
203
206
|
- lib/eve_online/esi/corporation_blueprints.rb
|
|
204
207
|
- lib/eve_online/esi/corporation_industry_jobs.rb
|
|
205
208
|
- lib/eve_online/esi/corporation_killmails_recent.rb
|
|
@@ -335,14 +338,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
335
338
|
requirements:
|
|
336
339
|
- - ">="
|
|
337
340
|
- !ruby/object:Gem::Version
|
|
338
|
-
version: '2.
|
|
341
|
+
version: '2.4'
|
|
339
342
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
340
343
|
requirements:
|
|
341
344
|
- - ">="
|
|
342
345
|
- !ruby/object:Gem::Version
|
|
343
346
|
version: '0'
|
|
344
347
|
requirements: []
|
|
345
|
-
rubygems_version: 3.0.
|
|
348
|
+
rubygems_version: 3.0.3
|
|
346
349
|
signing_key:
|
|
347
350
|
specification_version: 4
|
|
348
351
|
summary: EveOnline ESI API.
|