esi-sdk 1.1.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/cicd.yml +17 -2
  3. data/.gitignore +2 -0
  4. data/CHANGELOG.md +33 -0
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +21 -40
  7. data/README.md +2 -0
  8. data/Rakefile +57 -37
  9. data/bin/console +1 -1
  10. data/esi-sdk.gemspec +2 -3
  11. data/lib/esi/client/alliance.rb +11 -11
  12. data/lib/esi/client/assets.rb +24 -18
  13. data/lib/esi/client/bookmarks.rb +16 -12
  14. data/lib/esi/client/calendar.rb +17 -16
  15. data/lib/esi/client/character.rb +45 -42
  16. data/lib/esi/client/clones.rb +6 -6
  17. data/lib/esi/client/contacts.rb +35 -30
  18. data/lib/esi/client/contracts.rb +37 -31
  19. data/lib/esi/client/corporation.rb +76 -67
  20. data/lib/esi/client/dogma.rb +14 -14
  21. data/lib/esi/client/faction_warfare.rb +18 -18
  22. data/lib/esi/client/fittings.rb +11 -10
  23. data/lib/esi/client/fleets.rb +56 -49
  24. data/lib/esi/client/incursions.rb +2 -2
  25. data/lib/esi/client/industry.rb +30 -25
  26. data/lib/esi/client/insurance.rb +2 -2
  27. data/lib/esi/client/killmails.rb +12 -10
  28. data/lib/esi/client/location.rb +9 -9
  29. data/lib/esi/client/loyalty.rb +6 -6
  30. data/lib/esi/client/mail.rb +31 -28
  31. data/lib/esi/client/market.rb +40 -34
  32. data/lib/esi/client/opportunities.rb +13 -13
  33. data/lib/esi/client/planetary_interaction.rb +14 -13
  34. data/lib/esi/client/routes.rb +6 -6
  35. data/lib/esi/client/search.rb +7 -7
  36. data/lib/esi/client/skills.rb +9 -9
  37. data/lib/esi/client/sovereignty.rb +6 -6
  38. data/lib/esi/client/status.rb +2 -2
  39. data/lib/esi/client/universe.rb +80 -76
  40. data/lib/esi/client/user_interface.rb +19 -14
  41. data/lib/esi/client/wallet.rb +24 -22
  42. data/lib/esi/client/wars.rb +10 -9
  43. data/lib/esi/client.rb +74 -82
  44. data/lib/esi/errors.rb +12 -1
  45. data/lib/esi/version.rb +1 -1
  46. data/package.json +19 -0
  47. data/release.config.js +5 -3
  48. data/yarn.lock +3695 -0
  49. metadata +10 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9e2a18361aa7db1d4cdda4bbea2cbb20bf13be9c55c0f09508875b10a669648
4
- data.tar.gz: 40823ea81c2590c58058280d9c5a20bf11c6996e92ca58cbe16f67b9fe5d5693
3
+ metadata.gz: b65c246beb4ff8ae1f851071d58394a3bdc9c879277d33ee2267c8ba57586b9c
4
+ data.tar.gz: be6ce8a4242acb9a51ae39b38397861c8b1ff22fc4ae6f9f2a6dad941627de2a
5
5
  SHA512:
6
- metadata.gz: bfff60dc11675e8cec7f94bedf744abb970b67a6e1753655f6ebda5d95f5412bc5fbbc7e26bb37b512d8b2e0825570cffcbe2431a27c37a53415007b9bf9e4e2
7
- data.tar.gz: f27e443090c80e0fd069b9e782d26211d96fc26f21ce866e699ea9151b55a3d8939b98250ddf1fadcbef6fc1a9229aef9fe3a775b5d16628102aed84d57bd1f0
6
+ metadata.gz: f49d61698e073ea71c5f950eb251fdb4278aeac68e1c0dd2c07455bcb55af9e177f9057f0c13c6f0d55b51e4a4f688db2882d882ec9fead74c6c33c0c32dd218
7
+ data.tar.gz: 1b2fb34cf860ee60518fc38059c230f53adcf739a1f3dae9ea0527e095b6db2c6997b4659de46808e712b85bfb83a3dcc81539d0e3fa2ab3c2be98aaac451117
@@ -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
- npm install -g @semantic-release/changelog @semantic-release/exec @semantic-release/git
181
- npx semantic-release ${{ github.event_name == 'pull_request' && '--dry-run' || ' ' }}
196
+ yarn release ${{ github.event_name == 'pull_request' && '--dry-run' || ' ' }}
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ vendor/bundle
13
+ node_modules/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # ESI SDK Changelog
2
2
 
