eve_online 0.38.0 → 0.42.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +12 -12
- data/.github/dependabot.yml +10 -0
- data/.rubocop.yml +11 -0
- data/.ruby-version +1 -1
- data/Appraisals +2 -0
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +54 -39
- data/README.md +103 -15
- data/eve_online.gemspec +1 -1
- data/lib/eve_online/esi/alliance.rb +1 -1
- data/lib/eve_online/esi/alliance_icon.rb +1 -1
- data/lib/eve_online/esi/base.rb +4 -5
- data/lib/eve_online/esi/character.rb +4 -4
- data/lib/eve_online/esi/character_corporation_history.rb +1 -1
- data/lib/eve_online/esi/models/character.rb +0 -5
- data/lib/eve_online/esi/models/search.rb +64 -0
- data/lib/eve_online/esi/search.rb +61 -0
- data/lib/eve_online/formulas/training_rate.rb +18 -0
- data/lib/eve_online/version.rb +1 -1
- data/lib/eve_online.rb +4 -0
- metadata +8 -4
- data/TODO.md +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60bd583062e98adec0707cea8b59e9519154835218988564507df4eff9180326
|
4
|
+
data.tar.gz: c07a59b88410669e9334f72296393ab15bac9bb3886a2fb4948dbf2de01e636d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b52154b2ac16192fb91c5e41d213db27f60efefd52749779b53a2b6d9475c4c8312b4bd222c5392615d04806e754f450708f3e198aba889336aff791de73abbe
|
7
|
+
data.tar.gz: 236bacacdaa564893e74ca7299de5ab3d19bfee3ee445e0461331ba5c35240893d73d2ceff993472bdf22c21000d51317d774834b8429699ec752abb49ef3fff
|
data/.circleci/config.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
version: 2
|
2
2
|
|
3
3
|
jobs:
|
4
|
-
ruby-2.6.
|
4
|
+
ruby-2.6.8:
|
5
5
|
docker:
|
6
|
-
- image: circleci/ruby:2.6.
|
6
|
+
- image: circleci/ruby:2.6.8
|
7
7
|
steps:
|
8
8
|
- checkout
|
9
9
|
- run: rm Gemfile.lock
|
@@ -13,10 +13,10 @@ jobs:
|
|
13
13
|
- run: bundle exec appraisal rake
|
14
14
|
- run: bundle exec standardrb
|
15
15
|
- run: bundle exec fasterer
|
16
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
17
|
-
ruby-2.7.
|
16
|
+
- run: bundle exec mdl README.md CHANGELOG.md
|
17
|
+
ruby-2.7.4:
|
18
18
|
docker:
|
19
|
-
- image: circleci/ruby:2.7.
|
19
|
+
- image: circleci/ruby:2.7.4
|
20
20
|
steps:
|
21
21
|
- checkout
|
22
22
|
- run: rm Gemfile.lock
|
@@ -26,10 +26,10 @@ jobs:
|
|
26
26
|
- run: bundle exec appraisal rake
|
27
27
|
- run: bundle exec standardrb
|
28
28
|
- run: bundle exec fasterer
|
29
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
30
|
-
ruby-3.0.
|
29
|
+
- run: bundle exec mdl README.md CHANGELOG.md
|
30
|
+
ruby-3.0.2:
|
31
31
|
docker:
|
32
|
-
- image: circleci/ruby:3.0.
|
32
|
+
- image: circleci/ruby:3.0.2
|
33
33
|
steps:
|
34
34
|
- checkout
|
35
35
|
- run: rm Gemfile.lock
|
@@ -39,12 +39,12 @@ jobs:
|
|
39
39
|
- run: bundle exec appraisal rake
|
40
40
|
- run: bundle exec standardrb
|
41
41
|
- run: bundle exec fasterer
|
42
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
42
|
+
- run: bundle exec mdl README.md CHANGELOG.md
|
43
43
|
|
44
44
|
workflows:
|
45
45
|
version: 2
|
46
46
|
tests:
|
47
47
|
jobs:
|
48
|
-
- ruby-2.6.
|
49
|
-
- ruby-2.7.
|
50
|
-
- ruby-3.0.
|
48
|
+
- ruby-2.6.8
|
49
|
+
- ruby-2.7.4
|
50
|
+
- ruby-3.0.2
|
data/.rubocop.yml
ADDED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.2
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.42.0
|
4
|
+
|
5
|
+
* Sync with new ESI
|
6
|
+
* Remove `EveOnline::ESI::Models::Character#ancestry_id`
|
7
|
+
* Remove `ancestry_id` from `EveOnline::ESI::Models::Character#as_json`
|
8
|
+
* Remove `EveOnline::ESI::Character#ancestry_id`
|
9
|
+
|
10
|
+
## v0.41.0
|
11
|
+
|
12
|
+
* Add `EveOnline::ESI::Search`
|
13
|
+
|
14
|
+
## v0.40.0
|
15
|
+
|
16
|
+
* Add `EveOnline::Formulas::TrainingRate`
|
17
|
+
|
18
|
+
## v0.39.0
|
19
|
+
|
20
|
+
* Sync with new ESI
|
21
|
+
* Add "Accept" header back
|
22
|
+
|
3
23
|
## 0.38.0
|
4
24
|
|
5
25
|
* Replace `net/http` with `faraday`
|
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.42.0)
|
5
5
|
activesupport (>= 5.2.0)
|
6
6
|
faraday
|
7
7
|
faraday_middleware
|
@@ -9,42 +9,57 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (6.1.
|
12
|
+
activesupport (6.1.4.1)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (>= 1.6, < 2)
|
15
15
|
minitest (>= 5.1)
|
16
16
|
tzinfo (~> 2.0)
|
17
17
|
zeitwerk (~> 2.3)
|
18
|
-
addressable (2.
|
18
|
+
addressable (2.8.0)
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
20
|
-
appraisal (2.4.
|
20
|
+
appraisal (2.4.1)
|
21
21
|
bundler
|
22
22
|
rake
|
23
23
|
thor (>= 0.14.0)
|
24
24
|
ast (2.4.2)
|
25
|
-
awesome_print (1.
|
26
|
-
chef-utils (
|
25
|
+
awesome_print (1.9.2)
|
26
|
+
chef-utils (17.4.38)
|
27
|
+
concurrent-ruby
|
27
28
|
coderay (1.1.3)
|
28
29
|
colorize (0.8.1)
|
29
|
-
concurrent-ruby (1.1.
|
30
|
+
concurrent-ruby (1.1.9)
|
30
31
|
crack (0.4.5)
|
31
32
|
rexml
|
32
33
|
diff-lcs (1.4.4)
|
33
|
-
docile (1.
|
34
|
-
faraday (1.
|
34
|
+
docile (1.4.0)
|
35
|
+
faraday (1.7.0)
|
36
|
+
faraday-em_http (~> 1.0)
|
37
|
+
faraday-em_synchrony (~> 1.0)
|
38
|
+
faraday-excon (~> 1.1)
|
39
|
+
faraday-httpclient (~> 1.0.1)
|
35
40
|
faraday-net_http (~> 1.0)
|
41
|
+
faraday-net_http_persistent (~> 1.1)
|
42
|
+
faraday-patron (~> 1.0)
|
43
|
+
faraday-rack (~> 1.0)
|
36
44
|
multipart-post (>= 1.2, < 3)
|
37
|
-
ruby2_keywords
|
45
|
+
ruby2_keywords (>= 0.0.4)
|
46
|
+
faraday-em_http (1.0.0)
|
47
|
+
faraday-em_synchrony (1.0.0)
|
48
|
+
faraday-excon (1.1.0)
|
49
|
+
faraday-httpclient (1.0.1)
|
38
50
|
faraday-net_http (1.0.1)
|
39
|
-
|
51
|
+
faraday-net_http_persistent (1.2.0)
|
52
|
+
faraday-patron (1.0.0)
|
53
|
+
faraday-rack (1.0.0)
|
54
|
+
faraday_middleware (1.1.0)
|
40
55
|
faraday (~> 1.0)
|
41
56
|
fasterer (0.9.0)
|
42
57
|
colorize (~> 0.7)
|
43
58
|
ruby_parser (>= 3.14.1)
|
44
59
|
hashdiff (1.0.1)
|
45
|
-
i18n (1.8.
|
60
|
+
i18n (1.8.10)
|
46
61
|
concurrent-ruby (~> 1.0)
|
47
|
-
kramdown (2.3.
|
62
|
+
kramdown (2.3.1)
|
48
63
|
rexml
|
49
64
|
kramdown-parser-gfm (1.1.0)
|
50
65
|
kramdown (~> 2.0)
|
@@ -55,7 +70,7 @@ GEM
|
|
55
70
|
mixlib-config (>= 2.2.1, < 4)
|
56
71
|
mixlib-shellout
|
57
72
|
method_source (1.0.0)
|
58
|
-
mini_portile2 (2.
|
73
|
+
mini_portile2 (2.6.1)
|
59
74
|
minitest (5.14.4)
|
60
75
|
mixlib-cli (2.1.8)
|
61
76
|
mixlib-config (3.0.9)
|
@@ -63,23 +78,23 @@ GEM
|
|
63
78
|
mixlib-shellout (3.2.5)
|
64
79
|
chef-utils
|
65
80
|
multipart-post (2.1.1)
|
66
|
-
nokogiri (1.
|
67
|
-
mini_portile2 (~> 2.
|
81
|
+
nokogiri (1.12.3)
|
82
|
+
mini_portile2 (~> 2.6.1)
|
68
83
|
racc (~> 1.4)
|
69
|
-
nokogiri (1.
|
84
|
+
nokogiri (1.12.3-x86_64-darwin)
|
70
85
|
racc (~> 1.4)
|
71
|
-
parallel (1.20.
|
72
|
-
parser (3.0.
|
86
|
+
parallel (1.20.2)
|
87
|
+
parser (3.0.2.0)
|
73
88
|
ast (~> 2.4.1)
|
74
|
-
pry (0.14.
|
89
|
+
pry (0.14.1)
|
75
90
|
coderay (~> 1.1)
|
76
91
|
method_source (~> 1.0)
|
77
92
|
public_suffix (4.0.6)
|
78
93
|
racc (1.5.2)
|
79
94
|
rainbow (3.0.0)
|
80
|
-
rake (13.0.
|
95
|
+
rake (13.0.6)
|
81
96
|
regexp_parser (2.1.1)
|
82
|
-
rexml (3.2.
|
97
|
+
rexml (3.2.5)
|
83
98
|
rspec (3.10.0)
|
84
99
|
rspec-core (~> 3.10.0)
|
85
100
|
rspec-expectations (~> 3.10.0)
|
@@ -96,42 +111,42 @@ GEM
|
|
96
111
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
112
|
rspec-support (~> 3.10.0)
|
98
113
|
rspec-support (3.10.2)
|
99
|
-
rubocop (1.
|
114
|
+
rubocop (1.20.0)
|
100
115
|
parallel (~> 1.10)
|
101
116
|
parser (>= 3.0.0.0)
|
102
117
|
rainbow (>= 2.2.2, < 4.0)
|
103
118
|
regexp_parser (>= 1.8, < 3.0)
|
104
119
|
rexml
|
105
|
-
rubocop-ast (>= 1.
|
120
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
106
121
|
ruby-progressbar (~> 1.7)
|
107
122
|
unicode-display_width (>= 1.4.0, < 3.0)
|
108
|
-
rubocop-ast (1.
|
109
|
-
parser (>=
|
110
|
-
rubocop-performance (1.
|
111
|
-
rubocop (>=
|
123
|
+
rubocop-ast (1.11.0)
|
124
|
+
parser (>= 3.0.1.1)
|
125
|
+
rubocop-performance (1.11.5)
|
126
|
+
rubocop (>= 1.7.0, < 2.0)
|
112
127
|
rubocop-ast (>= 0.4.0)
|
113
128
|
ruby-progressbar (1.11.0)
|
114
|
-
ruby2_keywords (0.0.
|
115
|
-
ruby_parser (3.
|
116
|
-
sexp_processor (~> 4.
|
117
|
-
sexp_processor (4.15.
|
129
|
+
ruby2_keywords (0.0.5)
|
130
|
+
ruby_parser (3.17.0)
|
131
|
+
sexp_processor (~> 4.15, >= 4.15.1)
|
132
|
+
sexp_processor (4.15.3)
|
118
133
|
simplecov (0.21.2)
|
119
134
|
docile (~> 1.1)
|
120
135
|
simplecov-html (~> 0.11)
|
121
136
|
simplecov_json_formatter (~> 0.1)
|
122
137
|
simplecov-html (0.12.3)
|
123
|
-
simplecov_json_formatter (0.1.
|
124
|
-
standard (
|
125
|
-
rubocop (= 1.
|
126
|
-
rubocop-performance (= 1.
|
138
|
+
simplecov_json_formatter (0.1.3)
|
139
|
+
standard (1.3.0)
|
140
|
+
rubocop (= 1.20.0)
|
141
|
+
rubocop-performance (= 1.11.5)
|
127
142
|
thor (1.1.0)
|
128
143
|
tomlrb (2.0.1)
|
129
144
|
tzinfo (2.0.4)
|
130
145
|
concurrent-ruby (~> 1.0)
|
131
146
|
unicode-display_width (2.0.0)
|
132
147
|
vcr (6.0.0)
|
133
|
-
webmock (3.
|
134
|
-
addressable (>= 2.
|
148
|
+
webmock (3.14.0)
|
149
|
+
addressable (>= 2.8.0)
|
135
150
|
crack (>= 0.3.2)
|
136
151
|
hashdiff (>= 0.4.0, < 2.0.0)
|
137
152
|
zeitwerk (2.4.2)
|
@@ -159,4 +174,4 @@ DEPENDENCIES
|
|
159
174
|
webmock
|
160
175
|
|
161
176
|
BUNDLED WITH
|
162
|
-
2.2.
|
177
|
+
2.2.26
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/eve_online.svg)](https://badge.fury.io/rb/eve_online)
|
5
5
|
[![Gem Downloads](https://img.shields.io/gem/dt/eve_online.svg)](https://rubygems.org/gems/eve_online)
|
6
6
|
[![Known Vulnerabilities](https://snyk.io/test/github/evemonk/eve_online/badge.svg)](https://snyk.io/test/github/evemonk/eve_online)
|
7
|
-
[![security](https://hakiri.io/github/evemonk/eve_online/
|
7
|
+
[![security](https://hakiri.io/github/evemonk/eve_online/main.svg)](https://hakiri.io/github/evemonk/eve_online/main)
|
8
8
|
[![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/evemonk/eve_online/?ref=repository-badge)
|
9
9
|
[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
|
10
10
|
|
@@ -132,13 +132,13 @@ alliance_icon = EveOnline::ESI::AllianceIcon.new(options)
|
|
132
132
|
|
133
133
|
alliance_icon.scope # => nil
|
134
134
|
|
135
|
-
alliance_icon.as_json # => {:icon_medium=>"
|
136
|
-
# :icon_small=>"
|
135
|
+
alliance_icon.as_json # => {:icon_medium=>"https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=128",
|
136
|
+
# :icon_small=>"https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=64"}
|
137
137
|
|
138
|
-
alliance_icon.icon_medium # => "
|
139
|
-
alliance_icon.icon_small # => "
|
138
|
+
alliance_icon.icon_medium # => "https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=128"
|
139
|
+
alliance_icon.icon_small # => "https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=64"
|
140
140
|
|
141
|
-
alliance_icon.etag # => "
|
141
|
+
alliance_icon.etag # => "d067edb53a9019e0e05d99a2b1e7c7745433a982dda16667a14bff49"
|
142
142
|
```
|
143
143
|
|
144
144
|
### Assets
|
@@ -1898,6 +1898,81 @@ market_prices.etag # => "2d5acc3bd4555821bb91d787596f5ddad129f849739e83162e93c02
|
|
1898
1898
|
|
1899
1899
|
#### Search on a string
|
1900
1900
|
|
1901
|
+
```ruby
|
1902
|
+
# simple search
|
1903
|
+
|
1904
|
+
options = { search: "Jita" }
|
1905
|
+
|
1906
|
+
search = EveOnline::ESI::Search.new(options)
|
1907
|
+
|
1908
|
+
search.as_json # => {:agent_ids=>[3018357],
|
1909
|
+
# :alliance_ids=>[99011026, 99005382, 99010662, 99010663, 99010665, 99010666],
|
1910
|
+
# :character_ids=>[2118081143, ... 2114943117],
|
1911
|
+
# :constellation_ids=>[],
|
1912
|
+
# :corporation_ids=>[],
|
1913
|
+
# :faction_ids=>[],
|
1914
|
+
# :inventory_type_ids=>[56844, 56847, 56846, 56853, 56849, 56852, 56850, 52275, 56848, 56851, 56845],
|
1915
|
+
# :region_ids=>[],
|
1916
|
+
# :solar_system_ids=>[30000142],
|
1917
|
+
# :station_ids=>[]}
|
1918
|
+
|
1919
|
+
search.agent_ids # => [3018357]
|
1920
|
+
search.alliance_ids # => [99011026, 99005382, 99010662, 99010663, 99010665, 99010666]
|
1921
|
+
search.character_ids.size # => 467
|
1922
|
+
search.character_ids.first # => 2118081143
|
1923
|
+
search.constellation_ids # => []
|
1924
|
+
search.corporation_ids # => []
|
1925
|
+
search.faction_ids # => []
|
1926
|
+
search.inventory_type_ids # => [56844, 56847, 56846, 56853, 56849, 56852, 56850, 52275, 56848, 56851, 56845]
|
1927
|
+
search.region_ids # => []
|
1928
|
+
search.solar_system_ids # => [30000142]
|
1929
|
+
search.station_ids # => []
|
1930
|
+
|
1931
|
+
search.etag # => "b6602e595e8d8df37b5191b82e75faba91284281b6fe71965d09e2f1"
|
1932
|
+
|
1933
|
+
# strict search
|
1934
|
+
|
1935
|
+
options = { search: "Jita", strict: true }
|
1936
|
+
|
1937
|
+
search = EveOnline::ESI::Search.new(options)
|
1938
|
+
|
1939
|
+
search.as_json # => {:agent_ids=>[],
|
1940
|
+
# :alliance_ids=>[99005382],
|
1941
|
+
# :character_ids=>[1392050776],
|
1942
|
+
# :constellation_ids=>[],
|
1943
|
+
# :corporation_ids=>[98004200, 98049474, 383768304, 98358437],
|
1944
|
+
# :faction_ids=>[],
|
1945
|
+
# :inventory_type_ids=>[],
|
1946
|
+
# :region_ids=>[],
|
1947
|
+
# :solar_system_ids=>[30000142],
|
1948
|
+
# :station_ids=>[]}
|
1949
|
+
|
1950
|
+
# strict search with filter by categories
|
1951
|
+
|
1952
|
+
# List of default categories (used when categories is empty):
|
1953
|
+
# ["agent", "alliance", "character", "constellation", "corporation", "faction",
|
1954
|
+
# "inventory_type", "region", "solar_system", "station"]
|
1955
|
+
|
1956
|
+
# So, add `categories: ['solar_system']` and see:
|
1957
|
+
|
1958
|
+
options = { search: "Jita", categories: ["solar_system"], strict: true }
|
1959
|
+
|
1960
|
+
search = EveOnline::ESI::Search.new(options)
|
1961
|
+
|
1962
|
+
search.as_json # => {:agent_ids=>[],
|
1963
|
+
# :alliance_ids=>[],
|
1964
|
+
# :character_ids=>[],
|
1965
|
+
# :constellation_ids=>[],
|
1966
|
+
# :corporation_ids=>[],
|
1967
|
+
# :faction_ids=>[],
|
1968
|
+
# :inventory_type_ids=>[],
|
1969
|
+
# :region_ids=>[],
|
1970
|
+
# :solar_system_ids=>[30000142],
|
1971
|
+
# :station_ids=>[]}
|
1972
|
+
|
1973
|
+
search.solar_system_ids # => [30000142]
|
1974
|
+
```
|
1975
|
+
|
1901
1976
|
### Skills
|
1902
1977
|
|
1903
1978
|
#### Get character attributes
|
@@ -3088,18 +3163,17 @@ List of exceptions:
|
|
3088
3163
|
|
3089
3164
|
## Timeouts
|
3090
3165
|
|
3091
|
-
`eve_online` gem uses `
|
3166
|
+
`eve_online` gem uses `faraday` for network request. `faraday` configured with:
|
3092
3167
|
|
3093
3168
|
```ruby
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
http.write_timeout = 60
|
3169
|
+
Faraday.new do |f|
|
3170
|
+
f.options.read_timeout = 60
|
3171
|
+
f.options.open_timeout = 60
|
3172
|
+
f.options.write_timeout = 60
|
3173
|
+
end
|
3100
3174
|
```
|
3101
3175
|
|
3102
|
-
You can configure default timeouts with adding `read_timeout
|
3176
|
+
You can configure default timeouts with adding `read_timeout:`, `open_timeout:` and `write_timeout:` to default hash with options:
|
3103
3177
|
|
3104
3178
|
```ruby
|
3105
3179
|
options = { read_timeout: 120, open_timeout: 120, write_timeout: 120 } # 120 seconds
|
@@ -3120,7 +3194,6 @@ races.read_timeout # => 60
|
|
3120
3194
|
races.read_timeout = 120
|
3121
3195
|
races.read_timeout # => 120
|
3122
3196
|
|
3123
|
-
# if ruby >= 2.6.0
|
3124
3197
|
races.write_timeout # => 60
|
3125
3198
|
races.write_timeout = 120
|
3126
3199
|
races.write_timeout # => 120
|
@@ -3168,6 +3241,20 @@ formula = EveOnline::Formulas::BlueprintCopyTime.new(seconds, science_level,
|
|
3168
3241
|
formula.time # => 174.6
|
3169
3242
|
```
|
3170
3243
|
|
3244
|
+
### Training rate
|
3245
|
+
|
3246
|
+
```ruby
|
3247
|
+
# Memory: 24
|
3248
|
+
primary = 24
|
3249
|
+
# Charisma: 20
|
3250
|
+
secondary = 20
|
3251
|
+
|
3252
|
+
training_rate = EveOnline::Formulas::TrainingRate.new(primary, secondary)
|
3253
|
+
|
3254
|
+
# skill points per minute
|
3255
|
+
training_rate.rate # => 34.0
|
3256
|
+
```
|
3257
|
+
|
3171
3258
|
## Useful links
|
3172
3259
|
|
3173
3260
|
* [BREAKING CHANGES AND YOU - HOW TO USE ALT-ROUTES TO ENHANCE YOUR SANITY](https://developers.eveonline.com/blog/article/breaking-changes-and-you)
|
@@ -3198,6 +3285,7 @@ Thank you everyone!
|
|
3198
3285
|
* Ian Flynn (@monban)
|
3199
3286
|
* Mekaret Eriker (@Mekaret)
|
3200
3287
|
* Y. (@lunohodov)
|
3288
|
+
* Trevor Copeland (@sicks)
|
3201
3289
|
|
3202
3290
|
## License
|
3203
3291
|
|
data/eve_online.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
"source_code_uri" => "https://github.com/evemonk/eve_online"
|
24
24
|
}
|
25
25
|
|
26
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin|swagger)/}) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
29
|
spec.required_ruby_version = ">= 2.6"
|
data/lib/eve_online/esi/base.rb
CHANGED
@@ -97,9 +97,10 @@ module EveOnline
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def connection
|
100
|
-
@connection ||= Faraday.new
|
100
|
+
@connection ||= Faraday.new do |f|
|
101
101
|
f.headers["User-Agent"] = user_agent
|
102
102
|
f.headers["If-None-Match"] = _etag if _etag
|
103
|
+
f.headers["Accept"] = "application/json"
|
103
104
|
f.authorization :Bearer, token if token
|
104
105
|
f.options.read_timeout = _read_timeout
|
105
106
|
f.options.open_timeout = _open_timeout
|
@@ -112,11 +113,9 @@ module EveOnline
|
|
112
113
|
f.use middleware[:class]
|
113
114
|
end
|
114
115
|
end
|
115
|
-
# f.use Faraday::Response::Logger
|
116
|
-
# f.use FaradayMiddleware::FollowRedirects, limit: 5
|
117
116
|
f.response :json, content_type: "application/json"
|
118
117
|
f.adapter adapter
|
119
|
-
|
118
|
+
end
|
120
119
|
end
|
121
120
|
|
122
121
|
def uri
|
@@ -146,7 +145,7 @@ module EveOnline
|
|
146
145
|
hash[param] = public_send(param)
|
147
146
|
end
|
148
147
|
|
149
|
-
hash.reject { |_, v| v.
|
148
|
+
hash.reject { |_, v| v.nil? || v == "" }
|
150
149
|
end
|
151
150
|
|
152
151
|
def resource
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class Character < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_PATH = "/
|
10
|
+
API_PATH = "/v5/characters/%<character_id>s/"
|
11
11
|
|
12
12
|
attr_reader :character_id
|
13
13
|
|
@@ -17,9 +17,9 @@ module EveOnline
|
|
17
17
|
@character_id = options.fetch(:character_id)
|
18
18
|
end
|
19
19
|
|
20
|
-
def_delegators :model, :as_json, :alliance_id, :
|
21
|
-
:
|
22
|
-
:
|
20
|
+
def_delegators :model, :as_json, :alliance_id, :birthday, :bloodline_id,
|
21
|
+
:corporation_id, :description, :faction_id, :gender, :name, :race_id,
|
22
|
+
:security_status, :title
|
23
23
|
|
24
24
|
def model
|
25
25
|
@model ||= Models::Character.new(response)
|
@@ -7,7 +7,6 @@ module EveOnline
|
|
7
7
|
def as_json
|
8
8
|
{
|
9
9
|
alliance_id: alliance_id,
|
10
|
-
ancestry_id: ancestry_id,
|
11
10
|
birthday: birthday,
|
12
11
|
bloodline_id: bloodline_id,
|
13
12
|
corporation_id: corporation_id,
|
@@ -25,10 +24,6 @@ module EveOnline
|
|
25
24
|
options["alliance_id"]
|
26
25
|
end
|
27
26
|
|
28
|
-
def ancestry_id
|
29
|
-
options["ancestry_id"]
|
30
|
-
end
|
31
|
-
|
32
27
|
def birthday
|
33
28
|
birthday = options["birthday"]
|
34
29
|
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class Search < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
agent_ids: agent_ids,
|
10
|
+
alliance_ids: alliance_ids,
|
11
|
+
character_ids: character_ids,
|
12
|
+
constellation_ids: constellation_ids,
|
13
|
+
corporation_ids: corporation_ids,
|
14
|
+
faction_ids: faction_ids,
|
15
|
+
inventory_type_ids: inventory_type_ids,
|
16
|
+
region_ids: region_ids,
|
17
|
+
solar_system_ids: solar_system_ids,
|
18
|
+
station_ids: station_ids
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def agent_ids
|
23
|
+
options.fetch("agent", [])
|
24
|
+
end
|
25
|
+
|
26
|
+
def alliance_ids
|
27
|
+
options.fetch("alliance", [])
|
28
|
+
end
|
29
|
+
|
30
|
+
def character_ids
|
31
|
+
options.fetch("character", [])
|
32
|
+
end
|
33
|
+
|
34
|
+
def constellation_ids
|
35
|
+
options.fetch("constellation", [])
|
36
|
+
end
|
37
|
+
|
38
|
+
def corporation_ids
|
39
|
+
options.fetch("corporation", [])
|
40
|
+
end
|
41
|
+
|
42
|
+
def faction_ids
|
43
|
+
options.fetch("faction", [])
|
44
|
+
end
|
45
|
+
|
46
|
+
def inventory_type_ids
|
47
|
+
options.fetch("inventory_type", [])
|
48
|
+
end
|
49
|
+
|
50
|
+
def region_ids
|
51
|
+
options.fetch("region", [])
|
52
|
+
end
|
53
|
+
|
54
|
+
def solar_system_ids
|
55
|
+
options.fetch("solar_system", [])
|
56
|
+
end
|
57
|
+
|
58
|
+
def station_ids
|
59
|
+
options.fetch("stations", [])
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "forwardable"
|
4
|
+
|
5
|
+
module EveOnline
|
6
|
+
module ESI
|
7
|
+
class Search < Base
|
8
|
+
extend Forwardable
|
9
|
+
|
10
|
+
API_PATH = "/v2/search/"
|
11
|
+
|
12
|
+
DEFAULT_CATEGORIES = [
|
13
|
+
"agent",
|
14
|
+
"alliance",
|
15
|
+
"character",
|
16
|
+
"constellation",
|
17
|
+
"corporation",
|
18
|
+
"faction",
|
19
|
+
"inventory_type",
|
20
|
+
"region",
|
21
|
+
"solar_system",
|
22
|
+
"station"
|
23
|
+
]
|
24
|
+
|
25
|
+
attr_reader :search, :strict, :raw_categories, :categories
|
26
|
+
|
27
|
+
def initialize(options)
|
28
|
+
super
|
29
|
+
|
30
|
+
@search = options.fetch(:search)
|
31
|
+
@strict = options.fetch(:strict, false)
|
32
|
+
@raw_categories = options.fetch(:categories, DEFAULT_CATEGORIES)
|
33
|
+
@raw_categories.each do |c|
|
34
|
+
unless DEFAULT_CATEGORIES.include?(c)
|
35
|
+
raise(ArgumentError)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
@categories = @raw_categories.join(",")
|
39
|
+
end
|
40
|
+
|
41
|
+
def_delegators :model, :as_json, :agent_ids, :alliance_ids,
|
42
|
+
:character_ids, :constellation_ids, :corporation_ids, :faction_ids,
|
43
|
+
:inventory_type_ids, :region_ids, :solar_system_ids, :station_ids
|
44
|
+
|
45
|
+
def model
|
46
|
+
@model ||= Models::Search.new(response)
|
47
|
+
end
|
48
|
+
|
49
|
+
def scope
|
50
|
+
end
|
51
|
+
|
52
|
+
def additional_query_params
|
53
|
+
[:search, :categories, :strict]
|
54
|
+
end
|
55
|
+
|
56
|
+
def path
|
57
|
+
format(API_PATH, search: search, categories: categories, strict: strict)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module Formulas
|
5
|
+
class TrainingRate
|
6
|
+
attr_reader :primary, :secondary
|
7
|
+
|
8
|
+
def initialize(primary, secondary)
|
9
|
+
@primary = primary
|
10
|
+
@secondary = secondary
|
11
|
+
end
|
12
|
+
|
13
|
+
def rate
|
14
|
+
primary + (secondary / 2.0)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/eve_online/version.rb
CHANGED
data/lib/eve_online.rb
CHANGED
@@ -92,6 +92,8 @@ module EveOnline
|
|
92
92
|
autoload :MarketGroup, "eve_online/esi/market_group"
|
93
93
|
autoload :MarketPrices, "eve_online/esi/market_prices"
|
94
94
|
|
95
|
+
autoload :Search, "eve_online/esi/search"
|
96
|
+
|
95
97
|
autoload :CharacterAttributes, "eve_online/esi/character_attributes"
|
96
98
|
autoload :CharacterSkillQueue, "eve_online/esi/character_skill_queue"
|
97
99
|
autoload :CharacterSkills, "eve_online/esi/character_skills"
|
@@ -175,6 +177,7 @@ module EveOnline
|
|
175
177
|
autoload :WalletTransaction, "eve_online/esi/models/wallet_transaction"
|
176
178
|
autoload :CorporationOrder, "eve_online/esi/models/corporation_order"
|
177
179
|
autoload :HomeLocation, "eve_online/esi/models/home_location"
|
180
|
+
autoload :Search, "eve_online/esi/models/search"
|
178
181
|
autoload :ServerStatus, "eve_online/esi/models/server_status"
|
179
182
|
|
180
183
|
autoload :MarketHistory, "eve_online/esi/models/market_history"
|
@@ -239,5 +242,6 @@ module EveOnline
|
|
239
242
|
|
240
243
|
module Formulas
|
241
244
|
autoload :BlueprintCopyTime, "eve_online/formulas/blueprint_copy_time"
|
245
|
+
autoload :TrainingRate, "eve_online/formulas/training_rate"
|
242
246
|
end
|
243
247
|
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.
|
4
|
+
version: 0.42.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: 2021-
|
11
|
+
date: 2021-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -189,8 +189,10 @@ files:
|
|
189
189
|
- ".deepsource.toml"
|
190
190
|
- ".fasterer.yml"
|
191
191
|
- ".github/FUNDING.yml"
|
192
|
+
- ".github/dependabot.yml"
|
192
193
|
- ".gitignore"
|
193
194
|
- ".mdlrc"
|
195
|
+
- ".rubocop.yml"
|
194
196
|
- ".ruby-version"
|
195
197
|
- ".standard.yml"
|
196
198
|
- Appraisals
|
@@ -200,7 +202,6 @@ files:
|
|
200
202
|
- LICENSE.txt
|
201
203
|
- README.md
|
202
204
|
- Rakefile
|
203
|
-
- TODO.md
|
204
205
|
- eve_online.gemspec
|
205
206
|
- lib/eve_online.rb
|
206
207
|
- lib/eve_online/esi/alliance.rb
|
@@ -331,6 +332,7 @@ files:
|
|
331
332
|
- lib/eve_online/esi/models/public_contract_item.rb
|
332
333
|
- lib/eve_online/esi/models/race.rb
|
333
334
|
- lib/eve_online/esi/models/region.rb
|
335
|
+
- lib/eve_online/esi/models/search.rb
|
334
336
|
- lib/eve_online/esi/models/server_status.rb
|
335
337
|
- lib/eve_online/esi/models/skill.rb
|
336
338
|
- lib/eve_online/esi/models/skill_queue_entry.rb
|
@@ -347,6 +349,7 @@ files:
|
|
347
349
|
- lib/eve_online/esi/models/war.rb
|
348
350
|
- lib/eve_online/esi/public_contract.rb
|
349
351
|
- lib/eve_online/esi/public_contracts.rb
|
352
|
+
- lib/eve_online/esi/search.rb
|
350
353
|
- lib/eve_online/esi/server_status.rb
|
351
354
|
- lib/eve_online/esi/universe_ancestries.rb
|
352
355
|
- lib/eve_online/esi/universe_asteroid_belt.rb
|
@@ -391,6 +394,7 @@ files:
|
|
391
394
|
- lib/eve_online/exceptions/timeout.rb
|
392
395
|
- lib/eve_online/exceptions/unauthorized.rb
|
393
396
|
- lib/eve_online/formulas/blueprint_copy_time.rb
|
397
|
+
- lib/eve_online/formulas/training_rate.rb
|
394
398
|
- lib/eve_online/version.rb
|
395
399
|
homepage: https://github.com/evemonk/eve_online
|
396
400
|
licenses:
|
@@ -416,7 +420,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
416
420
|
- !ruby/object:Gem::Version
|
417
421
|
version: '0'
|
418
422
|
requirements: []
|
419
|
-
rubygems_version: 3.2.
|
423
|
+
rubygems_version: 3.2.26
|
420
424
|
signing_key:
|
421
425
|
specification_version: 4
|
422
426
|
summary: EveOnline ESI API
|