eve_online 0.40.0 → 0.43.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/mdl.yml +19 -0
- data/.github/workflows/rspec.yml +36 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +21 -0
- data/.ruby-version +1 -1
- data/.standard.yml +1 -1
- data/Appraisals +8 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +78 -79
- data/LICENSE.txt +1 -1
- data/README.md +79 -5
- data/eve_online.gemspec +4 -6
- data/lib/eve_online/esi/base.rb +2 -3
- data/lib/eve_online/esi/character.rb +4 -4
- 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/version.rb +1 -1
- data/lib/eve_online.rb +3 -0
- metadata +12 -21
- data/.circleci/config.yml +0 -50
- data/.github/FUNDING.yml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78796cd52c312fba97cbc11ccf2d0c83f17cdfc366fc54ffcd55ce79b1286de6
|
4
|
+
data.tar.gz: cdc290ca3951773e4b94e93c18a2586a5abdd2aeb533e76193f1f4a8fe460513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5466b4eeb5d5d147dc876bc9aac6ea46d06a7ee658e56a5a1d0c8fc91c30bf219f2f14fcc592d1e78dcbb1ed652d8bb34c1aec8615c69900993ac2ec5ca09bc8
|
7
|
+
data.tar.gz: 4fa03e051b7633f439311c01cc5842dcd2a079f07fe5a61a4fe3afd2284e0dfd29b3319d2c072f8c423817254ec0ddab554a08118d5a7724ccec9b2c4f0b54fb
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: mdl
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
schedule:
|
11
|
+
- cron: "0 21 * * 6"
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
mdl:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- uses: actionshub/markdownlint@main
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: RSpec
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
schedule:
|
11
|
+
- cron: "0 21 * * 6"
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
rspec:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby:
|
20
|
+
- 2.7
|
21
|
+
- "3.0"
|
22
|
+
- 3.1
|
23
|
+
name: Ruby ${{ matrix.ruby }}
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- run: rm Gemfile.lock
|
27
|
+
- run: rm .ruby-version
|
28
|
+
- name: Set up Ruby
|
29
|
+
uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby }}
|
32
|
+
- run: bundle install --jobs 4 --retry 3
|
33
|
+
- run: bundle exec appraisal install || true
|
34
|
+
- run: bundle exec appraisal rake
|
35
|
+
- run: bundle exec standardrb
|
36
|
+
- run: bundle exec fasterer
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
SuggestExtensions: false
|
4
|
+
TargetRubyVersion: 2.7
|
5
|
+
|
6
|
+
Style/WordArray:
|
7
|
+
Enabled: true
|
8
|
+
EnforcedStyle: brackets
|
9
|
+
|
10
|
+
Style/StringLiterals:
|
11
|
+
Enabled: true
|
12
|
+
EnforcedStyle: double_quotes
|
13
|
+
|
14
|
+
Style/Documentation:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Gemspec/OrderedDependencies:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Bundler/OrderedGems:
|
21
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.1.2
|
data/.standard.yml
CHANGED
data/Appraisals
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
appraise "activesupport_52" do
|
2
4
|
gem "activesupport", "~> 5.2.0"
|
3
5
|
end
|
@@ -10,6 +12,12 @@ appraise "activesupport_61" do
|
|
10
12
|
gem "activesupport", "~> 6.1.0"
|
11
13
|
end
|
12
14
|
|
15
|
+
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new("3.0.0")
|
16
|
+
appraise "activesupport_70" do
|
17
|
+
gem "activesupport", "~> 7.0.0"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
13
21
|
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new("2.7.0")
|
14
22
|
appraise "activesupport_edge" do
|
15
23
|
gem "activesupport", git: "https://github.com/rails/rails", require: "activesupport", branch: "main"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.43.0
|
4
|
+
|
5
|
+
* Ruby 3.1.2
|
6
|
+
* Rails 7.0
|
7
|
+
* Drop Circle CI as CI
|
8
|
+
* Use GitHub Actions as CI
|
9
|
+
* Ruby 2.6 EOL
|
10
|
+
|
11
|
+
## v0.42.0
|
12
|
+
|
13
|
+
* Sync with new ESI
|
14
|
+
* Remove `EveOnline::ESI::Models::Character#ancestry_id`
|
15
|
+
* Remove `ancestry_id` from `EveOnline::ESI::Models::Character#as_json`
|
16
|
+
* Remove `EveOnline::ESI::Character#ancestry_id`
|
17
|
+
|
18
|
+
## v0.41.0
|
19
|
+
|
20
|
+
* Add `EveOnline::ESI::Search`
|
21
|
+
|
3
22
|
## v0.40.0
|
4
23
|
|
5
24
|
* Add `EveOnline::Formulas::TrainingRate`
|
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.43.0)
|
5
5
|
activesupport (>= 5.2.0)
|
6
6
|
faraday
|
7
7
|
faraday_middleware
|
@@ -9,137 +9,137 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
12
|
+
activesupport (7.0.2.4)
|
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
|
-
|
18
|
-
addressable (2.7.0)
|
17
|
+
addressable (2.8.0)
|
19
18
|
public_suffix (>= 2.0.2, < 5.0)
|
20
|
-
appraisal (2.4.
|
19
|
+
appraisal (2.4.1)
|
21
20
|
bundler
|
22
21
|
rake
|
23
22
|
thor (>= 0.14.0)
|
24
23
|
ast (2.4.2)
|
25
24
|
awesome_print (1.9.2)
|
26
|
-
chef-utils (16.11.7)
|
27
25
|
coderay (1.1.3)
|
28
26
|
colorize (0.8.1)
|
29
|
-
concurrent-ruby (1.1.
|
27
|
+
concurrent-ruby (1.1.10)
|
30
28
|
crack (0.4.5)
|
31
29
|
rexml
|
32
|
-
diff-lcs (1.
|
33
|
-
docile (1.
|
34
|
-
faraday (1.
|
30
|
+
diff-lcs (1.5.0)
|
31
|
+
docile (1.4.0)
|
32
|
+
faraday (1.10.0)
|
33
|
+
faraday-em_http (~> 1.0)
|
34
|
+
faraday-em_synchrony (~> 1.0)
|
35
|
+
faraday-excon (~> 1.1)
|
36
|
+
faraday-httpclient (~> 1.0)
|
37
|
+
faraday-multipart (~> 1.0)
|
35
38
|
faraday-net_http (~> 1.0)
|
39
|
+
faraday-net_http_persistent (~> 1.0)
|
40
|
+
faraday-patron (~> 1.0)
|
41
|
+
faraday-rack (~> 1.0)
|
42
|
+
faraday-retry (~> 1.0)
|
43
|
+
ruby2_keywords (>= 0.0.4)
|
44
|
+
faraday-em_http (1.0.0)
|
45
|
+
faraday-em_synchrony (1.0.0)
|
46
|
+
faraday-excon (1.1.0)
|
47
|
+
faraday-httpclient (1.0.1)
|
48
|
+
faraday-multipart (1.0.3)
|
36
49
|
multipart-post (>= 1.2, < 3)
|
37
|
-
ruby2_keywords
|
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-retry (1.0.3)
|
55
|
+
faraday_middleware (1.2.0)
|
40
56
|
faraday (~> 1.0)
|
41
|
-
fasterer (0.
|
57
|
+
fasterer (0.10.0)
|
42
58
|
colorize (~> 0.7)
|
43
|
-
ruby_parser (>= 3.
|
59
|
+
ruby_parser (>= 3.19.1)
|
44
60
|
hashdiff (1.0.1)
|
45
|
-
i18n (1.
|
61
|
+
i18n (1.10.0)
|
46
62
|
concurrent-ruby (~> 1.0)
|
47
|
-
kramdown (2.3.1)
|
48
|
-
rexml
|
49
|
-
kramdown-parser-gfm (1.1.0)
|
50
|
-
kramdown (~> 2.0)
|
51
|
-
mdl (0.11.0)
|
52
|
-
kramdown (~> 2.3)
|
53
|
-
kramdown-parser-gfm (~> 1.1)
|
54
|
-
mixlib-cli (~> 2.1, >= 2.1.1)
|
55
|
-
mixlib-config (>= 2.2.1, < 4)
|
56
|
-
mixlib-shellout
|
57
63
|
method_source (1.0.0)
|
58
|
-
mini_portile2 (2.
|
59
|
-
minitest (5.
|
60
|
-
mixlib-cli (2.1.8)
|
61
|
-
mixlib-config (3.0.9)
|
62
|
-
tomlrb
|
63
|
-
mixlib-shellout (3.2.5)
|
64
|
-
chef-utils
|
64
|
+
mini_portile2 (2.8.0)
|
65
|
+
minitest (5.15.0)
|
65
66
|
multipart-post (2.1.1)
|
66
|
-
nokogiri (1.
|
67
|
-
mini_portile2 (~> 2.
|
67
|
+
nokogiri (1.13.4)
|
68
|
+
mini_portile2 (~> 2.8.0)
|
68
69
|
racc (~> 1.4)
|
69
|
-
nokogiri (1.
|
70
|
+
nokogiri (1.13.4-x86_64-darwin)
|
70
71
|
racc (~> 1.4)
|
71
|
-
parallel (1.
|
72
|
-
parser (3.
|
72
|
+
parallel (1.22.1)
|
73
|
+
parser (3.1.2.0)
|
73
74
|
ast (~> 2.4.1)
|
74
|
-
pry (0.14.
|
75
|
+
pry (0.14.1)
|
75
76
|
coderay (~> 1.1)
|
76
77
|
method_source (~> 1.0)
|
77
|
-
public_suffix (4.0.
|
78
|
-
racc (1.
|
79
|
-
rainbow (3.
|
80
|
-
rake (13.0.
|
81
|
-
regexp_parser (2.
|
82
|
-
rexml (3.2.
|
83
|
-
rspec (3.
|
84
|
-
rspec-core (~> 3.
|
85
|
-
rspec-expectations (~> 3.
|
86
|
-
rspec-mocks (~> 3.
|
87
|
-
rspec-core (3.
|
88
|
-
rspec-support (~> 3.
|
89
|
-
rspec-expectations (3.
|
78
|
+
public_suffix (4.0.7)
|
79
|
+
racc (1.6.0)
|
80
|
+
rainbow (3.1.1)
|
81
|
+
rake (13.0.6)
|
82
|
+
regexp_parser (2.3.1)
|
83
|
+
rexml (3.2.5)
|
84
|
+
rspec (3.11.0)
|
85
|
+
rspec-core (~> 3.11.0)
|
86
|
+
rspec-expectations (~> 3.11.0)
|
87
|
+
rspec-mocks (~> 3.11.0)
|
88
|
+
rspec-core (3.11.0)
|
89
|
+
rspec-support (~> 3.11.0)
|
90
|
+
rspec-expectations (3.11.0)
|
90
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
91
|
-
rspec-support (~> 3.
|
92
|
+
rspec-support (~> 3.11.0)
|
92
93
|
rspec-its (1.3.0)
|
93
94
|
rspec-core (>= 3.0.0)
|
94
95
|
rspec-expectations (>= 3.0.0)
|
95
|
-
rspec-mocks (3.
|
96
|
+
rspec-mocks (3.11.1)
|
96
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
-
rspec-support (~> 3.
|
98
|
-
rspec-support (3.
|
99
|
-
rubocop (1.
|
98
|
+
rspec-support (~> 3.11.0)
|
99
|
+
rspec-support (3.11.0)
|
100
|
+
rubocop (1.28.2)
|
100
101
|
parallel (~> 1.10)
|
101
|
-
parser (>= 3.
|
102
|
+
parser (>= 3.1.0.0)
|
102
103
|
rainbow (>= 2.2.2, < 4.0)
|
103
104
|
regexp_parser (>= 1.8, < 3.0)
|
104
105
|
rexml
|
105
|
-
rubocop-ast (>= 1.
|
106
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
106
107
|
ruby-progressbar (~> 1.7)
|
107
108
|
unicode-display_width (>= 1.4.0, < 3.0)
|
108
|
-
rubocop-ast (1.
|
109
|
-
parser (>=
|
110
|
-
rubocop-performance (1.
|
111
|
-
rubocop (>=
|
109
|
+
rubocop-ast (1.17.0)
|
110
|
+
parser (>= 3.1.1.0)
|
111
|
+
rubocop-performance (1.13.3)
|
112
|
+
rubocop (>= 1.7.0, < 2.0)
|
112
113
|
rubocop-ast (>= 0.4.0)
|
113
114
|
ruby-progressbar (1.11.0)
|
114
|
-
ruby2_keywords (0.0.
|
115
|
-
ruby_parser (3.
|
116
|
-
sexp_processor (~> 4.
|
117
|
-
sexp_processor (4.
|
115
|
+
ruby2_keywords (0.0.5)
|
116
|
+
ruby_parser (3.19.1)
|
117
|
+
sexp_processor (~> 4.16)
|
118
|
+
sexp_processor (4.16.1)
|
118
119
|
simplecov (0.21.2)
|
119
120
|
docile (~> 1.1)
|
120
121
|
simplecov-html (~> 0.11)
|
121
122
|
simplecov_json_formatter (~> 0.1)
|
122
123
|
simplecov-html (0.12.3)
|
123
|
-
simplecov_json_formatter (0.1.
|
124
|
-
standard (1.0
|
125
|
-
rubocop (= 1.
|
126
|
-
rubocop-performance (= 1.
|
127
|
-
thor (1.1
|
128
|
-
tomlrb (2.0.1)
|
124
|
+
simplecov_json_formatter (0.1.4)
|
125
|
+
standard (1.11.0)
|
126
|
+
rubocop (= 1.28.2)
|
127
|
+
rubocop-performance (= 1.13.3)
|
128
|
+
thor (1.2.1)
|
129
129
|
tzinfo (2.0.4)
|
130
130
|
concurrent-ruby (~> 1.0)
|
131
|
-
unicode-display_width (2.
|
132
|
-
vcr (6.
|
133
|
-
webmock (3.
|
134
|
-
addressable (>= 2.
|
131
|
+
unicode-display_width (2.1.0)
|
132
|
+
vcr (6.1.0)
|
133
|
+
webmock (3.14.0)
|
134
|
+
addressable (>= 2.8.0)
|
135
135
|
crack (>= 0.3.2)
|
136
136
|
hashdiff (>= 0.4.0, < 2.0.0)
|
137
|
-
zeitwerk (2.4.2)
|
138
137
|
|
139
138
|
PLATFORMS
|
140
139
|
ruby
|
141
140
|
x86_64-darwin-19
|
142
141
|
x86_64-darwin-20
|
142
|
+
x86_64-darwin-21
|
143
143
|
|
144
144
|
DEPENDENCIES
|
145
145
|
appraisal
|
@@ -147,7 +147,6 @@ DEPENDENCIES
|
|
147
147
|
bundler
|
148
148
|
eve_online!
|
149
149
|
fasterer
|
150
|
-
mdl
|
151
150
|
nokogiri
|
152
151
|
pry
|
153
152
|
rake
|
@@ -159,4 +158,4 @@ DEPENDENCIES
|
|
159
158
|
webmock
|
160
159
|
|
161
160
|
BUNDLED WITH
|
162
|
-
2.
|
161
|
+
2.3.12
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# EveOnline ESI API
|
2
2
|
|
3
|
-
[![CircleCI](https://circleci.com/gh/evemonk/eve_online.svg?style=svg)](https://circleci.com/gh/evemonk/eve_online)
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/eve_online.svg)](https://badge.fury.io/rb/eve_online)
|
5
4
|
[![Gem Downloads](https://img.shields.io/gem/dt/eve_online.svg)](https://rubygems.org/gems/eve_online)
|
6
5
|
[![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/
|
6
|
+
[![security](https://hakiri.io/github/evemonk/eve_online/main.svg)](https://hakiri.io/github/evemonk/eve_online/main)
|
8
7
|
[![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/evemonk/eve_online/?ref=repository-badge)
|
9
8
|
[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
|
10
9
|
|
@@ -50,15 +49,16 @@ gem install eve_online
|
|
50
49
|
|
51
50
|
## Supported ruby versions
|
52
51
|
|
53
|
-
* MRI 2.6
|
54
52
|
* MRI 2.7
|
55
53
|
* MRI 3.0
|
54
|
+
* MRI 3.1
|
56
55
|
|
57
56
|
## Supported rails versions
|
58
57
|
|
59
58
|
* 5.2
|
60
59
|
* 6.0
|
61
60
|
* 6.1
|
61
|
+
* 7.0
|
62
62
|
* Edge
|
63
63
|
|
64
64
|
## Usage examples
|
@@ -414,7 +414,6 @@ character = EveOnline::ESI::Character.new(options)
|
|
414
414
|
character.scope # => nil
|
415
415
|
|
416
416
|
character.as_json # => {:alliance_id=>12345678,
|
417
|
-
# :ancestry_id=>24,
|
418
417
|
# :birthday=>Fri, 15 Jan 2010 15:26:00 UTC +00:00,
|
419
418
|
# :bloodline_id=>4,
|
420
419
|
# :corporation_id=>1000168,
|
@@ -427,7 +426,6 @@ character.as_json # => {:alliance_id=>12345678,
|
|
427
426
|
# :title=>nil}
|
428
427
|
|
429
428
|
character.alliance_id # => 12345678
|
430
|
-
character.ancestry_id # => 24
|
431
429
|
character.birthday # => Fri, 15 Jan 2010 15:26:00 UTC +00:00
|
432
430
|
character.bloodline_id # => 4
|
433
431
|
character.corporation_id # => 1000168
|
@@ -1898,6 +1896,81 @@ market_prices.etag # => "2d5acc3bd4555821bb91d787596f5ddad129f849739e83162e93c02
|
|
1898
1896
|
|
1899
1897
|
#### Search on a string
|
1900
1898
|
|
1899
|
+
```ruby
|
1900
|
+
# simple search
|
1901
|
+
|
1902
|
+
options = { search: "Jita" }
|
1903
|
+
|
1904
|
+
search = EveOnline::ESI::Search.new(options)
|
1905
|
+
|
1906
|
+
search.as_json # => {:agent_ids=>[3018357],
|
1907
|
+
# :alliance_ids=>[99011026, 99005382, 99010662, 99010663, 99010665, 99010666],
|
1908
|
+
# :character_ids=>[2118081143, ... 2114943117],
|
1909
|
+
# :constellation_ids=>[],
|
1910
|
+
# :corporation_ids=>[],
|
1911
|
+
# :faction_ids=>[],
|
1912
|
+
# :inventory_type_ids=>[56844, 56847, 56846, 56853, 56849, 56852, 56850, 52275, 56848, 56851, 56845],
|
1913
|
+
# :region_ids=>[],
|
1914
|
+
# :solar_system_ids=>[30000142],
|
1915
|
+
# :station_ids=>[]}
|
1916
|
+
|
1917
|
+
search.agent_ids # => [3018357]
|
1918
|
+
search.alliance_ids # => [99011026, 99005382, 99010662, 99010663, 99010665, 99010666]
|
1919
|
+
search.character_ids.size # => 467
|
1920
|
+
search.character_ids.first # => 2118081143
|
1921
|
+
search.constellation_ids # => []
|
1922
|
+
search.corporation_ids # => []
|
1923
|
+
search.faction_ids # => []
|
1924
|
+
search.inventory_type_ids # => [56844, 56847, 56846, 56853, 56849, 56852, 56850, 52275, 56848, 56851, 56845]
|
1925
|
+
search.region_ids # => []
|
1926
|
+
search.solar_system_ids # => [30000142]
|
1927
|
+
search.station_ids # => []
|
1928
|
+
|
1929
|
+
search.etag # => "b6602e595e8d8df37b5191b82e75faba91284281b6fe71965d09e2f1"
|
1930
|
+
|
1931
|
+
# strict search
|
1932
|
+
|
1933
|
+
options = { search: "Jita", strict: true }
|
1934
|
+
|
1935
|
+
search = EveOnline::ESI::Search.new(options)
|
1936
|
+
|
1937
|
+
search.as_json # => {:agent_ids=>[],
|
1938
|
+
# :alliance_ids=>[99005382],
|
1939
|
+
# :character_ids=>[1392050776],
|
1940
|
+
# :constellation_ids=>[],
|
1941
|
+
# :corporation_ids=>[98004200, 98049474, 383768304, 98358437],
|
1942
|
+
# :faction_ids=>[],
|
1943
|
+
# :inventory_type_ids=>[],
|
1944
|
+
# :region_ids=>[],
|
1945
|
+
# :solar_system_ids=>[30000142],
|
1946
|
+
# :station_ids=>[]}
|
1947
|
+
|
1948
|
+
# strict search with filter by categories
|
1949
|
+
|
1950
|
+
# List of default categories (used when categories is empty):
|
1951
|
+
# ["agent", "alliance", "character", "constellation", "corporation", "faction",
|
1952
|
+
# "inventory_type", "region", "solar_system", "station"]
|
1953
|
+
|
1954
|
+
# So, add `categories: ['solar_system']` and see:
|
1955
|
+
|
1956
|
+
options = { search: "Jita", categories: ["solar_system"], strict: true }
|
1957
|
+
|
1958
|
+
search = EveOnline::ESI::Search.new(options)
|
1959
|
+
|
1960
|
+
search.as_json # => {:agent_ids=>[],
|
1961
|
+
# :alliance_ids=>[],
|
1962
|
+
# :character_ids=>[],
|
1963
|
+
# :constellation_ids=>[],
|
1964
|
+
# :corporation_ids=>[],
|
1965
|
+
# :faction_ids=>[],
|
1966
|
+
# :inventory_type_ids=>[],
|
1967
|
+
# :region_ids=>[],
|
1968
|
+
# :solar_system_ids=>[30000142],
|
1969
|
+
# :station_ids=>[]}
|
1970
|
+
|
1971
|
+
search.solar_system_ids # => [30000142]
|
1972
|
+
```
|
1973
|
+
|
1901
1974
|
### Skills
|
1902
1975
|
|
1903
1976
|
#### Get character attributes
|
@@ -3210,6 +3283,7 @@ Thank you everyone!
|
|
3210
3283
|
* Ian Flynn (@monban)
|
3211
3284
|
* Mekaret Eriker (@Mekaret)
|
3212
3285
|
* Y. (@lunohodov)
|
3286
|
+
* Trevor Copeland (@sicks)
|
3213
3287
|
|
3214
3288
|
## License
|
3215
3289
|
|
data/eve_online.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require "eve_online/version"
|
3
|
+
require_relative "lib/eve_online/version"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = "eve_online"
|
@@ -16,9 +14,10 @@ Gem::Specification.new do |spec|
|
|
16
14
|
spec.license = "MIT"
|
17
15
|
|
18
16
|
spec.metadata = {
|
17
|
+
"rubygems_mfa_required" => "true",
|
19
18
|
"bug_tracker_uri" => "https://github.com/evemonk/eve_online/issues",
|
20
|
-
"changelog_uri" => "https://github.com/evemonk/eve_online/blob/
|
21
|
-
"documentation_uri" => "https://github.com/evemonk/eve_online/blob/
|
19
|
+
"changelog_uri" => "https://github.com/evemonk/eve_online/blob/main/CHANGELOG.md",
|
20
|
+
"documentation_uri" => "https://github.com/evemonk/eve_online/blob/main/README.md",
|
22
21
|
"homepage_uri" => "https://github.com/evemonk/eve_online",
|
23
22
|
"source_code_uri" => "https://github.com/evemonk/eve_online"
|
24
23
|
}
|
@@ -35,7 +34,6 @@ Gem::Specification.new do |spec|
|
|
35
34
|
spec.add_development_dependency "simplecov"
|
36
35
|
spec.add_development_dependency "webmock"
|
37
36
|
spec.add_development_dependency "vcr"
|
38
|
-
spec.add_development_dependency "mdl"
|
39
37
|
spec.add_development_dependency "appraisal"
|
40
38
|
|
41
39
|
spec.add_runtime_dependency "faraday"
|
data/lib/eve_online/esi/base.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "faraday"
|
4
4
|
require "faraday_middleware"
|
5
5
|
require "active_support/time"
|
6
|
+
require "active_support/core_ext/object/blank"
|
6
7
|
|
7
8
|
module EveOnline
|
8
9
|
module ESI
|
@@ -113,8 +114,6 @@ module EveOnline
|
|
113
114
|
f.use middleware[:class]
|
114
115
|
end
|
115
116
|
end
|
116
|
-
# f.use Faraday::Response::Logger
|
117
|
-
# f.use FaradayMiddleware::FollowRedirects, limit: 5
|
118
117
|
f.response :json, content_type: "application/json"
|
119
118
|
f.adapter adapter
|
120
119
|
end
|
@@ -147,7 +146,7 @@ module EveOnline
|
|
147
146
|
hash[param] = public_send(param)
|
148
147
|
end
|
149
148
|
|
150
|
-
hash.reject { |_, v| v.
|
149
|
+
hash.reject { |_, v| v.nil? || v == "" }
|
151
150
|
end
|
152
151
|
|
153
152
|
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
|
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"
|
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.43.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:
|
11
|
+
date: 2022-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: mdl
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: appraisal
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,12 +171,14 @@ executables: []
|
|
185
171
|
extensions: []
|
186
172
|
extra_rdoc_files: []
|
187
173
|
files:
|
188
|
-
- ".circleci/config.yml"
|
189
174
|
- ".deepsource.toml"
|
190
175
|
- ".fasterer.yml"
|
191
|
-
- ".github/
|
176
|
+
- ".github/dependabot.yml"
|
177
|
+
- ".github/workflows/mdl.yml"
|
178
|
+
- ".github/workflows/rspec.yml"
|
192
179
|
- ".gitignore"
|
193
180
|
- ".mdlrc"
|
181
|
+
- ".rubocop.yml"
|
194
182
|
- ".ruby-version"
|
195
183
|
- ".standard.yml"
|
196
184
|
- Appraisals
|
@@ -330,6 +318,7 @@ files:
|
|
330
318
|
- lib/eve_online/esi/models/public_contract_item.rb
|
331
319
|
- lib/eve_online/esi/models/race.rb
|
332
320
|
- lib/eve_online/esi/models/region.rb
|
321
|
+
- lib/eve_online/esi/models/search.rb
|
333
322
|
- lib/eve_online/esi/models/server_status.rb
|
334
323
|
- lib/eve_online/esi/models/skill.rb
|
335
324
|
- lib/eve_online/esi/models/skill_queue_entry.rb
|
@@ -346,6 +335,7 @@ files:
|
|
346
335
|
- lib/eve_online/esi/models/war.rb
|
347
336
|
- lib/eve_online/esi/public_contract.rb
|
348
337
|
- lib/eve_online/esi/public_contracts.rb
|
338
|
+
- lib/eve_online/esi/search.rb
|
349
339
|
- lib/eve_online/esi/server_status.rb
|
350
340
|
- lib/eve_online/esi/universe_ancestries.rb
|
351
341
|
- lib/eve_online/esi/universe_asteroid_belt.rb
|
@@ -396,9 +386,10 @@ homepage: https://github.com/evemonk/eve_online
|
|
396
386
|
licenses:
|
397
387
|
- MIT
|
398
388
|
metadata:
|
389
|
+
rubygems_mfa_required: 'true'
|
399
390
|
bug_tracker_uri: https://github.com/evemonk/eve_online/issues
|
400
|
-
changelog_uri: https://github.com/evemonk/eve_online/blob/
|
401
|
-
documentation_uri: https://github.com/evemonk/eve_online/blob/
|
391
|
+
changelog_uri: https://github.com/evemonk/eve_online/blob/main/CHANGELOG.md
|
392
|
+
documentation_uri: https://github.com/evemonk/eve_online/blob/main/README.md
|
402
393
|
homepage_uri: https://github.com/evemonk/eve_online
|
403
394
|
source_code_uri: https://github.com/evemonk/eve_online
|
404
395
|
post_install_message:
|
@@ -416,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
416
407
|
- !ruby/object:Gem::Version
|
417
408
|
version: '0'
|
418
409
|
requirements: []
|
419
|
-
rubygems_version: 3.
|
410
|
+
rubygems_version: 3.3.12
|
420
411
|
signing_key:
|
421
412
|
specification_version: 4
|
422
413
|
summary: EveOnline ESI API
|
data/.circleci/config.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
|
3
|
-
jobs:
|
4
|
-
ruby-2.6.6:
|
5
|
-
docker:
|
6
|
-
- image: circleci/ruby:2.6.6
|
7
|
-
steps:
|
8
|
-
- checkout
|
9
|
-
- run: rm Gemfile.lock
|
10
|
-
- run: rm .ruby-version
|
11
|
-
- run: bundle install
|
12
|
-
- run: bundle exec appraisal install || true
|
13
|
-
- run: bundle exec appraisal rake
|
14
|
-
- run: bundle exec standardrb
|
15
|
-
- run: bundle exec fasterer
|
16
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
17
|
-
ruby-2.7.2:
|
18
|
-
docker:
|
19
|
-
- image: circleci/ruby:2.7.2
|
20
|
-
steps:
|
21
|
-
- checkout
|
22
|
-
- run: rm Gemfile.lock
|
23
|
-
- run: rm .ruby-version
|
24
|
-
- run: bundle install
|
25
|
-
- run: bundle exec appraisal install || true
|
26
|
-
- run: bundle exec appraisal rake
|
27
|
-
- run: bundle exec standardrb
|
28
|
-
- run: bundle exec fasterer
|
29
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
30
|
-
ruby-3.0.0:
|
31
|
-
docker:
|
32
|
-
- image: circleci/ruby:3.0.0
|
33
|
-
steps:
|
34
|
-
- checkout
|
35
|
-
- run: rm Gemfile.lock
|
36
|
-
- run: rm .ruby-version
|
37
|
-
- run: bundle install
|
38
|
-
- run: bundle exec appraisal install || true
|
39
|
-
- run: bundle exec appraisal rake
|
40
|
-
- run: bundle exec standardrb
|
41
|
-
- run: bundle exec fasterer
|
42
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
43
|
-
|
44
|
-
workflows:
|
45
|
-
version: 2
|
46
|
-
tests:
|
47
|
-
jobs:
|
48
|
-
- ruby-2.6.6
|
49
|
-
- ruby-2.7.2
|
50
|
-
- ruby-3.0.0
|
data/.github/FUNDING.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
github: biow0lf
|