eve_online 0.32.0 → 0.36.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 +0 -15
- data/.deepsource.toml +5 -0
- data/CHANGELOG.md +25 -0
- data/Gemfile.lock +47 -39
- data/Gemfile.mutant.lock +35 -29
- data/README.md +108 -4
- data/eve_online.gemspec +1 -1
- data/lib/eve_online.rb +12 -0
- data/lib/eve_online/esi/character_calendar.rb +1 -1
- data/lib/eve_online/esi/character_calendar_event.rb +1 -1
- data/lib/eve_online/esi/character_location.rb +1 -1
- data/lib/eve_online/esi/character_online.rb +1 -1
- data/lib/eve_online/esi/character_ship.rb +1 -1
- data/lib/eve_online/esi/corporation_members.rb +29 -0
- data/lib/eve_online/esi/models/public_contract.rb +98 -0
- data/lib/eve_online/esi/models/public_contract_item.rb +59 -0
- data/lib/eve_online/esi/models/race.rb +2 -2
- data/lib/eve_online/esi/public_contract.rb +40 -0
- data/lib/eve_online/esi/public_contracts.rb +40 -0
- data/lib/eve_online/exceptions/error_limited.rb +8 -0
- data/lib/eve_online/version.rb +1 -1
- metadata +15 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea744697f6be18627f2e0e4d74b6610bc7ad4f8a69fc8aef52ea0cfbe6ab77d7
|
4
|
+
data.tar.gz: 9019ee5be2147bbd0e6a5c2736906bde31241406882d64ce928a113b2489d704
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0645c8fe9df0fb9519f8d1c85d45de0b751ee6fad5474c30f4130faada392798c0d906e69d0a36b5291d99c53df3018433b3b5b69049281b056d0605a47cf57f
|
7
|
+
data.tar.gz: fb5aa10688942214ea9fc9cafa6c150e064d65f500a475a90fae9a0eea1a3394c19cf42c0e89e2e834ad93ef8e4e506fb45821602e2ef53a78ce9f17a2b82b1c
|
data/.circleci/config.yml
CHANGED
@@ -37,26 +37,11 @@ jobs:
|
|
37
37
|
- run: bundle exec appraisal rake
|
38
38
|
- run: bundle exec standardrb
|
39
39
|
- run: bundle exec mdl README.md CHANGELOG.md TODO.md
|
40
|
-
jruby-9.2.11.1:
|
41
|
-
docker:
|
42
|
-
- image: circleci/jruby:9.2.11.1
|
43
|
-
environment:
|
44
|
-
JRUBY_OPTS: "--debug -J-Xmn1024m -J-Xms2048m -J-Xmx2048m"
|
45
|
-
steps:
|
46
|
-
- checkout
|
47
|
-
- run: rm Gemfile.lock
|
48
|
-
- run: rm .ruby-version
|
49
|
-
- run: bundle install
|
50
|
-
- run: bundle exec appraisal install || true
|
51
|
-
- run: bundle exec appraisal rake
|
52
|
-
- run: bundle exec standardrb
|
53
|
-
- run: bundle exec mdl README.md CHANGELOG.md TODO.md
|
54
40
|
|
55
41
|
workflows:
|
56
42
|
version: 2
|
57
43
|
tests:
|
58
44
|
jobs:
|
59
|
-
- jruby-9.2.11.1
|
60
45
|
- ruby-2.5.8
|
61
46
|
- ruby-2.6.6
|
62
47
|
- ruby-2.7.1
|
data/.deepsource.toml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.36.0
|
4
|
+
|
5
|
+
* Drop JRuby support
|
6
|
+
* Add `EveOnline::ESI::CorporationMembers`
|
7
|
+
|
8
|
+
## v0.35.1
|
9
|
+
|
10
|
+
* Rename `EveOnline::ESI::Models::PublicContract#type` to `#kind`. Fix Rails STI.
|
11
|
+
|
12
|
+
## v0.35.0
|
13
|
+
|
14
|
+
* Add `EveOnline::ESI::PublicContracts`
|
15
|
+
* Add `EveOnline::ESI::Models::PublicContract`
|
16
|
+
* Add `EveOnline::ESI::Models::PublicContractItem`
|
17
|
+
* Add `EveOnline::ESI::PublicContract`
|
18
|
+
|
19
|
+
## v0.34.0
|
20
|
+
|
21
|
+
* Rename `EveOnline::ESI::Models::Race#alliance_id` to `#faction_id`. [Fix esi issue 812](https://github.com/esi/esi-issues/issues/812).
|
22
|
+
|
23
|
+
## v0.33.0
|
24
|
+
|
25
|
+
* Sync with new ESI API
|
26
|
+
* Add `EveOnline::Exceptions::ErrorLimited`
|
27
|
+
|
3
28
|
## v0.32.0
|
4
29
|
|
5
30
|
* Sync with new ESI API
|
data/Gemfile.lock
CHANGED
@@ -1,73 +1,78 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eve_online (0.
|
5
|
-
activesupport (>=
|
4
|
+
eve_online (0.36.0)
|
5
|
+
activesupport (>= 5.2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (6.0.
|
10
|
+
activesupport (6.0.3.2)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 0.7, < 2)
|
13
13
|
minitest (~> 5.1)
|
14
14
|
tzinfo (~> 1.1)
|
15
|
-
zeitwerk (~> 2.2)
|
15
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
16
16
|
addressable (2.7.0)
|
17
17
|
public_suffix (>= 2.0.2, < 5.0)
|
18
|
-
appraisal (2.
|
18
|
+
appraisal (2.3.0)
|
19
19
|
bundler
|
20
20
|
rake
|
21
21
|
thor (>= 0.14.0)
|
22
|
-
ast (2.4.
|
22
|
+
ast (2.4.1)
|
23
23
|
awesome_print (1.8.0)
|
24
|
-
|
24
|
+
chef-utils (16.4.41)
|
25
|
+
coderay (1.1.3)
|
25
26
|
colorize (0.8.1)
|
26
|
-
concurrent-ruby (1.1.
|
27
|
+
concurrent-ruby (1.1.7)
|
27
28
|
crack (0.4.3)
|
28
29
|
safe_yaml (~> 1.0.0)
|
29
|
-
diff-lcs (1.
|
30
|
+
diff-lcs (1.4.4)
|
30
31
|
docile (1.3.2)
|
31
32
|
fasterer (0.8.3)
|
32
33
|
colorize (~> 0.7)
|
33
34
|
ruby_parser (>= 3.14.1)
|
34
35
|
hashdiff (1.0.1)
|
35
|
-
i18n (1.8.
|
36
|
+
i18n (1.8.5)
|
36
37
|
concurrent-ruby (~> 1.0)
|
37
|
-
|
38
|
-
|
38
|
+
kramdown (2.3.0)
|
39
|
+
rexml
|
39
40
|
kramdown-parser-gfm (1.1.0)
|
40
41
|
kramdown (~> 2.0)
|
41
|
-
mdl (0.
|
42
|
-
kramdown (~> 2.
|
43
|
-
kramdown-parser-gfm (~> 1.
|
42
|
+
mdl (0.10.0)
|
43
|
+
kramdown (~> 2.3)
|
44
|
+
kramdown-parser-gfm (~> 1.1)
|
44
45
|
mixlib-cli (~> 2.1, >= 2.1.1)
|
45
46
|
mixlib-config (>= 2.2.1, < 4)
|
47
|
+
mixlib-shellout
|
46
48
|
method_source (1.0.0)
|
47
49
|
mini_portile2 (2.4.0)
|
48
|
-
minitest (5.14.
|
49
|
-
mixlib-cli (2.1.
|
50
|
-
mixlib-config (3.0.
|
50
|
+
minitest (5.14.1)
|
51
|
+
mixlib-cli (2.1.8)
|
52
|
+
mixlib-config (3.0.9)
|
51
53
|
tomlrb
|
52
|
-
|
54
|
+
mixlib-shellout (3.1.4)
|
55
|
+
chef-utils
|
56
|
+
nokogiri (1.10.10)
|
53
57
|
mini_portile2 (~> 2.4.0)
|
54
|
-
parallel (1.19.
|
55
|
-
parser (2.7.1.
|
56
|
-
ast (~> 2.4.
|
58
|
+
parallel (1.19.2)
|
59
|
+
parser (2.7.1.4)
|
60
|
+
ast (~> 2.4.1)
|
57
61
|
pry (0.13.1)
|
58
62
|
coderay (~> 1.1)
|
59
63
|
method_source (~> 1.0)
|
60
|
-
public_suffix (4.0.
|
64
|
+
public_suffix (4.0.5)
|
61
65
|
rainbow (3.0.0)
|
62
66
|
rake (13.0.1)
|
67
|
+
regexp_parser (1.7.1)
|
63
68
|
rexml (3.2.4)
|
64
69
|
rspec (3.9.0)
|
65
70
|
rspec-core (~> 3.9.0)
|
66
71
|
rspec-expectations (~> 3.9.0)
|
67
72
|
rspec-mocks (~> 3.9.0)
|
68
|
-
rspec-core (3.9.
|
69
|
-
rspec-support (~> 3.9.
|
70
|
-
rspec-expectations (3.9.
|
73
|
+
rspec-core (3.9.2)
|
74
|
+
rspec-support (~> 3.9.3)
|
75
|
+
rspec-expectations (3.9.2)
|
71
76
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
77
|
rspec-support (~> 3.9.0)
|
73
78
|
rspec-its (1.3.0)
|
@@ -76,41 +81,44 @@ GEM
|
|
76
81
|
rspec-mocks (3.9.1)
|
77
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
78
83
|
rspec-support (~> 3.9.0)
|
79
|
-
rspec-support (3.9.
|
80
|
-
rubocop (0.
|
81
|
-
jaro_winkler (~> 1.5.1)
|
84
|
+
rspec-support (3.9.3)
|
85
|
+
rubocop (0.85.1)
|
82
86
|
parallel (~> 1.10)
|
83
87
|
parser (>= 2.7.0.1)
|
84
88
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
+
regexp_parser (>= 1.7)
|
85
90
|
rexml
|
91
|
+
rubocop-ast (>= 0.0.3)
|
86
92
|
ruby-progressbar (~> 1.7)
|
87
|
-
unicode-display_width (>= 1.4.0, <
|
88
|
-
rubocop-
|
93
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
94
|
+
rubocop-ast (0.3.0)
|
95
|
+
parser (>= 2.7.1.4)
|
96
|
+
rubocop-performance (1.6.1)
|
89
97
|
rubocop (>= 0.71.0)
|
90
98
|
ruby-progressbar (1.10.1)
|
91
99
|
ruby_parser (3.14.2)
|
92
100
|
sexp_processor (~> 4.9)
|
93
101
|
safe_yaml (1.0.5)
|
94
|
-
sexp_processor (4.
|
95
|
-
simplecov (0.
|
102
|
+
sexp_processor (4.15.0)
|
103
|
+
simplecov (0.19.0)
|
96
104
|
docile (~> 1.1)
|
97
105
|
simplecov-html (~> 0.11)
|
98
106
|
simplecov-html (0.12.2)
|
99
|
-
standard (0.
|
100
|
-
rubocop (~> 0.
|
101
|
-
rubocop-performance (~> 1.
|
107
|
+
standard (0.4.7)
|
108
|
+
rubocop (~> 0.85.0)
|
109
|
+
rubocop-performance (~> 1.6.0)
|
102
110
|
thor (1.0.1)
|
103
111
|
thread_safe (0.3.6)
|
104
112
|
tomlrb (1.3.0)
|
105
113
|
tzinfo (1.2.7)
|
106
114
|
thread_safe (~> 0.1)
|
107
|
-
unicode-display_width (1.
|
108
|
-
vcr (
|
115
|
+
unicode-display_width (1.7.0)
|
116
|
+
vcr (6.0.0)
|
109
117
|
webmock (3.8.3)
|
110
118
|
addressable (>= 2.3.6)
|
111
119
|
crack (>= 0.3.2)
|
112
120
|
hashdiff (>= 0.4.0, < 2.0.0)
|
113
|
-
zeitwerk (2.
|
121
|
+
zeitwerk (2.4.0)
|
114
122
|
|
115
123
|
PLATFORMS
|
116
124
|
ruby
|
data/Gemfile.mutant.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eve_online (0.
|
5
|
-
activesupport (>=
|
4
|
+
eve_online (0.36.0)
|
5
|
+
activesupport (>= 5.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 (6.0.
|
11
|
+
activesupport (6.0.3.2)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (>= 0.7, < 2)
|
14
14
|
minitest (~> 5.1)
|
15
15
|
tzinfo (~> 1.1)
|
16
|
-
zeitwerk (~> 2.2)
|
16
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
17
17
|
adamantium (0.2.0)
|
18
18
|
ice_nine (~> 0.11.0)
|
19
19
|
memoizable (~> 0.4.0)
|
@@ -23,39 +23,44 @@ GEM
|
|
23
23
|
abstract_type (~> 0.0.7)
|
24
24
|
adamantium (~> 0.2)
|
25
25
|
equalizer (~> 0.0.11)
|
26
|
-
appraisal (2.
|
26
|
+
appraisal (2.3.0)
|
27
27
|
bundler
|
28
28
|
rake
|
29
29
|
thor (>= 0.14.0)
|
30
|
-
ast (2.4.
|
30
|
+
ast (2.4.1)
|
31
|
+
chef-utils (16.4.41)
|
31
32
|
concord (0.1.5)
|
32
33
|
adamantium (~> 0.2.0)
|
33
34
|
equalizer (~> 0.0.9)
|
34
|
-
concurrent-ruby (1.1.
|
35
|
+
concurrent-ruby (1.1.7)
|
35
36
|
crack (0.4.3)
|
36
37
|
safe_yaml (~> 1.0.0)
|
37
38
|
diff-lcs (1.3)
|
38
39
|
docile (1.3.2)
|
39
40
|
equalizer (0.0.11)
|
40
41
|
hashdiff (1.0.1)
|
41
|
-
i18n (1.8.
|
42
|
+
i18n (1.8.5)
|
42
43
|
concurrent-ruby (~> 1.0)
|
43
44
|
ice_nine (0.11.2)
|
44
|
-
kramdown (2.
|
45
|
+
kramdown (2.3.0)
|
46
|
+
rexml
|
45
47
|
kramdown-parser-gfm (1.1.0)
|
46
48
|
kramdown (~> 2.0)
|
47
|
-
mdl (0.
|
48
|
-
kramdown (~> 2.
|
49
|
-
kramdown-parser-gfm (~> 1.
|
49
|
+
mdl (0.10.0)
|
50
|
+
kramdown (~> 2.3)
|
51
|
+
kramdown-parser-gfm (~> 1.1)
|
50
52
|
mixlib-cli (~> 2.1, >= 2.1.1)
|
51
53
|
mixlib-config (>= 2.2.1, < 4)
|
54
|
+
mixlib-shellout
|
52
55
|
memoizable (0.4.2)
|
53
56
|
thread_safe (~> 0.3, >= 0.3.1)
|
54
57
|
mini_portile2 (2.4.0)
|
55
|
-
minitest (5.14.
|
56
|
-
mixlib-cli (2.1.
|
57
|
-
mixlib-config (3.0.
|
58
|
+
minitest (5.14.1)
|
59
|
+
mixlib-cli (2.1.8)
|
60
|
+
mixlib-config (3.0.9)
|
58
61
|
tomlrb
|
62
|
+
mixlib-shellout (3.1.4)
|
63
|
+
chef-utils
|
59
64
|
mprelude (0.1.0)
|
60
65
|
abstract_type (~> 0.0.7)
|
61
66
|
adamantium (~> 0.2.0)
|
@@ -63,38 +68,39 @@ GEM
|
|
63
68
|
equalizer (~> 0.0.9)
|
64
69
|
ice_nine (~> 0.11.1)
|
65
70
|
procto (~> 0.0.2)
|
66
|
-
mutant (0.9.
|
71
|
+
mutant (0.9.8)
|
67
72
|
abstract_type (~> 0.0.7)
|
68
73
|
adamantium (~> 0.2.0)
|
69
74
|
anima (~> 0.3.1)
|
70
75
|
ast (~> 2.2)
|
71
76
|
concord (~> 0.1.5)
|
72
|
-
diff-lcs (
|
77
|
+
diff-lcs (= 1.3)
|
73
78
|
equalizer (~> 0.0.9)
|
74
79
|
ice_nine (~> 0.11.1)
|
75
80
|
memoizable (~> 0.4.2)
|
76
81
|
mprelude (~> 0.1.0)
|
77
|
-
parser (~> 2.7.
|
82
|
+
parser (~> 2.7.1)
|
78
83
|
procto (~> 0.0.2)
|
79
84
|
unparser (~> 0.4.6)
|
80
85
|
variable (~> 0.0.1)
|
81
86
|
mutant-rspec (0.9.5)
|
82
87
|
mutant (~> 0.9.5)
|
83
88
|
rspec-core (>= 3.8.0, < 4.0.0)
|
84
|
-
nokogiri (1.10.
|
89
|
+
nokogiri (1.10.10)
|
85
90
|
mini_portile2 (~> 2.4.0)
|
86
|
-
parser (2.7.
|
87
|
-
ast (~> 2.4.
|
91
|
+
parser (2.7.1.4)
|
92
|
+
ast (~> 2.4.1)
|
88
93
|
procto (0.0.3)
|
89
|
-
public_suffix (4.0.
|
94
|
+
public_suffix (4.0.5)
|
90
95
|
rake (13.0.1)
|
96
|
+
rexml (3.2.4)
|
91
97
|
rspec (3.9.0)
|
92
98
|
rspec-core (~> 3.9.0)
|
93
99
|
rspec-expectations (~> 3.9.0)
|
94
100
|
rspec-mocks (~> 3.9.0)
|
95
|
-
rspec-core (3.9.
|
96
|
-
rspec-support (~> 3.9.
|
97
|
-
rspec-expectations (3.9.
|
101
|
+
rspec-core (3.9.2)
|
102
|
+
rspec-support (~> 3.9.3)
|
103
|
+
rspec-expectations (3.9.2)
|
98
104
|
diff-lcs (>= 1.2.0, < 2.0)
|
99
105
|
rspec-support (~> 3.9.0)
|
100
106
|
rspec-its (1.3.0)
|
@@ -103,9 +109,9 @@ GEM
|
|
103
109
|
rspec-mocks (3.9.1)
|
104
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
105
111
|
rspec-support (~> 3.9.0)
|
106
|
-
rspec-support (3.9.
|
112
|
+
rspec-support (3.9.3)
|
107
113
|
safe_yaml (1.0.5)
|
108
|
-
simplecov (0.
|
114
|
+
simplecov (0.19.0)
|
109
115
|
docile (~> 1.1)
|
110
116
|
simplecov-html (~> 0.11)
|
111
117
|
simplecov-html (0.12.2)
|
@@ -124,12 +130,12 @@ GEM
|
|
124
130
|
procto (~> 0.0.2)
|
125
131
|
variable (0.0.1)
|
126
132
|
equalizer (~> 0.0.11)
|
127
|
-
vcr (
|
133
|
+
vcr (6.0.0)
|
128
134
|
webmock (3.8.3)
|
129
135
|
addressable (>= 2.3.6)
|
130
136
|
crack (>= 0.3.2)
|
131
137
|
hashdiff (>= 0.4.0, < 2.0.0)
|
132
|
-
zeitwerk (2.
|
138
|
+
zeitwerk (2.4.0)
|
133
139
|
|
134
140
|
PLATFORMS
|
135
141
|
ruby
|
data/README.md
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
[![CircleCI](https://circleci.com/gh/evemonk/eve_online.svg?style=svg)](https://circleci.com/gh/evemonk/eve_online)
|
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
7
|
[![security](https://hakiri.io/github/evemonk/eve_online/master.svg)](https://hakiri.io/github/evemonk/eve_online/master)
|
8
|
+
[![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/evemonk/eve_online/?ref=repository-badge)
|
8
9
|
|
9
10
|
This gem implement Ruby API for EveOnline MMORPG (ESI).
|
10
11
|
|
@@ -51,7 +52,6 @@ gem install eve_online
|
|
51
52
|
* MRI 2.5
|
52
53
|
* MRI 2.6
|
53
54
|
* MRI 2.7
|
54
|
-
* JRuby 9.2.11.1
|
55
55
|
|
56
56
|
## Supported rails versions
|
57
57
|
|
@@ -763,8 +763,98 @@ contracts.etag # => "6e18566a8f786f08aba678262360d0c74a783f9923aa43f8043133e4"
|
|
763
763
|
|
764
764
|
#### Get public contracts
|
765
765
|
|
766
|
+
```ruby
|
767
|
+
options = { region_id: 10_000_043, page: 1 }
|
768
|
+
|
769
|
+
contracts = EveOnline::ESI::PublicContracts.new(options)
|
770
|
+
|
771
|
+
contracts.scope # => nil
|
772
|
+
|
773
|
+
contracts.page # => 1
|
774
|
+
|
775
|
+
contracts.total_pages # => 4
|
776
|
+
|
777
|
+
contracts.contracts.size # => 1000
|
778
|
+
|
779
|
+
contract = contracts.contracts.first
|
780
|
+
|
781
|
+
contract.as_json # => {:buyout=>nil,
|
782
|
+
# :collateral=>0.0,
|
783
|
+
# :contract_id=>157834735,
|
784
|
+
# :date_expired=>Wed, 17 Jun 2020 21:36:41 UTC +00:00,
|
785
|
+
# :date_issued=>Wed, 20 May 2020 21:36:41 UTC +00:00,
|
786
|
+
# :days_to_complete=>0,
|
787
|
+
# :end_location_id=>60008494,
|
788
|
+
# :for_corporation=>true,
|
789
|
+
# :issuer_corporation_id=>897372069,
|
790
|
+
# :issuer_id=>1314102096,
|
791
|
+
# :price=>1250000000.0,
|
792
|
+
# :reward=>0.0,
|
793
|
+
# :start_location_id=>60008494,
|
794
|
+
# :title=>"Apostle Me10/Te16 Complete Bpc 10 Pack",
|
795
|
+
# :kind=>"item_exchange",
|
796
|
+
# :volume=>100.0}
|
797
|
+
|
798
|
+
contract.buyout # => nil
|
799
|
+
contract.collateral # => 0.0
|
800
|
+
contract.contract_id # => 157834735
|
801
|
+
contract.date_expired # => Wed, 17 Jun 2020 21:36:41 UTC +00:00
|
802
|
+
contract.date_issued # => Wed, 20 May 2020 21:36:41 UTC +00:00
|
803
|
+
contract.days_to_complete # => 0
|
804
|
+
contract.end_location_id # => 60008494
|
805
|
+
contract.for_corporation # => true
|
806
|
+
contract.issuer_corporation_id # => 897372069
|
807
|
+
contract.issuer_id # => 1314102096
|
808
|
+
contract.price # => 1250000000.0
|
809
|
+
contract.reward # => 0.0
|
810
|
+
contract.start_location_id # => 60008494
|
811
|
+
contract.title # => "Apostle Me10/Te16 Complete Bpc 10 Pack"
|
812
|
+
contract.kind # => "item_exchange"
|
813
|
+
contract.volume # => 100.0
|
814
|
+
|
815
|
+
contracts.etag # => "3f7fdf9a69e35bb35d619b6cb5043a2766d11ca6306a8b5af369ce6e"
|
816
|
+
```
|
817
|
+
|
766
818
|
#### Get public contract bids
|
767
819
|
|
820
|
+
```ruby
|
821
|
+
options = { contract_id: 157_872_948, page: 1 }
|
822
|
+
|
823
|
+
contract = EveOnline::ESI::PublicContract.new(options)
|
824
|
+
|
825
|
+
contract.scope # => nil
|
826
|
+
|
827
|
+
contract.page # => 1
|
828
|
+
|
829
|
+
contract.total_pages # => 1
|
830
|
+
|
831
|
+
contract.items.size # => 1
|
832
|
+
|
833
|
+
item = contract.items.first
|
834
|
+
|
835
|
+
item.as_json # => {:is_blueprint_copy=>true,
|
836
|
+
# :is_included=>true,
|
837
|
+
# :item_id=>1029552558074,
|
838
|
+
# :material_efficiency=>10,
|
839
|
+
# :quantity=>1,
|
840
|
+
# :record_id=>3210378611,
|
841
|
+
# :runs=>400,
|
842
|
+
# :time_efficiency=>20,
|
843
|
+
# :type_id=>29040}
|
844
|
+
|
845
|
+
item.is_blueprint_copy # => true
|
846
|
+
item.is_included # => true
|
847
|
+
item.item_id # => 1029552558074
|
848
|
+
item.material_efficiency # => 10
|
849
|
+
item.quantity # => 1
|
850
|
+
item.record_id # => 3210378611
|
851
|
+
item.runs # => 400
|
852
|
+
item.time_efficiency # => 20
|
853
|
+
item.type_id # => 29040
|
854
|
+
|
855
|
+
contract.etag # => "d458c3f56c114882a9ecfe1aaf173837310b15b6e7cef86a019e700f"
|
856
|
+
```
|
857
|
+
|
768
858
|
#### Get public contract items
|
769
859
|
|
770
860
|
#### Get corporation contracts
|
@@ -899,6 +989,20 @@ corporation_blueprints.roles # => ["Director"]
|
|
899
989
|
|
900
990
|
#### Get corporation members
|
901
991
|
|
992
|
+
```ruby
|
993
|
+
options = { token: 'token123', corporation_id: 98565696 }
|
994
|
+
|
995
|
+
corporation_members = EveOnline::ESI::CorporationMembers.new(options)
|
996
|
+
|
997
|
+
corporation_members.scope # => "esi-corporations.read_corporation_membership.v1"
|
998
|
+
|
999
|
+
corporation_members.character_ids.size # => 118
|
1000
|
+
|
1001
|
+
corporation_members.character_ids.first # => 2114220544
|
1002
|
+
|
1003
|
+
corporation_members.etag # => "6094aeb7f2c2754a7d1f210eed73f1f858042330852fac847a477a59"
|
1004
|
+
```
|
1005
|
+
|
902
1006
|
#### Get corporation member limit
|
903
1007
|
|
904
1008
|
#### Get corporation's members' titles
|
@@ -2298,12 +2402,12 @@ races.races.size # => 4
|
|
2298
2402
|
|
2299
2403
|
race = races.races.first
|
2300
2404
|
|
2301
|
-
race.as_json # => {:
|
2405
|
+
race.as_json # => {:faction_id=>500002,
|
2302
2406
|
# :description=>"Once a thriving tribal civilization, the Minmatar...",
|
2303
2407
|
# :name=>"Minmatar",
|
2304
2408
|
# :race_id=>2}
|
2305
2409
|
|
2306
|
-
race.
|
2410
|
+
race.faction_id # => 500002
|
2307
2411
|
race.description # => "Once a thriving tribal civilization, the Minmatar..."
|
2308
2412
|
race.name # => "Minmatar"
|
2309
2413
|
race.race_id # => 2
|
data/eve_online.gemspec
CHANGED
data/lib/eve_online.rb
CHANGED
@@ -14,6 +14,7 @@ require "eve_online/exceptions/bad_gateway"
|
|
14
14
|
require "eve_online/exceptions/service_unavailable"
|
15
15
|
require "eve_online/exceptions/no_content"
|
16
16
|
require "eve_online/exceptions/not_modified"
|
17
|
+
require "eve_online/exceptions/error_limited"
|
17
18
|
|
18
19
|
# ESI API
|
19
20
|
require "eve_online/esi/base"
|
@@ -45,10 +46,13 @@ require "eve_online/esi/character_clones"
|
|
45
46
|
require "eve_online/esi/character_implants"
|
46
47
|
|
47
48
|
require "eve_online/esi/character_contracts"
|
49
|
+
require "eve_online/esi/public_contracts"
|
50
|
+
require "eve_online/esi/public_contract"
|
48
51
|
|
49
52
|
require "eve_online/esi/corporation"
|
50
53
|
require "eve_online/esi/corporation_alliance_history"
|
51
54
|
require "eve_online/esi/corporation_blueprints"
|
55
|
+
require "eve_online/esi/corporation_members"
|
52
56
|
require "eve_online/esi/corporation_npc"
|
53
57
|
|
54
58
|
require "eve_online/esi/dogma_attributes"
|
@@ -154,6 +158,8 @@ require "eve_online/esi/models/character_ship"
|
|
154
158
|
require "eve_online/esi/models/blueprint"
|
155
159
|
require "eve_online/esi/models/standing"
|
156
160
|
require "eve_online/esi/models/contract"
|
161
|
+
require "eve_online/esi/models/public_contract"
|
162
|
+
require "eve_online/esi/models/public_contract_item"
|
157
163
|
require "eve_online/esi/models/fatigue"
|
158
164
|
require "eve_online/esi/models/notification"
|
159
165
|
require "eve_online/esi/models/event"
|
@@ -228,3 +234,9 @@ require "eve_online/formulas/blueprint_copy_time"
|
|
228
234
|
|
229
235
|
module EveOnline
|
230
236
|
end
|
237
|
+
|
238
|
+
# class Net::HTTPErrorLimited < Net::HTTPClientError # 420
|
239
|
+
# HAS_BODY = false
|
240
|
+
# end
|
241
|
+
#
|
242
|
+
# Net::HTTPResponse::CODE_TO_OBJ.merge!("420"=>Net::HTTPErrorLimited)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class CorporationMembers < Base
|
6
|
+
API_PATH = "/v3/corporations/%<corporation_id>s/members/"
|
7
|
+
|
8
|
+
attr_reader :corporation_id
|
9
|
+
|
10
|
+
def initialize(options = {})
|
11
|
+
super
|
12
|
+
|
13
|
+
@corporation_id = options.fetch(:corporation_id)
|
14
|
+
end
|
15
|
+
|
16
|
+
def character_ids
|
17
|
+
response
|
18
|
+
end
|
19
|
+
|
20
|
+
def scope
|
21
|
+
"esi-corporations.read_corporation_membership.v1"
|
22
|
+
end
|
23
|
+
|
24
|
+
def path
|
25
|
+
format(API_PATH, corporation_id: corporation_id)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class PublicContract < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
buyout: buyout,
|
10
|
+
collateral: collateral,
|
11
|
+
contract_id: contract_id,
|
12
|
+
date_expired: date_expired,
|
13
|
+
date_issued: date_issued,
|
14
|
+
days_to_complete: days_to_complete,
|
15
|
+
end_location_id: end_location_id,
|
16
|
+
for_corporation: for_corporation,
|
17
|
+
issuer_corporation_id: issuer_corporation_id,
|
18
|
+
issuer_id: issuer_id,
|
19
|
+
price: price,
|
20
|
+
reward: reward,
|
21
|
+
start_location_id: start_location_id,
|
22
|
+
title: title,
|
23
|
+
kind: kind,
|
24
|
+
volume: volume
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
def buyout
|
29
|
+
options["buyout"]
|
30
|
+
end
|
31
|
+
|
32
|
+
def collateral
|
33
|
+
options["collateral"]
|
34
|
+
end
|
35
|
+
|
36
|
+
def contract_id
|
37
|
+
options["contract_id"]
|
38
|
+
end
|
39
|
+
|
40
|
+
def date_expired
|
41
|
+
date_expired = options["date_expired"]
|
42
|
+
|
43
|
+
parse_datetime_with_timezone(date_expired) if date_expired
|
44
|
+
end
|
45
|
+
|
46
|
+
def date_issued
|
47
|
+
date_issued = options["date_issued"]
|
48
|
+
|
49
|
+
parse_datetime_with_timezone(date_issued) if date_issued
|
50
|
+
end
|
51
|
+
|
52
|
+
def days_to_complete
|
53
|
+
options["days_to_complete"]
|
54
|
+
end
|
55
|
+
|
56
|
+
def end_location_id
|
57
|
+
options["end_location_id"]
|
58
|
+
end
|
59
|
+
|
60
|
+
def for_corporation
|
61
|
+
options["for_corporation"]
|
62
|
+
end
|
63
|
+
|
64
|
+
def issuer_corporation_id
|
65
|
+
options["issuer_corporation_id"]
|
66
|
+
end
|
67
|
+
|
68
|
+
def issuer_id
|
69
|
+
options["issuer_id"]
|
70
|
+
end
|
71
|
+
|
72
|
+
def price
|
73
|
+
options["price"]
|
74
|
+
end
|
75
|
+
|
76
|
+
def reward
|
77
|
+
options["reward"]
|
78
|
+
end
|
79
|
+
|
80
|
+
def start_location_id
|
81
|
+
options["start_location_id"]
|
82
|
+
end
|
83
|
+
|
84
|
+
def title
|
85
|
+
options["title"]
|
86
|
+
end
|
87
|
+
|
88
|
+
def kind
|
89
|
+
options["type"]
|
90
|
+
end
|
91
|
+
|
92
|
+
def volume
|
93
|
+
options["volume"]
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class PublicContractItem < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
is_blueprint_copy: is_blueprint_copy,
|
10
|
+
is_included: is_included,
|
11
|
+
item_id: item_id,
|
12
|
+
material_efficiency: material_efficiency,
|
13
|
+
quantity: quantity,
|
14
|
+
record_id: record_id,
|
15
|
+
runs: runs,
|
16
|
+
time_efficiency: time_efficiency,
|
17
|
+
type_id: type_id
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
def is_blueprint_copy
|
22
|
+
options["is_blueprint_copy"]
|
23
|
+
end
|
24
|
+
|
25
|
+
def is_included
|
26
|
+
options["is_included"]
|
27
|
+
end
|
28
|
+
|
29
|
+
def item_id
|
30
|
+
options["item_id"]
|
31
|
+
end
|
32
|
+
|
33
|
+
def material_efficiency
|
34
|
+
options["material_efficiency"]
|
35
|
+
end
|
36
|
+
|
37
|
+
def quantity
|
38
|
+
options["quantity"]
|
39
|
+
end
|
40
|
+
|
41
|
+
def record_id
|
42
|
+
options["record_id"]
|
43
|
+
end
|
44
|
+
|
45
|
+
def runs
|
46
|
+
options["runs"]
|
47
|
+
end
|
48
|
+
|
49
|
+
def time_efficiency
|
50
|
+
options["time_efficiency"]
|
51
|
+
end
|
52
|
+
|
53
|
+
def type_id
|
54
|
+
options["type_id"]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -6,14 +6,14 @@ module EveOnline
|
|
6
6
|
class Race < Base
|
7
7
|
def as_json
|
8
8
|
{
|
9
|
-
|
9
|
+
faction_id: faction_id,
|
10
10
|
description: description,
|
11
11
|
name: name,
|
12
12
|
race_id: race_id
|
13
13
|
}
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def faction_id
|
17
17
|
options["alliance_id"]
|
18
18
|
end
|
19
19
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class PublicContract < Base
|
6
|
+
API_PATH = "/v1/contracts/public/items/%<contract_id>s/"
|
7
|
+
|
8
|
+
attr_reader :contract_id, :page
|
9
|
+
|
10
|
+
def initialize(options)
|
11
|
+
super
|
12
|
+
|
13
|
+
@contract_id = options.fetch(:contract_id)
|
14
|
+
@page = options.fetch(:page, 1)
|
15
|
+
end
|
16
|
+
|
17
|
+
def items
|
18
|
+
@items ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |item|
|
22
|
+
output << Models::PublicContractItem.new(item)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def scope
|
29
|
+
end
|
30
|
+
|
31
|
+
def additional_query_params
|
32
|
+
[:page]
|
33
|
+
end
|
34
|
+
|
35
|
+
def path
|
36
|
+
format(API_PATH, contract_id: contract_id)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class PublicContracts < Base
|
6
|
+
API_PATH = "/v1/contracts/public/%<region_id>s/"
|
7
|
+
|
8
|
+
attr_reader :region_id, :page
|
9
|
+
|
10
|
+
def initialize(options)
|
11
|
+
super
|
12
|
+
|
13
|
+
@region_id = options.fetch(:region_id)
|
14
|
+
@page = options.fetch(:page, 1)
|
15
|
+
end
|
16
|
+
|
17
|
+
def contracts
|
18
|
+
@contracts ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |contract|
|
22
|
+
output << Models::PublicContract.new(contract)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def scope
|
29
|
+
end
|
30
|
+
|
31
|
+
def additional_query_params
|
32
|
+
[:page]
|
33
|
+
end
|
34
|
+
|
35
|
+
def path
|
36
|
+
format(API_PATH, region_id: region_id)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
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.36.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Zubkov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 5.2.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 5.2.0
|
153
153
|
description: EveOnline ESI API.
|
154
154
|
email:
|
155
155
|
- igor.zubkov@gmail.com
|
@@ -158,6 +158,7 @@ extensions: []
|
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
160
|
- ".circleci/config.yml"
|
161
|
+
- ".deepsource.toml"
|
161
162
|
- ".github/FUNDING.yml"
|
162
163
|
- ".gitignore"
|
163
164
|
- ".mdlrc"
|
@@ -218,6 +219,7 @@ files:
|
|
218
219
|
- lib/eve_online/esi/corporation_industry_jobs.rb
|
219
220
|
- lib/eve_online/esi/corporation_killmails_recent.rb
|
220
221
|
- lib/eve_online/esi/corporation_loyalty_store_offers.rb
|
222
|
+
- lib/eve_online/esi/corporation_members.rb
|
221
223
|
- lib/eve_online/esi/corporation_npc.rb
|
222
224
|
- lib/eve_online/esi/corporation_orders.rb
|
223
225
|
- lib/eve_online/esi/dogma_attribute.rb
|
@@ -296,6 +298,8 @@ files:
|
|
296
298
|
- lib/eve_online/esi/models/planet_short.rb
|
297
299
|
- lib/eve_online/esi/models/planets.rb
|
298
300
|
- lib/eve_online/esi/models/position.rb
|
301
|
+
- lib/eve_online/esi/models/public_contract.rb
|
302
|
+
- lib/eve_online/esi/models/public_contract_item.rb
|
299
303
|
- lib/eve_online/esi/models/race.rb
|
300
304
|
- lib/eve_online/esi/models/region.rb
|
301
305
|
- lib/eve_online/esi/models/server_status.rb
|
@@ -312,6 +316,8 @@ files:
|
|
312
316
|
- lib/eve_online/esi/models/wallet_journal.rb
|
313
317
|
- lib/eve_online/esi/models/wallet_transaction.rb
|
314
318
|
- lib/eve_online/esi/models/war.rb
|
319
|
+
- lib/eve_online/esi/public_contract.rb
|
320
|
+
- lib/eve_online/esi/public_contracts.rb
|
315
321
|
- lib/eve_online/esi/server_status.rb
|
316
322
|
- lib/eve_online/esi/universe_ancestries.rb
|
317
323
|
- lib/eve_online/esi/universe_asteroid_belt.rb
|
@@ -346,6 +352,7 @@ files:
|
|
346
352
|
- lib/eve_online/exceptions/bad_gateway.rb
|
347
353
|
- lib/eve_online/exceptions/bad_request.rb
|
348
354
|
- lib/eve_online/exceptions/base.rb
|
355
|
+
- lib/eve_online/exceptions/error_limited.rb
|
349
356
|
- lib/eve_online/exceptions/forbidden.rb
|
350
357
|
- lib/eve_online/exceptions/internal_server_error.rb
|
351
358
|
- lib/eve_online/exceptions/no_content.rb
|
@@ -366,7 +373,7 @@ metadata:
|
|
366
373
|
documentation_uri: https://github.com/evemonk/eve_online/blob/master/README.md
|
367
374
|
homepage_uri: https://github.com/evemonk/eve_online
|
368
375
|
source_code_uri: https://github.com/evemonk/eve_online
|
369
|
-
post_install_message:
|
376
|
+
post_install_message:
|
370
377
|
rdoc_options: []
|
371
378
|
require_paths:
|
372
379
|
- lib
|
@@ -381,8 +388,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
381
388
|
- !ruby/object:Gem::Version
|
382
389
|
version: '0'
|
383
390
|
requirements: []
|
384
|
-
rubygems_version: 3.1.
|
385
|
-
signing_key:
|
391
|
+
rubygems_version: 3.1.4
|
392
|
+
signing_key:
|
386
393
|
specification_version: 4
|
387
394
|
summary: EveOnline ESI API.
|
388
395
|
test_files: []
|