3
+ # [2.0.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.2.0...v2.0.0) (2021-10-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * require name from esi/sdk to esi-sdk ([2e5e996](https://github.com/bokoboshahni/esi-sdk-ruby/commit/2e5e9966343baef91bd037579607bb562edce301))
9
+
10
+
11
+ ### Features
12
+
13
+ * migrate to httpx ([fd6ec0d](https://github.com/bokoboshahni/esi-sdk-ruby/commit/fd6ec0d6910805215efceb80a5361dc4d72b9599))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * use httpx instead of faraday for http calls
19
+
20
+ # [1.2.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.1.3...v1.2.0) (2021-07-20)
21
+
22
+
23
+ ### Features
24
+
25
+ * Client improvements ([bad70ae](https://github.com/bokoboshahni/esi-sdk-ruby/commit/bad70ae4d97b8b0f93019b5b4dac73f97aad7dc0))
26
+
27
+ ## [1.1.3](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.1.2...v1.1.3) (2021-07-19)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * Use double splat for cache options ([db32f35](https://github.com/bokoboshahni/esi-sdk-ruby/commit/db32f35fe1737af8a856720366829d2da8a036de))
33
+
34
+ ## [1.1.2](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.1.1...v1.1.2) (2021-07-19)
35
+
3
36
  ## [1.1.1](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.1.0...v1.1.1) (2021-07-19)
4
37
 
5
38
  # [1.1.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.0.0...v1.1.0) (2021-07-19)
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ ruby "3.0.2"
7
7
  gemspec
8
8
 
9
9
  gem "activesupport", "~> 6.1"
10
+ gem "awesome_print", "~> 1.9"
10
11
  gem "rake", "~> 13.0"
11
12
  gem "rspec", "~> 3.10"
12
13
  gem "rubocop", "~> 1.18"
data/Gemfile.lock CHANGED
@@ -1,15 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esi-sdk (1.1.1)
5
- faraday (~> 1.5)
6
- faraday-http-cache (~> 2.2)
7
- faraday_middleware (~> 1.0)
4
+ esi-sdk (2.0.0)
5
+ httpx (~> 0.18)
6
+ retriable (~> 3.1)
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
- activesupport (6.1.4)
11
+ activesupport (6.1.4.1)
13
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
13
  i18n (>= 1.6, < 2)
15
14
  minitest (>= 5.1)
@@ -18,33 +17,16 @@ GEM
18
17
  addressable (2.8.0)
19
18
  public_suffix (>= 2.0.2, < 5.0)
20
19
  ast (2.4.2)
20
+ awesome_print (1.9.2)
21
21
  concurrent-ruby (1.1.9)
22
22
  crack (0.4.5)
23
23
  rexml
24
24
  diff-lcs (1.4.4)
25
25
  docile (1.4.0)
26
- faraday (1.5.1)
27
- faraday-em_http (~> 1.0)
28
- faraday-em_synchrony (~> 1.0)
29
- faraday-excon (~> 1.1)
30
- faraday-httpclient (~> 1.0.1)
31
- faraday-net_http (~> 1.0)
32
- faraday-net_http_persistent (~> 1.1)
33
- faraday-patron (~> 1.0)
34
- multipart-post (>= 1.2, < 3)
35
- ruby2_keywords (>= 0.0.4)
36
- faraday-em_http (1.0.0)
37
- faraday-em_synchrony (1.0.0)
38
- faraday-excon (1.1.0)
39
- faraday-http-cache (2.2.0)
40
- faraday (>= 0.8)
41
- faraday-httpclient (1.0.1)
42
- faraday-net_http (1.0.1)
43
- faraday-net_http_persistent (1.2.0)
44
- faraday-patron (1.0.0)
45
- faraday_middleware (1.0.0)
46
- faraday (~> 1.0)
47
26
  hashdiff (1.0.1)
27
+ http-2-next (0.5.0)
28
+ httpx (0.18.0)
29
+ http-2-next (>= 0.4.1)
48
30
  i18n (1.8.10)
49
31
  concurrent-ruby (~> 1.0)
50
32
  kramdown (2.3.1)
@@ -52,16 +34,16 @@ GEM
52
34
  kramdown-parser-gfm (1.1.0)
53
35
  kramdown (~> 2.0)
54
36
  minitest (5.14.4)
55
- multipart-post (2.1.1)
56
- parallel (1.20.1)
37
+ parallel (1.21.0)
57
38
  parser (3.0.2.0)
58
39
  ast (~> 2.4.1)
59
40
  public_suffix (4.0.6)
60
41
  rainbow (3.0.0)
61
42
  rake (13.0.6)
62
43
  regexp_parser (2.1.1)
44
+ retriable (3.1.2)
63
45
  rexml (3.2.5)
64
- rouge (3.26.0)
46
+ rouge (3.26.1)
65
47
  rspec (3.10.0)
66
48
  rspec-core (~> 3.10.0)
67
49
  rspec-expectations (~> 3.10.0)
@@ -75,27 +57,25 @@ GEM
75
57
  diff-lcs (>= 1.2.0, < 2.0)
76
58
  rspec-support (~> 3.10.0)
77
59
  rspec-support (3.10.2)
78
- rubocop (1.18.3)
60
+ rubocop (1.22.1)
79
61
  parallel (~> 1.10)
80
62
  parser (>= 3.0.0.0)
81
63
  rainbow (>= 2.2.2, < 4.0)
82
64
  regexp_parser (>= 1.8, < 3.0)
83
65
  rexml
84
- rubocop-ast (>= 1.7.0, < 2.0)
66
+ rubocop-ast (>= 1.12.0, < 2.0)
85
67
  ruby-progressbar (~> 1.7)
86
68
  unicode-display_width (>= 1.4.0, < 3.0)
87
- rubocop-ast (1.8.0)
69
+ rubocop-ast (1.12.0)
88
70
  parser (>= 3.0.1.1)
89
- rubocop-performance (1.11.4)
71
+ rubocop-performance (1.11.5)
90
72
  rubocop (>= 1.7.0, < 2.0)
91
73
  rubocop-ast (>= 0.4.0)
92
74
  rubocop-rake (0.6.0)
93
75
  rubocop (~> 1.0)
94
- rubocop-rspec (2.4.0)
95
- rubocop (~> 1.0)
96
- rubocop-ast (>= 1.1.0)
76
+ rubocop-rspec (2.5.0)
77
+ rubocop (~> 1.19)
97
78
  ruby-progressbar (1.11.0)
98
- ruby2_keywords (0.0.5)
99
79
  simplecov (0.21.2)
100
80
  docile (~> 1.1)
101
81
  simplecov-html (~> 0.11)
@@ -104,10 +84,10 @@ GEM
104
84
  simplecov_json_formatter (0.1.3)
105
85
  tzinfo (2.0.4)
106
86
  concurrent-ruby (~> 1.0)
107
- unicode-display_width (2.0.0)
87
+ unicode-display_width (2.1.0)
108
88
  vcr (6.0.0)
109
- webmock (3.13.0)
110
- addressable (>= 2.3.6)
89
+ webmock (3.14.0)
90
+ addressable (>= 2.8.0)
111
91
  crack (>= 0.3.2)
112
92
  hashdiff (>= 0.4.0, < 2.0.0)
113
93
  yard (0.9.26)
@@ -119,6 +99,7 @@ PLATFORMS
119
99
 
120
100
  DEPENDENCIES
121
101
  activesupport (~> 6.1)
102
+ awesome_print (~> 1.9)
122
103
  esi-sdk!
123
104
  kramdown-parser-gfm (~> 1.1)
124
105
  rake (~> 13.0)
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![Build images](https://github.com/bokoboshahni/esi-sdk-ruby/workflows/CICD/badge.svg)
2
+
1
3
  # EVE Swagger Interface (ESI) SDK
2
4
 
3
5
  ESI SDK is a Ruby API client for the EVE Swagger Interface (ESI), the official API for the [EVE Online](https://eveonline.com) MMORPG.
data/Rakefile CHANGED
@@ -142,7 +142,7 @@ task :generate do
142
142
  end
143
143
 
144
144
  param_tags = operation[:params].map do |p|
145
- "# @param #{p["name"]} [Integer,String] #{p["description"]}"
145
+ "# @param #{p["name"]} [#{p["type"].capitalize}] #{p["description"]}"
146
146
  end
147
147
 
148
148
  if operation[:body]
@@ -161,14 +161,26 @@ task :generate do
161
161
  end
162
162
 
163
163
  operation[:query]&.each do |p|
164
- signature_params << "#{p["name"]}:"
165
- param_tags << "# @param #{p["name"]} [#{p["type"].capitalize}] #{p["description"]}"
164
+ p_tag = "# @param #{p["name"]} [#{p["type"].capitalize}] "
165
+ p_tag += (p["description"]).to_s
166
+ p_tag += ". Must be one of: #{p["enum"].map { |e| "`#{e}`" }.join(", ")}" if p["enum"]
167
+ p_str = if p["default"] && p["type"] == "integer"
168
+ "#{p["name"]}: #{p["default"]}"
169
+ elsif p["default"] && p["type"] == "string"
170
+ "#{p["name"]}: \"#{p["default"]}\""
171
+ elsif !p["required"]
172
+ "#{p["name"]}: nil"
173
+ else
174
+ "#{p["name"]}:"
175
+ end
176
+ signature_params << p_str
177
+ param_tags << p_tag
166
178
  end
167
179
 
168
- if %w[delete get].include?(operation[:method])
169
- signature_params << "params: {}"
170
- param_tags << "# @param params [Hash] Additional query string parameters"
180
+ signature_params += %w[headers params].map do |p|
181
+ "#{p}: {}"
171
182
  end
183
+ param_tags << "# @param params [Hash] Additional query string parameters"
172
184
 
173
185
  param_tags += [
174
186
  "# @param headers [Hash] Additional headers"
@@ -188,9 +200,6 @@ task :generate do
188
200
  description += "# @see https://esi.evetech.net/ui/#/#{operation[:tag]}/#{operation[:name]}"
189
201
  description.gsub!(/^$\n/m, "")
190
202
 
191
- signature_params += %w[headers].map do |p|
192
- "#{p}: {}"
193
- end
194
203
  signature = "(#{signature_params.join(", ")})"
195
204
  path_parts = operation[:path].split("/")
196
205
  path_parts.map! do |p|
@@ -202,19 +211,16 @@ task :generate do
202
211
  end
203
212
  path = "#{path_parts.join("/")}/"
204
213
 
205
- http_call_params = %w[headers].map { |p| "#{p}: #{p}" }
206
- http_call_params << if %w[delete get].include?(operation[:method])
207
- "params: params"
208
- elsif operation[:body]
209
- "payload: #{body_param["name"]}"
210
- end
214
+ http_call_params = %w[headers params].map { |p| "#{p}: #{p}" }
215
+ http_call_params << ("payload: #{body_param["name"]}" if operation[:body])
211
216
 
212
- if operation[:query].any?
213
- http_call = "query_string = URI.encode_www_form([#{operation[:query].map { |q| "['#{q["name"]}', #{q["name"]}]" }.join(", ")}])\n"
214
- http_call += "#{operation[:method]}(\"#{path}?\#{query_string}\", #{http_call_params.join(", ")})"
215
- else
216
- http_call = "#{operation[:method]}(\"#{path}\", #{http_call_params.join(", ")})"
217
- end
217
+ params_merge = if operation[:query].any?
218
+ "params.merge!(#{operation[:query].map { |q| "'#{q["name"]}' => #{q["name"]}" }.join(", ")})"
219
+ else
220
+ ""
221
+ end
222
+
223
+ http_call = "#{operation[:method]}(\"#{path}\", #{http_call_params.join(", ")})"
218
224
 
219
225
  alias_methods = if method_aliases[method_name]
220
226
  Array(method_aliases[method_name]).sort.map do |alias_name|
@@ -226,13 +232,26 @@ task :generate do
226
232
  alias_methods << "alias_method :#{operation[:name]}, :#{method_name}" unless operation[:name] == method_name
227
233
  alias_methods = alias_methods.join("\n")
228
234
 
229
- a << <<~METHOD_DEFINITION
230
- #{description}
231
- def #{method_name}#{signature}
232
- #{http_call}
233
- end
234
- #{alias_methods}
235
- METHOD_DEFINITION
235
+ if operation[:responses]["200"] && operation[:responses]["200"]["headers"] && operation[:responses]["200"]["headers"].key?("X-Pages")
236
+ a << <<~METHOD_DEFINITION
237
+ #{description}
238
+ def #{method_name}#{signature}
239
+ #{params_merge}
240
+ responses = #{http_call}
241
+ responses.map(&:json).reduce([], :concat)
242
+ end
243
+ #{alias_methods}
244
+ METHOD_DEFINITION
245
+ else
246
+ a << <<~METHOD_DEFINITION
247
+ #{description}
248
+ def #{method_name}#{signature}
249
+ #{params_merge}
250
+ #{http_call}.json
251
+ end
252
+ #{alias_methods}
253
+ METHOD_DEFINITION
254
+ end
236
255
  end
237
256
 
238
257
  lib_content = <<~MODULE_DEFINITION
@@ -269,11 +288,6 @@ task :generate do
269
288
  success_params = operation[:params].map { |p| "#{p["name"]}: \"1234567890\"" }
270
289
  success_params += operation[:query].map { |p| "#{p["name"]}: \"1234567890\"" }
271
290
 
272
- if operation[:query].any?
273
- query = URI.encode_www_form(operation[:query].map { |q| [q["name"], "1234567890"] })
274
- success_path = "#{success_path}?#{query}"
275
- end
276
-
277
291
  if operation[:body]
278
292
  body_param = operation[:body]
279
293
  body_name = body_param["name"]
@@ -287,12 +301,16 @@ task :generate do
287
301
  success_params << "#{body_name}: #{body_value}"
288
302
  end
289
303
 
304
+ with_query = operation[:query].any? ? ".with(query: { #{operation[:query].map { |p| "#{p["name"]}: \"1234567890\"" }.join(", ")} })" : ""
305
+
306
+ extra_headers = success_desc["headers"] && success_desc["headers"]["X-Pages"] ? ", 'X-Pages': '1'" : ""
307
+
290
308
  describe = " describe \"##{method_name}\" do\n"
291
309
  describe += " context \"when the response is #{success_code}\" do\n"
292
310
  describe += " let(:response) { #{success_response_body} }\n"
293
311
  describe += "\n"
294
312
  describe += " before do\n"
295
- describe += " stub_request(:#{operation[:method]}, \"https://esi.evetech.net/latest#{success_path}\").to_return(body: response.to_json)\n"
313
+ 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"
296
314
  describe += " end\n"
297
315
  describe += "\n"
298
316
  describe += " it \"returns the response\" do\n"
@@ -303,13 +321,15 @@ task :generate do
303
321
  describe += "\n"
304
322
 
305
323
  error_contexts = operation[:errors].map do |(code, error)|
324
+ next if %w[502 503 504].include?(code)
325
+
306
326
  error_response_body = error["examples"]["application/json"].inspect
307
327
 
308
328
  context = " context \"when the response is #{code}\" do\n"
309
329
  context += " let(:response) { #{error_response_body} }\n"
310
330
  context += "\n"
311
331
  context += " before do\n"
312
- context += " stub_request(:#{operation[:method]}, \"https://esi.evetech.net/latest#{success_path}\").to_return(body: response.to_json, status: #{code})\n"
332
+ 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"
313
333
  context += " end\n"
314
334
  context += "\n"
315
335
  context += " it \"raises a #{error_mapping[code.to_i]} error\" do\n"
@@ -327,8 +347,8 @@ task :generate do
327
347
  spec_content = <<~SPEC_FILE
328
348
  # frozen_string_literal: true
329
349
 
330
- RSpec.describe ESI::Client::#{module_name} do
331
- subject(:client) { ESI::Client.new(user_agent: \"ESI SDK Tests/1.0; +(https://github.com/bokoboshahni/esi-sdk)\") }
350
+ RSpec.describe ESI::Client::#{module_name}, type: :stub do
351
+ subject(:client) { ESI::Client.new(user_agent: \"esi-sdk-ruby Tests/1.0; +(https://github.com/bokoboshahni/esi-sdk-ruby)\") }
332
352
 
333
353
  #{describe_blocks.join("\n\n")}
334
354
  end
data/bin/console CHANGED
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "bundler/setup"
5
- require "esi/sdk"
5
+ require "esi-sdk"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
data/esi-sdk.gemspec CHANGED
@@ -26,7 +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 "faraday", "~> 1.5"
30
- spec.add_dependency "faraday-http-cache", "~> 2.2"
31
- spec.add_dependency "faraday_middleware", "~> 1.0"
29
+ spec.add_dependency "httpx", "~> 0.18"
30
+ spec.add_dependency "retriable", "~> 3.1"
32
31
  end
@@ -13,7 +13,7 @@ module ESI
13
13
  # @esi_version v3
14
14
  # @esi_version v4
15
15
  #
16
- # @param alliance_id [Integer,String] An EVE alliance ID
16
+ # @param alliance_id [Integer] An EVE alliance ID
17
17
  # @param params [Hash] Additional query string parameters
18
18
  # @param headers [Hash] Additional headers
19
19
  #
@@ -25,8 +25,8 @@ module ESI
25
25
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
26
26
  #
27
27
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id
28
- def get_alliance(alliance_id:, params: {}, headers: {})
29
- get("/alliances/#{alliance_id}/", headers: headers, params: params)
28
+ def get_alliance(alliance_id:, headers: {}, params: {})
29
+ get("/alliances/#{alliance_id}/", headers: headers, params: params).json
30
30
  end
31
31
  alias get_alliances_alliance_id get_alliance
32
32
 
@@ -39,7 +39,7 @@ module ESI
39
39
  # @esi_version v1
40
40
  # @esi_version v2
41
41
  #
42
- # @param alliance_id [Integer,String] An EVE alliance ID
42
+ # @param alliance_id [Integer] An EVE alliance ID
43
43
  # @param params [Hash] Additional query string parameters
44
44
  # @param headers [Hash] Additional headers
45
45
  #
@@ -50,8 +50,8 @@ module ESI
50
50
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
51
51
  #
52
52
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_corporations
53
- def get_alliance_corporations(alliance_id:, params: {}, headers: {})
54
- get("/alliances/#{alliance_id}/corporations/", headers: headers, params: params)
53
+ def get_alliance_corporations(alliance_id:, headers: {}, params: {})
54
+ get("/alliances/#{alliance_id}/corporations/", headers: headers, params: params).json
55
55
  end
56
56
  alias get_alliances_alliance_id_corporations get_alliance_corporations
57
57
 
@@ -60,7 +60,7 @@ module ESI
60
60
  # @esi_version legacy
61
61
  # @esi_version v1
62
62
  #
63
- # @param alliance_id [Integer,String] An EVE alliance ID
63
+ # @param alliance_id [Integer] An EVE alliance ID
64
64
  # @param params [Hash] Additional query string parameters
65
65
  # @param headers [Hash] Additional headers
66
66
  #
@@ -72,8 +72,8 @@ module ESI
72
72
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
73
73
  #
74
74
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_icons
75
- def get_alliance_icons(alliance_id:, params: {}, headers: {})
76
- get("/alliances/#{alliance_id}/icons/", headers: headers, params: params)
75
+ def get_alliance_icons(alliance_id:, headers: {}, params: {})
76
+ get("/alliances/#{alliance_id}/icons/", headers: headers, params: params).json
77
77
  end
78
78
  alias get_alliances_alliance_id_icons get_alliance_icons
79
79
 
@@ -96,8 +96,8 @@ module ESI
96
96
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
97
97
  #
98
98
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances
99
- def get_alliances(params: {}, headers: {})
100
- get("/alliances/", headers: headers, params: params)
99
+ def get_alliances(headers: {}, params: {})
100
+ get("/alliances/", headers: headers, params: params).json
101
101
  end
102
102
  end
103
103
  end
@@ -15,7 +15,7 @@ module ESI
15
15
  # @esi_version dev
16
16
  # @esi_version v5
17
17
  #
18
- # @param character_id [Integer,String] An EVE character ID
18
+ # @param character_id [Integer] An EVE character ID
19
19
  # @param params [Hash] Additional query string parameters
20
20
  # @param headers [Hash] Additional headers
21
21
  #
@@ -29,8 +29,9 @@ module ESI
29
29
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
30
30
  #
31
31
  # @see https://esi.evetech.net/ui/#/Assets/get_characters_character_id_assets
32
- def get_character_assets(character_id:, params: {}, headers: {})
33
- get("/characters/#{character_id}/assets/", headers: headers, params: params)
32
+ def get_character_assets(character_id:, headers: {}, params: {})
33
+ responses = get("/characters/#{character_id}/assets/", headers: headers, params: params)
34
+ responses.map(&:json).reduce([], :concat)
34
35
  end
35
36
  alias get_characters_character_id_assets get_character_assets
36
37
 
@@ -45,7 +46,7 @@ module ESI
45
46
  # @esi_version dev
46
47
  # @esi_version v5
47
48
  #
48
- # @param corporation_id [Integer,String] An EVE corporation ID
49
+ # @param corporation_id [Integer] An EVE corporation ID
49
50
  # @param params [Hash] Additional query string parameters
50
51
  # @param headers [Hash] Additional headers
51
52
  #
@@ -58,8 +59,9 @@ module ESI
58
59
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
59
60
  #
60
61
  # @see https://esi.evetech.net/ui/#/Assets/get_corporations_corporation_id_assets
61
- def get_corporation_assets(corporation_id:, params: {}, headers: {})
62
- get("/corporations/#{corporation_id}/assets/", headers: headers, params: params)
62
+ def get_corporation_assets(corporation_id:, headers: {}, params: {})
63
+ responses = get("/corporations/#{corporation_id}/assets/", headers: headers, params: params)
64
+ responses.map(&:json).reduce([], :concat)
63
65
  end
64
66
  alias get_corporations_corporation_id_assets get_corporation_assets
65
67
 
@@ -72,8 +74,9 @@ module ESI
72
74
  # @esi_version dev
73
75
  # @esi_version v2
74
76
  #
75
- # @param character_id [Integer,String] An EVE character ID
77
+ # @param character_id [Integer] An EVE character ID
76
78
  # @param item_ids [Array] A list of item ids
79
+ # @param params [Hash] Additional query string parameters
77
80
  # @param headers [Hash] Additional headers
78
81
  #
79
82
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -85,8 +88,8 @@ module ESI
85
88
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
86
89
  #
87
90
  # @see https://esi.evetech.net/ui/#/Assets/post_characters_character_id_assets_locations
88
- def post_character_asset_locations(character_id:, item_ids:, headers: {})
89
- post("/characters/#{character_id}/assets/locations/", headers: headers, payload: item_ids)
91
+ def post_character_asset_locations(character_id:, item_ids:, headers: {}, params: {})
92
+ post("/characters/#{character_id}/assets/locations/", headers: headers, params: params, payload: item_ids).json
90
93
  end
91
94
  alias post_characters_character_id_assets_locations post_character_asset_locations
92
95
 
@@ -100,8 +103,9 @@ module ESI
100
103
  # @esi_version legacy
101
104
  # @esi_version v1
102
105
  #
103
- # @param character_id [Integer,String] An EVE character ID
106
+ # @param character_id [Integer] An EVE character ID
104
107
  # @param item_ids [Array] A list of item ids
108
+ # @param params [Hash] Additional query string parameters
105
109
  # @param headers [Hash] Additional headers
106
110
  #
107
111
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -113,8 +117,8 @@ module ESI
113
117
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
114
118
  #
115
119
  # @see https://esi.evetech.net/ui/#/Assets/post_characters_character_id_assets_names
116
- def post_character_asset_names(character_id:, item_ids:, headers: {})
117
- post("/characters/#{character_id}/assets/names/", headers: headers, payload: item_ids)
120
+ def post_character_asset_names(character_id:, item_ids:, headers: {}, params: {})
121
+ post("/characters/#{character_id}/assets/names/", headers: headers, params: params, payload: item_ids).json
118
122
  end
119
123
  alias post_characters_character_id_assets_names post_character_asset_names
120
124
 
@@ -127,8 +131,9 @@ module ESI
127
131
  # @esi_version dev
128
132
  # @esi_version v2
129
133
  #
130
- # @param corporation_id [Integer,String] An EVE corporation ID
134
+ # @param corporation_id [Integer] An EVE corporation ID
131
135
  # @param item_ids [Array] A list of item ids
136
+ # @param params [Hash] Additional query string parameters
132
137
  # @param headers [Hash] Additional headers
133
138
  #
134
139
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -141,8 +146,8 @@ module ESI
141
146
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
142
147
  #
143
148
  # @see https://esi.evetech.net/ui/#/Assets/post_corporations_corporation_id_assets_locations
144
- def post_corporation_asset_locations(corporation_id:, item_ids:, headers: {})
145
- post("/corporations/#{corporation_id}/assets/locations/", headers: headers, payload: item_ids)
149
+ def post_corporation_asset_locations(corporation_id:, item_ids:, headers: {}, params: {})
150
+ post("/corporations/#{corporation_id}/assets/locations/", headers: headers, params: params, payload: item_ids).json
146
151
  end
147
152
  alias post_corporations_corporation_id_assets_locations post_corporation_asset_locations
148
153
 
@@ -156,8 +161,9 @@ module ESI
156
161
  # @esi_version legacy
157
162
  # @esi_version v1
158
163
  #
159
- # @param corporation_id [Integer,String] An EVE corporation ID
164
+ # @param corporation_id [Integer] An EVE corporation ID
160
165
  # @param item_ids [Array] A list of item ids
166
+ # @param params [Hash] Additional query string parameters
161
167
  # @param headers [Hash] Additional headers
162
168
  #
163
169
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -170,8 +176,8 @@ module ESI
170
176
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
171
177
  #
172
178
  # @see https://esi.evetech.net/ui/#/Assets/post_corporations_corporation_id_assets_names
173
- def post_corporation_asset_names(corporation_id:, item_ids:, headers: {})
174
- post("/corporations/#{corporation_id}/assets/names/", headers: headers, payload: item_ids)
179
+ def post_corporation_asset_names(corporation_id:, item_ids:, headers: {}, params: {})
180
+ post("/corporations/#{corporation_id}/assets/names/", headers: headers, params: params, payload: item_ids).json
175
181
  end
176
182
  alias post_corporations_corporation_id_assets_names post_corporation_asset_names
177
183
  end