esi-sdk 1.2.0 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/{cicd.yml → build.yml} +18 -3
- data/.gitignore +2 -0
- data/CHANGELOG.md +28 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +21 -46
- data/README.md +2 -14
- data/Rakefile +48 -15
- data/bin/console +1 -1
- data/esi-sdk.gemspec +2 -4
- data/lib/esi/client/alliance.rb +96 -3
- data/lib/esi/client/assets.rb +175 -6
- data/lib/esi/client/bookmarks.rb +118 -4
- data/lib/esi/client/calendar.rb +131 -4
- data/lib/esi/client/character.rb +383 -14
- data/lib/esi/client/clones.rb +61 -2
- data/lib/esi/client/contacts.rb +268 -9
- data/lib/esi/client/contracts.rb +266 -9
- data/lib/esi/client/corporation.rb +726 -132
- data/lib/esi/client/dogma.rb +109 -3
- data/lib/esi/client/faction_warfare.rb +188 -4
- data/lib/esi/client/fittings.rb +86 -3
- data/lib/esi/client/fleets.rb +427 -14
- data/lib/esi/client/incursions.rb +22 -0
- data/lib/esi/client/industry.rb +228 -6
- data/lib/esi/client/insurance.rb +22 -0
- data/lib/esi/client/killmails.rb +86 -3
- data/lib/esi/client/location.rb +92 -3
- data/lib/esi/client/loyalty.rb +53 -2
- data/lib/esi/client/mail.rb +239 -8
- data/lib/esi/client/market.rb +293 -11
- data/lib/esi/client/opportunities.rb +116 -5
- data/lib/esi/client/planetary_interaction.rb +114 -4
- data/lib/esi/client/routes.rb +28 -0
- data/lib/esi/client/search.rb +58 -1
- data/lib/esi/client/skills.rb +89 -3
- data/lib/esi/client/sovereignty.rb +66 -0
- data/lib/esi/client/status.rb +23 -0
- data/lib/esi/client/universe.rb +763 -144
- data/lib/esi/client/user_interface.rb +138 -0
- data/lib/esi/client/wallet.rb +181 -6
- data/lib/esi/client/wars.rb +73 -2
- data/lib/esi/client.rb +73 -94
- data/lib/esi/errors.rb +3 -3
- data/lib/esi/version.rb +1 -1
- data/package.json +19 -0
- data/yarn.lock +3695 -0
- metadata +11 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7c874338d7aa0d467285e375390a6b185c184d9e5882a7f2ca519411b76e6df
|
4
|
+
data.tar.gz: 80b17cc143a6e5479005498a6351adccec57a997ac405138677beeb6dc10789e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f50b8969549d4f8a8cb866725f46e058cd761072da6024a781469d95123e5a84bdcd981f77d4fe636b575ec333c08cfe6db95c78b5374c44df8a58a1db96bd9f
|
7
|
+
data.tar.gz: d8ca8eeba8e76b7c7915edd7703ca4a57046ccb54fa520384239331dc7a26ee2dd8c0604659acad2b184348589a9650d7e2be5e35eb8ff6227532bac7d25ea09
|
@@ -1,4 +1,4 @@
|
|
1
|
-
name:
|
1
|
+
name: Build
|
2
2
|
|
3
3
|
on:
|
4
4
|
pull_request:
|
@@ -168,6 +168,22 @@ jobs:
|
|
168
168
|
with:
|
169
169
|
node-version: '16'
|
170
170
|
|
171
|
+
- name: Find yarn cache location
|
172
|
+
id: yarn-cache
|
173
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
174
|
+
|
175
|
+
- name: Yarn package cache
|
176
|
+
uses: actions/cache@v2
|
177
|
+
with:
|
178
|
+
path: ${{ steps.yarn-cache.outputs.dir }}
|
179
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
180
|
+
restore-keys: |
|
181
|
+
${{ runner.os }}-yarn-
|
182
|
+
|
183
|
+
- name: Install yarn packages
|
184
|
+
run: |
|
185
|
+
yarn install --pure-lockfile
|
186
|
+
|
171
187
|
- name: Release
|
172
188
|
env:
|
173
189
|
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
@@ -177,5 +193,4 @@ jobs:
|
|
177
193
|
GIT_COMMITTER_EMAIL: "shahni@bokobo.space"
|
178
194
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
179
195
|
run: |
|
180
|
-
|
181
|
-
npx semantic-release ${{ github.event_name == 'pull_request' && '--dry-run' || ' ' }}
|
196
|
+
yarn release ${{ github.event_name == 'pull_request' && '--dry-run' || ' ' }}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,33 @@
|
|
1
1
|
# ESI SDK Changelog
|
2
2
|
|
3
|
+
## [2.1.2](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v2.1.1...v2.1.2) (2021-10-09)
|
4
|
+
|
5
|
+
## [2.1.1](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v2.1.0...v2.1.1) (2021-10-09)
|
6
|
+
|
7
|
+
# [2.1.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v2.0.0...v2.1.0) (2021-10-09)
|
8
|
+
|
9
|
+
|
10
|
+
### Features
|
11
|
+
|
12
|
+
* add methods to return raw responses ([93dc308](https://github.com/bokoboshahni/esi-sdk-ruby/commit/93dc3082cf06b0b4e42e17e3de77c9e05e3345b5))
|
13
|
+
|
14
|
+
# [2.0.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.2.0...v2.0.0) (2021-10-08)
|
15
|
+
|
16
|
+
|
17
|
+
### Bug Fixes
|
18
|
+
|
19
|
+
* require name from esi/sdk to esi-sdk ([2e5e996](https://github.com/bokoboshahni/esi-sdk-ruby/commit/2e5e9966343baef91bd037579607bb562edce301))
|
20
|
+
|
21
|
+
|
22
|
+
### Features
|
23
|
+
|
24
|
+
* migrate to httpx ([fd6ec0d](https://github.com/bokoboshahni/esi-sdk-ruby/commit/fd6ec0d6910805215efceb80a5361dc4d72b9599))
|
25
|
+
|
26
|
+
|
27
|
+
### BREAKING CHANGES
|
28
|
+
|
29
|
+
* use httpx instead of faraday for http calls
|
30
|
+
|
3
31
|
# [1.2.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.1.3...v1.2.0) (2021-07-20)
|
4
32
|
|
5
33
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
esi-sdk (1.2
|
5
|
-
|
6
|
-
|
7
|
-
faraday_middleware (~> 1.0)
|
8
|
-
typhoeus (~> 1.4)
|
4
|
+
esi-sdk (2.1.2)
|
5
|
+
httpx (~> 0.18)
|
6
|
+
retriable (~> 3.1)
|
9
7
|
|
10
8
|
GEM
|
11
9
|
remote: https://rubygems.org/
|
12
10
|
specs:
|
13
|
-
activesupport (6.1.4)
|
11
|
+
activesupport (6.1.4.1)
|
14
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
13
|
i18n (>= 1.6, < 2)
|
16
14
|
minitest (>= 5.1)
|
@@ -19,36 +17,16 @@ GEM
|
|
19
17
|
addressable (2.8.0)
|
20
18
|
public_suffix (>= 2.0.2, < 5.0)
|
21
19
|
ast (2.4.2)
|
20
|
+
awesome_print (1.9.2)
|
22
21
|
concurrent-ruby (1.1.9)
|
23
22
|
crack (0.4.5)
|
24
23
|
rexml
|
25
24
|
diff-lcs (1.4.4)
|
26
25
|
docile (1.4.0)
|
27
|
-
ethon (0.14.0)
|
28
|
-
ffi (>= 1.15.0)
|
29
|
-
faraday (1.5.1)
|
30
|
-
faraday-em_http (~> 1.0)
|
31
|
-
faraday-em_synchrony (~> 1.0)
|
32
|
-
faraday-excon (~> 1.1)
|
33
|
-
faraday-httpclient (~> 1.0.1)
|
34
|
-
faraday-net_http (~> 1.0)
|
35
|
-
faraday-net_http_persistent (~> 1.1)
|
36
|
-
faraday-patron (~> 1.0)
|
37
|
-
multipart-post (>= 1.2, < 3)
|
38
|
-
ruby2_keywords (>= 0.0.4)
|
39
|
-
faraday-em_http (1.0.0)
|
40
|
-
faraday-em_synchrony (1.0.0)
|
41
|
-
faraday-excon (1.1.0)
|
42
|
-
faraday-http-cache (2.2.0)
|
43
|
-
faraday (>= 0.8)
|
44
|
-
faraday-httpclient (1.0.1)
|
45
|
-
faraday-net_http (1.0.1)
|
46
|
-
faraday-net_http_persistent (1.2.0)
|
47
|
-
faraday-patron (1.0.0)
|
48
|
-
faraday_middleware (1.0.0)
|
49
|
-
faraday (~> 1.0)
|
50
|
-
ffi (1.15.3)
|
51
26
|
hashdiff (1.0.1)
|
27
|
+
http-2-next (0.5.0)
|
28
|
+
httpx (0.18.0)
|
29
|
+
http-2-next (>= 0.4.1)
|
52
30
|
i18n (1.8.10)
|
53
31
|
concurrent-ruby (~> 1.0)
|
54
32
|
kramdown (2.3.1)
|
@@ -56,16 +34,16 @@ GEM
|
|
56
34
|
kramdown-parser-gfm (1.1.0)
|
57
35
|
kramdown (~> 2.0)
|
58
36
|
minitest (5.14.4)
|
59
|
-
|
60
|
-
parallel (1.20.1)
|
37
|
+
parallel (1.21.0)
|
61
38
|
parser (3.0.2.0)
|
62
39
|
ast (~> 2.4.1)
|
63
40
|
public_suffix (4.0.6)
|
64
41
|
rainbow (3.0.0)
|
65
42
|
rake (13.0.6)
|
66
43
|
regexp_parser (2.1.1)
|
44
|
+
retriable (3.1.2)
|
67
45
|
rexml (3.2.5)
|
68
|
-
rouge (3.26.
|
46
|
+
rouge (3.26.1)
|
69
47
|
rspec (3.10.0)
|
70
48
|
rspec-core (~> 3.10.0)
|
71
49
|
rspec-expectations (~> 3.10.0)
|
@@ -79,41 +57,37 @@ GEM
|
|
79
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
58
|
rspec-support (~> 3.10.0)
|
81
59
|
rspec-support (3.10.2)
|
82
|
-
rubocop (1.
|
60
|
+
rubocop (1.22.1)
|
83
61
|
parallel (~> 1.10)
|
84
62
|
parser (>= 3.0.0.0)
|
85
63
|
rainbow (>= 2.2.2, < 4.0)
|
86
64
|
regexp_parser (>= 1.8, < 3.0)
|
87
65
|
rexml
|
88
|
-
rubocop-ast (>= 1.
|
66
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
89
67
|
ruby-progressbar (~> 1.7)
|
90
68
|
unicode-display_width (>= 1.4.0, < 3.0)
|
91
|
-
rubocop-ast (1.
|
69
|
+
rubocop-ast (1.12.0)
|
92
70
|
parser (>= 3.0.1.1)
|
93
|
-
rubocop-performance (1.11.
|
71
|
+
rubocop-performance (1.11.5)
|
94
72
|
rubocop (>= 1.7.0, < 2.0)
|
95
73
|
rubocop-ast (>= 0.4.0)
|
96
74
|
rubocop-rake (0.6.0)
|
97
75
|
rubocop (~> 1.0)
|
98
|
-
rubocop-rspec (2.
|
99
|
-
rubocop (~> 1.
|
100
|
-
rubocop-ast (>= 1.1.0)
|
76
|
+
rubocop-rspec (2.5.0)
|
77
|
+
rubocop (~> 1.19)
|
101
78
|
ruby-progressbar (1.11.0)
|
102
|
-
ruby2_keywords (0.0.5)
|
103
79
|
simplecov (0.21.2)
|
104
80
|
docile (~> 1.1)
|
105
81
|
simplecov-html (~> 0.11)
|
106
82
|
simplecov_json_formatter (~> 0.1)
|
107
83
|
simplecov-html (0.12.3)
|
108
84
|
simplecov_json_formatter (0.1.3)
|
109
|
-
typhoeus (1.4.0)
|
110
|
-
ethon (>= 0.9.0)
|
111
85
|
tzinfo (2.0.4)
|
112
86
|
concurrent-ruby (~> 1.0)
|
113
|
-
unicode-display_width (2.
|
87
|
+
unicode-display_width (2.1.0)
|
114
88
|
vcr (6.0.0)
|
115
|
-
webmock (3.
|
116
|
-
addressable (>= 2.
|
89
|
+
webmock (3.14.0)
|
90
|
+
addressable (>= 2.8.0)
|
117
91
|
crack (>= 0.3.2)
|
118
92
|
hashdiff (>= 0.4.0, < 2.0.0)
|
119
93
|
yard (0.9.26)
|
@@ -125,6 +99,7 @@ PLATFORMS
|
|
125
99
|
|
126
100
|
DEPENDENCIES
|
127
101
|
activesupport (~> 6.1)
|
102
|
+
awesome_print (~> 1.9)
|
128
103
|
esi-sdk!
|
129
104
|
kramdown-parser-gfm (~> 1.1)
|
130
105
|
rake (~> 13.0)
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
![Build
|
1
|
+
[![Build](https://github.com/bokoboshahni/esi-sdk-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/bokoboshahni/esi-sdk-ruby/actions/workflows/build.yml)
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/esi-sdk.svg)](https://badge.fury.io/rb/esi-sdk)
|
2
3
|
|
3
4
|
# EVE Swagger Interface (ESI) SDK
|
4
5
|
|
@@ -55,19 +56,6 @@ response = client.get_character(character_id: 2113024536)
|
|
55
56
|
|
56
57
|
See the documentation for [ESI::Client](https://bokoboshahni.github.io/esi-sdk-ruby/ESI/Client.html) for detailed information on each endpoint.
|
57
58
|
|
58
|
-
### Caching
|
59
|
-
|
60
|
-
Caching is handled via the [faraday-http-cache](https://github.com/sourcelevel/faraday-http-cache) middleware. When instantiating an `ESI::Client` instance, cache configuration can be passed via the `cache` parameter:
|
61
|
-
|
62
|
-
```ruby
|
63
|
-
client = ESI::Client.new(
|
64
|
-
user_agent: 'My ESI Bot/1.0; +(https://example.com)',
|
65
|
-
cache: { store: Rails.cache, logger: Rails.logger, instrumenter: ActiveSupport::Notifications }
|
66
|
-
)
|
67
|
-
```
|
68
|
-
|
69
|
-
See the [faraday-http-cache](https://github.com/sourcelevel/faraday-http-cache) documentation for more details on what configuration options are available.
|
70
|
-
|
71
59
|
## Development
|
72
60
|
|
73
61
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/Rakefile
CHANGED
@@ -120,6 +120,7 @@ task :generate do
|
|
120
120
|
module_name = tag.gsub(/ /, "_").classify
|
121
121
|
method_definitions = operations.sort_by { |(k, _v)| k }.each_with_object([]) do |(method_name, operation), a|
|
122
122
|
signature_params = operation[:params].map { |p| "#{p["name"]}:" }
|
123
|
+
raw_call_params = operation[:params].map { |p| "#{p["name"]}: #{p["name"]}" }
|
123
124
|
|
124
125
|
description = "# #{operation[:description]}"
|
125
126
|
description = "#{description}." unless description.end_with?(".")
|
@@ -157,6 +158,7 @@ task :generate do
|
|
157
158
|
end
|
158
159
|
|
159
160
|
signature_params << "#{body_name}:"
|
161
|
+
raw_call_params << "#{body_name}: #{body_name}"
|
160
162
|
param_tags += ["# @param #{body_name} [#{body_type}] #{body_param["description"]}"]
|
161
163
|
end
|
162
164
|
|
@@ -174,12 +176,16 @@ task :generate do
|
|
174
176
|
"#{p["name"]}:"
|
175
177
|
end
|
176
178
|
signature_params << p_str
|
179
|
+
raw_call_params << "#{p["name"]}: #{p["name"]}"
|
177
180
|
param_tags << p_tag
|
178
181
|
end
|
179
182
|
|
180
183
|
signature_params += %w[headers params].map do |p|
|
181
184
|
"#{p}: {}"
|
182
185
|
end
|
186
|
+
raw_call_params += %w[headers params].map do |p|
|
187
|
+
"#{p}: #{p}"
|
188
|
+
end
|
183
189
|
param_tags << "# @param params [Hash] Additional query string parameters"
|
184
190
|
|
185
191
|
param_tags += [
|
@@ -201,6 +207,7 @@ task :generate do
|
|
201
207
|
description.gsub!(/^$\n/m, "")
|
202
208
|
|
203
209
|
signature = "(#{signature_params.join(", ")})"
|
210
|
+
raw_call = "(#{raw_call_params.join(", ")})"
|
204
211
|
path_parts = operation[:path].split("/")
|
205
212
|
path_parts.map! do |p|
|
206
213
|
if p =~ /\{\w+\}/
|
@@ -214,12 +221,13 @@ task :generate do
|
|
214
221
|
http_call_params = %w[headers params].map { |p| "#{p}: #{p}" }
|
215
222
|
http_call_params << ("payload: #{body_param["name"]}" if operation[:body])
|
216
223
|
|
217
|
-
if operation[:query].any?
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
224
|
+
params_merge = if operation[:query].any?
|
225
|
+
"params.merge!(#{operation[:query].map { |q| "'#{q["name"]}' => #{q["name"]}" }.join(", ")})"
|
226
|
+
else
|
227
|
+
""
|
228
|
+
end
|
229
|
+
|
230
|
+
http_call = "#{operation[:method]}(\"#{path}\", #{http_call_params.join(", ")})"
|
223
231
|
|
224
232
|
alias_methods = if method_aliases[method_name]
|
225
233
|
Array(method_aliases[method_name]).sort.map do |alias_name|
|
@@ -231,13 +239,36 @@ task :generate do
|
|
231
239
|
alias_methods << "alias_method :#{operation[:name]}, :#{method_name}" unless operation[:name] == method_name
|
232
240
|
alias_methods = alias_methods.join("\n")
|
233
241
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
#{
|
238
|
-
|
239
|
-
|
240
|
-
|
242
|
+
if operation[:responses]["200"] && operation[:responses]["200"]["headers"] && operation[:responses]["200"]["headers"].key?("X-Pages")
|
243
|
+
a << <<~METHOD_DEFINITION
|
244
|
+
#{description}
|
245
|
+
def #{method_name}#{signature}
|
246
|
+
#{params_merge}
|
247
|
+
concat_responses(#{method_name}_raw#{raw_call})
|
248
|
+
end
|
249
|
+
#{alias_methods}
|
250
|
+
|
251
|
+
#{description}
|
252
|
+
def #{method_name}_raw#{signature}
|
253
|
+
#{params_merge}
|
254
|
+
#{http_call}
|
255
|
+
end
|
256
|
+
METHOD_DEFINITION
|
257
|
+
else
|
258
|
+
a << <<~METHOD_DEFINITION
|
259
|
+
#{description}
|
260
|
+
def #{method_name}#{signature}
|
261
|
+
#{method_name}_raw#{raw_call}.json
|
262
|
+
end
|
263
|
+
#{alias_methods}
|
264
|
+
|
265
|
+
#{description}
|
266
|
+
def #{method_name}_raw#{signature}
|
267
|
+
#{params_merge}
|
268
|
+
#{http_call}
|
269
|
+
end
|
270
|
+
METHOD_DEFINITION
|
271
|
+
end
|
241
272
|
end
|
242
273
|
|
243
274
|
lib_content = <<~MODULE_DEFINITION
|
@@ -289,12 +320,14 @@ task :generate do
|
|
289
320
|
|
290
321
|
with_query = operation[:query].any? ? ".with(query: { #{operation[:query].map { |p| "#{p["name"]}: \"1234567890\"" }.join(", ")} })" : ""
|
291
322
|
|
323
|
+
extra_headers = success_desc["headers"] && success_desc["headers"]["X-Pages"] ? ", 'X-Pages': '1'" : ""
|
324
|
+
|
292
325
|
describe = " describe \"##{method_name}\" do\n"
|
293
326
|
describe += " context \"when the response is #{success_code}\" do\n"
|
294
327
|
describe += " let(:response) { #{success_response_body} }\n"
|
295
328
|
describe += "\n"
|
296
329
|
describe += " before do\n"
|
297
|
-
describe += " stub_request(:#{operation[:method]}, \"https://esi.evetech.net/latest#{success_path}\")#{with_query}.to_return(body: response.to_json)\n"
|
330
|
+
describe += " stub_request(:#{operation[:method]}, \"https://esi.evetech.net/latest#{success_path}\")#{with_query}.to_return(body: response.to_json, headers: { 'Content-Type': 'application/json'#{extra_headers} })\n"
|
298
331
|
describe += " end\n"
|
299
332
|
describe += "\n"
|
300
333
|
describe += " it \"returns the response\" do\n"
|
@@ -313,7 +346,7 @@ task :generate do
|
|
313
346
|
context += " let(:response) { #{error_response_body} }\n"
|
314
347
|
context += "\n"
|
315
348
|
context += " before do\n"
|
316
|
-
context += " stub_request(:#{operation[:method]}, \"https://esi.evetech.net/latest#{success_path}\")#{with_query}.to_return(body: response.to_json, status: #{code})\n"
|
349
|
+
context += " stub_request(:#{operation[:method]}, \"https://esi.evetech.net/latest#{success_path}\")#{with_query}.to_return(body: response.to_json, status: #{code}, headers: { 'Content-Type': 'application/json' })\n"
|
317
350
|
context += " end\n"
|
318
351
|
context += "\n"
|
319
352
|
context += " it \"raises a #{error_mapping[code.to_i]} error\" do\n"
|
data/bin/console
CHANGED
data/esi-sdk.gemspec
CHANGED
@@ -26,8 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
|
-
spec.add_dependency "
|
30
|
-
spec.add_dependency "
|
31
|
-
spec.add_dependency "faraday_middleware", "~> 1.0"
|
32
|
-
spec.add_dependency "typhoeus", "~> 1.4"
|
29
|
+
spec.add_dependency "httpx", "~> 0.18"
|
30
|
+
spec.add_dependency "retriable", "~> 3.1"
|
33
31
|
end
|
data/lib/esi/client/alliance.rb
CHANGED
@@ -26,10 +26,35 @@ module ESI
|
|
26
26
|
#
|
27
27
|
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id
|
28
28
|
def get_alliance(alliance_id:, headers: {}, params: {})
|
29
|
-
|
29
|
+
get_alliance_raw(alliance_id: alliance_id, headers: headers, params: params).json
|
30
30
|
end
|
31
31
|
alias get_alliances_alliance_id get_alliance
|
32
32
|
|
33
|
+
# Public information about an alliance.
|
34
|
+
#
|
35
|
+
# This endpoint is cached for up to 3600 seconds.
|
36
|
+
#
|
37
|
+
# @esi_version dev
|
38
|
+
# @esi_version legacy
|
39
|
+
# @esi_version v3
|
40
|
+
# @esi_version v4
|
41
|
+
#
|
42
|
+
# @param alliance_id [Integer] An EVE alliance ID
|
43
|
+
# @param params [Hash] Additional query string parameters
|
44
|
+
# @param headers [Hash] Additional headers
|
45
|
+
#
|
46
|
+
# @raise [ESI::Errors::BadRequestError] Bad request
|
47
|
+
# @raise [ESI::Errors::NotFoundError] Alliance not found
|
48
|
+
# @raise [ESI::Errors::ErrorLimitedError] Error limited
|
49
|
+
# @raise [ESI::Errors::InternalServerError] Internal server error
|
50
|
+
# @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
|
51
|
+
# @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
|
52
|
+
#
|
53
|
+
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id
|
54
|
+
def get_alliance_raw(alliance_id:, headers: {}, params: {})
|
55
|
+
get("/alliances/#{alliance_id}/", headers: headers, params: params)
|
56
|
+
end
|
57
|
+
|
33
58
|
# List all current member corporations of an alliance.
|
34
59
|
#
|
35
60
|
# This endpoint is cached for up to 3600 seconds.
|
@@ -51,10 +76,34 @@ module ESI
|
|
51
76
|
#
|
52
77
|
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_corporations
|
53
78
|
def get_alliance_corporations(alliance_id:, headers: {}, params: {})
|
54
|
-
|
79
|
+
get_alliance_corporations_raw(alliance_id: alliance_id, headers: headers, params: params).json
|
55
80
|
end
|
56
81
|
alias get_alliances_alliance_id_corporations get_alliance_corporations
|
57
82
|
|
83
|
+
# List all current member corporations of an alliance.
|
84
|
+
#
|
85
|
+
# This endpoint is cached for up to 3600 seconds.
|
86
|
+
#
|
87
|
+
# @esi_version dev
|
88
|
+
# @esi_version legacy
|
89
|
+
# @esi_version v1
|
90
|
+
# @esi_version v2
|
91
|
+
#
|
92
|
+
# @param alliance_id [Integer] An EVE alliance ID
|
93
|
+
# @param params [Hash] Additional query string parameters
|
94
|
+
# @param headers [Hash] Additional headers
|
95
|
+
#
|
96
|
+
# @raise [ESI::Errors::BadRequestError] Bad request
|
97
|
+
# @raise [ESI::Errors::ErrorLimitedError] Error limited
|
98
|
+
# @raise [ESI::Errors::InternalServerError] Internal server error
|
99
|
+
# @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
|
100
|
+
# @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
|
101
|
+
#
|
102
|
+
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_corporations
|
103
|
+
def get_alliance_corporations_raw(alliance_id:, headers: {}, params: {})
|
104
|
+
get("/alliances/#{alliance_id}/corporations/", headers: headers, params: params)
|
105
|
+
end
|
106
|
+
|
58
107
|
# Get the icon urls for a alliance.
|
59
108
|
#
|
60
109
|
# @esi_version legacy
|
@@ -73,10 +122,31 @@ module ESI
|
|
73
122
|
#
|
74
123
|
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_icons
|
75
124
|
def get_alliance_icons(alliance_id:, headers: {}, params: {})
|
76
|
-
|
125
|
+
get_alliance_icons_raw(alliance_id: alliance_id, headers: headers, params: params).json
|
77
126
|
end
|
78
127
|
alias get_alliances_alliance_id_icons get_alliance_icons
|
79
128
|
|
129
|
+
# Get the icon urls for a alliance.
|
130
|
+
#
|
131
|
+
# @esi_version legacy
|
132
|
+
# @esi_version v1
|
133
|
+
#
|
134
|
+
# @param alliance_id [Integer] An EVE alliance ID
|
135
|
+
# @param params [Hash] Additional query string parameters
|
136
|
+
# @param headers [Hash] Additional headers
|
137
|
+
#
|
138
|
+
# @raise [ESI::Errors::BadRequestError] Bad request
|
139
|
+
# @raise [ESI::Errors::NotFoundError] No image server for this datasource
|
140
|
+
# @raise [ESI::Errors::ErrorLimitedError] Error limited
|
141
|
+
# @raise [ESI::Errors::InternalServerError] Internal server error
|
142
|
+
# @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
|
143
|
+
# @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
|
144
|
+
#
|
145
|
+
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_icons
|
146
|
+
def get_alliance_icons_raw(alliance_id:, headers: {}, params: {})
|
147
|
+
get("/alliances/#{alliance_id}/icons/", headers: headers, params: params)
|
148
|
+
end
|
149
|
+
|
80
150
|
# List all active player alliances.
|
81
151
|
#
|
82
152
|
# This endpoint is cached for up to 3600 seconds.
|
@@ -97,6 +167,29 @@ module ESI
|
|
97
167
|
#
|
98
168
|
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances
|
99
169
|
def get_alliances(headers: {}, params: {})
|
170
|
+
get_alliances_raw(headers: headers, params: params).json
|
171
|
+
end
|
172
|
+
|
173
|
+
# List all active player alliances.
|
174
|
+
#
|
175
|
+
# This endpoint is cached for up to 3600 seconds.
|
176
|
+
#
|
177
|
+
# @esi_version dev
|
178
|
+
# @esi_version legacy
|
179
|
+
# @esi_version v1
|
180
|
+
# @esi_version v2
|
181
|
+
#
|
182
|
+
# @param params [Hash] Additional query string parameters
|
183
|
+
# @param headers [Hash] Additional headers
|
184
|
+
#
|
185
|
+
# @raise [ESI::Errors::BadRequestError] Bad request
|
186
|
+
# @raise [ESI::Errors::ErrorLimitedError] Error limited
|
187
|
+
# @raise [ESI::Errors::InternalServerError] Internal server error
|
188
|
+
# @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
|
189
|
+
# @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
|
190
|
+
#
|
191
|
+
# @see https://esi.evetech.net/ui/#/Alliance/get_alliances
|
192
|
+
def get_alliances_raw(headers: {}, params: {})
|
100
193
|
get("/alliances/", headers: headers, params: params)
|
101
194
|
end
|
102
195
|
end
|