esi-sdk 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/cicd.yml +17 -2
  3. data/.gitignore +2 -0
  4. data/CHANGELOG.md +17 -0
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +21 -46
  7. data/README.md +0 -13
  8. data/Rakefile +31 -15
  9. data/bin/console +1 -1
  10. data/esi-sdk.gemspec +2 -4
  11. data/lib/esi/client/alliance.rb +4 -4
  12. data/lib/esi/client/assets.rb +8 -6
  13. data/lib/esi/client/bookmarks.rb +8 -4
  14. data/lib/esi/client/calendar.rb +4 -4
  15. data/lib/esi/client/character.rb +16 -15
  16. data/lib/esi/client/clones.rb +2 -2
  17. data/lib/esi/client/contacts.rb +12 -9
  18. data/lib/esi/client/contracts.rb +15 -9
  19. data/lib/esi/client/corporation.rb +31 -22
  20. data/lib/esi/client/dogma.rb +5 -5
  21. data/lib/esi/client/faction_warfare.rb +8 -8
  22. data/lib/esi/client/fittings.rb +3 -3
  23. data/lib/esi/client/fleets.rb +14 -14
  24. data/lib/esi/client/incursions.rb +1 -1
  25. data/lib/esi/client/industry.rb +13 -8
  26. data/lib/esi/client/insurance.rb +1 -1
  27. data/lib/esi/client/killmails.rb +5 -3
  28. data/lib/esi/client/location.rb +3 -3
  29. data/lib/esi/client/loyalty.rb +2 -2
  30. data/lib/esi/client/mail.rb +8 -8
  31. data/lib/esi/client/market.rb +17 -11
  32. data/lib/esi/client/opportunities.rb +5 -5
  33. data/lib/esi/client/planetary_interaction.rb +5 -4
  34. data/lib/esi/client/routes.rb +1 -1
  35. data/lib/esi/client/search.rb +2 -2
  36. data/lib/esi/client/skills.rb +3 -3
  37. data/lib/esi/client/sovereignty.rb +3 -3
  38. data/lib/esi/client/status.rb +1 -1
  39. data/lib/esi/client/universe.rb +32 -30
  40. data/lib/esi/client/user_interface.rb +5 -5
  41. data/lib/esi/client/wallet.rb +8 -6
  42. data/lib/esi/client/wars.rb +4 -3
  43. data/lib/esi/client.rb +65 -95
  44. data/lib/esi/errors.rb +3 -3
  45. data/lib/esi/version.rb +1 -1
  46. data/package.json +19 -0
  47. data/yarn.lock +3695 -0
  48. metadata +10 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32e80c8b57db70012c9002de31f5533508fc5144d6d416b5d5f3c1dd588805df
4
- data.tar.gz: 1f20d6ef7531035b260c4b5d936ff4bed4f6ac1d9e3222a771c7717c4b8f236c
3
+ metadata.gz: b65c246beb4ff8ae1f851071d58394a3bdc9c879277d33ee2267c8ba57586b9c
4
+ data.tar.gz: be6ce8a4242acb9a51ae39b38397861c8b1ff22fc4ae6f9f2a6dad941627de2a
5
5
  SHA512:
6
- metadata.gz: d2d30b0b42a5b16e4756f30fd5ed490e5129db9caa7e67ccac5bbc26ae17cb316589d38ce466daea8cb3b2eb4b2553a4385e8d780a1d786b56ce2cf61422d26b
7
- data.tar.gz: 40b27c822b0356183a25b88aa6ddad08b975c152b772beae0ee2c047a4579483a9c8333879371db5e21c954bfffa75244e812df529331fe7d712bcf105943ecb
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 conventional-changelog-angular
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,22 @@
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
+
3
20
  # [1.2.0](https://github.com/bokoboshahni/esi-sdk-ruby/compare/v1.1.3...v1.2.0) (2021-07-20)
4
21
 
5
22
 
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,16 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esi-sdk (1.2.0)
5
- faraday (~> 1.5)
6
- faraday-http-cache (~> 2.2)
7
- faraday_middleware (~> 1.0)
8
- typhoeus (~> 1.4)
4
+ esi-sdk (2.0.0)
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
- multipart-post (2.1.1)
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.0)
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.18.3)
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.7.0, < 2.0)
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.8.0)
69
+ rubocop-ast (1.12.0)
92
70
  parser (>= 3.0.1.1)
93
- rubocop-performance (1.11.4)
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.4.0)
99
- rubocop (~> 1.0)
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.0.0)
87
+ unicode-display_width (2.1.0)
114
88
  vcr (6.0.0)
115
- webmock (3.13.0)
116
- addressable (>= 2.3.6)
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
@@ -55,19 +55,6 @@ response = client.get_character(character_id: 2113024536)
55
55
 
56
56
  See the documentation for [ESI::Client](https://bokoboshahni.github.io/esi-sdk-ruby/ESI/Client.html) for detailed information on each endpoint.
57
57
 
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
58
  ## Development
72
59
 
73
60
  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
@@ -214,12 +214,13 @@ task :generate do
214
214
  http_call_params = %w[headers params].map { |p| "#{p}: #{p}" }
215
215
  http_call_params << ("payload: #{body_param["name"]}" if operation[:body])
216
216
 
217
- if operation[:query].any?
218
- http_call = "params.merge!(#{operation[:query].map { |q| "'#{q["name"]}' => #{q["name"]}" }.join(", ")})\n"
219
- http_call += "#{operation[:method]}(\"#{path}\", #{http_call_params.join(", ")})"
220
- else
221
- http_call = "#{operation[:method]}(\"#{path}\", #{http_call_params.join(", ")})"
222
- 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(", ")})"
223
224
 
224
225
  alias_methods = if method_aliases[method_name]
225
226
  Array(method_aliases[method_name]).sort.map do |alias_name|
@@ -231,13 +232,26 @@ task :generate do
231
232
  alias_methods << "alias_method :#{operation[:name]}, :#{method_name}" unless operation[:name] == method_name
232
233
  alias_methods = alias_methods.join("\n")
233
234
 
234
- a << <<~METHOD_DEFINITION
235
- #{description}
236
- def #{method_name}#{signature}
237
- #{http_call}
238
- end
239
- #{alias_methods}
240
- 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
241
255
  end
242
256
 
243
257
  lib_content = <<~MODULE_DEFINITION
@@ -289,12 +303,14 @@ task :generate do
289
303
 
290
304
  with_query = operation[:query].any? ? ".with(query: { #{operation[:query].map { |p| "#{p["name"]}: \"1234567890\"" }.join(", ")} })" : ""
291
305
 
306
+ extra_headers = success_desc["headers"] && success_desc["headers"]["X-Pages"] ? ", 'X-Pages': '1'" : ""
307
+
292
308
  describe = " describe \"##{method_name}\" do\n"
293
309
  describe += " context \"when the response is #{success_code}\" do\n"
294
310
  describe += " let(:response) { #{success_response_body} }\n"
295
311
  describe += "\n"
296
312
  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"
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"
298
314
  describe += " end\n"
299
315
  describe += "\n"
300
316
  describe += " it \"returns the response\" do\n"
@@ -313,7 +329,7 @@ task :generate do
313
329
  context += " let(:response) { #{error_response_body} }\n"
314
330
  context += "\n"
315
331
  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"
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"
317
333
  context += " end\n"
318
334
  context += "\n"
319
335
  context += " it \"raises a #{error_mapping[code.to_i]} error\" do\n"
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,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 "faraday", "~> 1.5"
30
- spec.add_dependency "faraday-http-cache", "~> 2.2"
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
@@ -26,7 +26,7 @@ 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
- get("/alliances/#{alliance_id}/", headers: headers, params: 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
 
@@ -51,7 +51,7 @@ module ESI
51
51
  #
52
52
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_corporations
53
53
  def get_alliance_corporations(alliance_id:, headers: {}, params: {})
54
- get("/alliances/#{alliance_id}/corporations/", headers: headers, params: 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
 
@@ -73,7 +73,7 @@ module ESI
73
73
  #
74
74
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances_alliance_id_icons
75
75
  def get_alliance_icons(alliance_id:, headers: {}, params: {})
76
- get("/alliances/#{alliance_id}/icons/", headers: headers, params: 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
 
@@ -97,7 +97,7 @@ module ESI
97
97
  #
98
98
  # @see https://esi.evetech.net/ui/#/Alliance/get_alliances
99
99
  def get_alliances(headers: {}, params: {})
100
- get("/alliances/", headers: headers, params: params)
100
+ get("/alliances/", headers: headers, params: params).json
101
101
  end
102
102
  end
103
103
  end
@@ -30,7 +30,8 @@ module ESI
30
30
  #
31
31
  # @see https://esi.evetech.net/ui/#/Assets/get_characters_character_id_assets
32
32
  def get_character_assets(character_id:, headers: {}, params: {})
33
- get("/characters/#{character_id}/assets/", headers: headers, params: 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
 
@@ -59,7 +60,8 @@ module ESI
59
60
  #
60
61
  # @see https://esi.evetech.net/ui/#/Assets/get_corporations_corporation_id_assets
61
62
  def get_corporation_assets(corporation_id:, headers: {}, params: {})
62
- get("/corporations/#{corporation_id}/assets/", headers: headers, params: 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
 
@@ -87,7 +89,7 @@ module ESI
87
89
  #
88
90
  # @see https://esi.evetech.net/ui/#/Assets/post_characters_character_id_assets_locations
89
91
  def post_character_asset_locations(character_id:, item_ids:, headers: {}, params: {})
90
- post("/characters/#{character_id}/assets/locations/", headers: headers, params: params, payload: item_ids)
92
+ post("/characters/#{character_id}/assets/locations/", headers: headers, params: params, payload: item_ids).json
91
93
  end
92
94
  alias post_characters_character_id_assets_locations post_character_asset_locations
93
95
 
@@ -116,7 +118,7 @@ module ESI
116
118
  #
117
119
  # @see https://esi.evetech.net/ui/#/Assets/post_characters_character_id_assets_names
118
120
  def post_character_asset_names(character_id:, item_ids:, headers: {}, params: {})
119
- post("/characters/#{character_id}/assets/names/", headers: headers, params: params, payload: item_ids)
121
+ post("/characters/#{character_id}/assets/names/", headers: headers, params: params, payload: item_ids).json
120
122
  end
121
123
  alias post_characters_character_id_assets_names post_character_asset_names
122
124
 
@@ -145,7 +147,7 @@ module ESI
145
147
  #
146
148
  # @see https://esi.evetech.net/ui/#/Assets/post_corporations_corporation_id_assets_locations
147
149
  def post_corporation_asset_locations(corporation_id:, item_ids:, headers: {}, params: {})
148
- post("/corporations/#{corporation_id}/assets/locations/", headers: headers, params: params, payload: item_ids)
150
+ post("/corporations/#{corporation_id}/assets/locations/", headers: headers, params: params, payload: item_ids).json
149
151
  end
150
152
  alias post_corporations_corporation_id_assets_locations post_corporation_asset_locations
151
153
 
@@ -175,7 +177,7 @@ module ESI
175
177
  #
176
178
  # @see https://esi.evetech.net/ui/#/Assets/post_corporations_corporation_id_assets_names
177
179
  def post_corporation_asset_names(corporation_id:, item_ids:, headers: {}, params: {})
178
- post("/corporations/#{corporation_id}/assets/names/", headers: headers, params: params, payload: item_ids)
180
+ post("/corporations/#{corporation_id}/assets/names/", headers: headers, params: params, payload: item_ids).json
179
181
  end
180
182
  alias post_corporations_corporation_id_assets_names post_corporation_asset_names
181
183
  end
@@ -29,7 +29,8 @@ module ESI
29
29
  #
30
30
  # @see https://esi.evetech.net/ui/#/Bookmarks/get_characters_character_id_bookmarks_folders
31
31
  def get_character_bookmark_folders(character_id:, headers: {}, params: {})
32
- get("/characters/#{character_id}/bookmarks/folders/", headers: headers, params: params)
32
+ responses = get("/characters/#{character_id}/bookmarks/folders/", headers: headers, params: params)
33
+ responses.map(&:json).reduce([], :concat)
33
34
  end
34
35
  alias get_characters_character_id_bookmarks_folders get_character_bookmark_folders
35
36
 
@@ -58,7 +59,8 @@ module ESI
58
59
  #
59
60
  # @see https://esi.evetech.net/ui/#/Bookmarks/get_characters_character_id_bookmarks
60
61
  def get_character_bookmarks(character_id:, headers: {}, params: {})
61
- get("/characters/#{character_id}/bookmarks/", headers: headers, params: params)
62
+ responses = get("/characters/#{character_id}/bookmarks/", headers: headers, params: params)
63
+ responses.map(&:json).reduce([], :concat)
62
64
  end
63
65
  alias get_characters_character_id_bookmarks get_character_bookmarks
64
66
 
@@ -88,7 +90,8 @@ module ESI
88
90
  #
89
91
  # @see https://esi.evetech.net/ui/#/Bookmarks/get_corporations_corporation_id_bookmarks_folders
90
92
  def get_corporation_bookmark_folders(corporation_id:, headers: {}, params: {})
91
- get("/corporations/#{corporation_id}/bookmarks/folders/", headers: headers, params: params)
93
+ responses = get("/corporations/#{corporation_id}/bookmarks/folders/", headers: headers, params: params)
94
+ responses.map(&:json).reduce([], :concat)
92
95
  end
93
96
  alias get_corporations_corporation_id_bookmarks_folders get_corporation_bookmark_folders
94
97
 
@@ -118,7 +121,8 @@ module ESI
118
121
  #
119
122
  # @see https://esi.evetech.net/ui/#/Bookmarks/get_corporations_corporation_id_bookmarks
120
123
  def get_corporation_bookmarks(corporation_id:, headers: {}, params: {})
121
- get("/corporations/#{corporation_id}/bookmarks/", headers: headers, params: params)
124
+ responses = get("/corporations/#{corporation_id}/bookmarks/", headers: headers, params: params)
125
+ responses.map(&:json).reduce([], :concat)
122
126
  end
123
127
  alias get_corporations_corporation_id_bookmarks get_corporation_bookmarks
124
128
  end
@@ -33,7 +33,7 @@ module ESI
33
33
  # @see https://esi.evetech.net/ui/#/Calendar/get_characters_character_id_calendar
34
34
  def get_character_calendar(character_id:, from_event: nil, headers: {}, params: {})
35
35
  params.merge!("from_event" => from_event)
36
- get("/characters/#{character_id}/calendar/", headers: headers, params: params)
36
+ get("/characters/#{character_id}/calendar/", headers: headers, params: params).json
37
37
  end
38
38
  alias get_characters_character_id_calendar get_character_calendar
39
39
 
@@ -66,7 +66,7 @@ module ESI
66
66
  #
67
67
  # @see https://esi.evetech.net/ui/#/Calendar/get_characters_character_id_calendar_event_id
68
68
  def get_character_calendar_event(character_id:, event_id:, headers: {}, params: {})
69
- get("/characters/#{character_id}/calendar/#{event_id}/", headers: headers, params: params)
69
+ get("/characters/#{character_id}/calendar/#{event_id}/", headers: headers, params: params).json
70
70
  end
71
71
  alias get_characters_character_id_calendar_event_id get_character_calendar_event
72
72
 
@@ -99,7 +99,7 @@ module ESI
99
99
  #
100
100
  # @see https://esi.evetech.net/ui/#/Calendar/get_characters_character_id_calendar_event_id_attendees
101
101
  def get_character_calendar_event_attendees(character_id:, event_id:, headers: {}, params: {})
102
- get("/characters/#{character_id}/calendar/#{event_id}/attendees/", headers: headers, params: params)
102
+ get("/characters/#{character_id}/calendar/#{event_id}/attendees/", headers: headers, params: params).json
103
103
  end
104
104
  alias get_characters_character_id_calendar_event_id_attendees get_character_calendar_event_attendees
105
105
 
@@ -132,7 +132,7 @@ module ESI
132
132
  #
133
133
  # @see https://esi.evetech.net/ui/#/Calendar/put_characters_character_id_calendar_event_id
134
134
  def put_character_calendar_event(character_id:, event_id:, response:, headers: {}, params: {})
135
- put("/characters/#{character_id}/calendar/#{event_id}/", headers: headers, params: params, payload: response)
135
+ put("/characters/#{character_id}/calendar/#{event_id}/", headers: headers, params: params, payload: response).json
136
136
  end
137
137
  alias put_characters_character_id_calendar_event_id put_character_calendar_event
138
138
  end
@@ -9,7 +9,7 @@ module ESI
9
9
  # This endpoint is cached for up to 86400 seconds.
10
10
  #
11
11
  # @esi_version dev
12
- # @esi_version v4
12
+ # @esi_version v5
13
13
  #
14
14
  # @param character_id [Integer] An EVE character ID
15
15
  # @param params [Hash] Additional query string parameters
@@ -24,7 +24,7 @@ module ESI
24
24
  #
25
25
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id
26
26
  def get_character(character_id:, headers: {}, params: {})
27
- get("/characters/#{character_id}/", headers: headers, params: params)
27
+ get("/characters/#{character_id}/", headers: headers, params: params).json
28
28
  end
29
29
  alias get_characters_character_id get_character
30
30
 
@@ -53,7 +53,7 @@ module ESI
53
53
  #
54
54
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_agents_research
55
55
  def get_character_agents_research(character_id:, headers: {}, params: {})
56
- get("/characters/#{character_id}/agents_research/", headers: headers, params: params)
56
+ get("/characters/#{character_id}/agents_research/", headers: headers, params: params).json
57
57
  end
58
58
  alias get_characters_character_id_agents_research get_character_agents_research
59
59
 
@@ -82,7 +82,8 @@ module ESI
82
82
  #
83
83
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_blueprints
84
84
  def get_character_blueprints(character_id:, headers: {}, params: {})
85
- get("/characters/#{character_id}/blueprints/", headers: headers, params: params)
85
+ responses = get("/characters/#{character_id}/blueprints/", headers: headers, params: params)
86
+ responses.map(&:json).reduce([], :concat)
86
87
  end
87
88
  alias get_characters_character_id_blueprints get_character_blueprints
88
89
 
@@ -105,7 +106,7 @@ module ESI
105
106
  #
106
107
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_corporationhistory
107
108
  def get_character_corporationhistory(character_id:, headers: {}, params: {})
108
- get("/characters/#{character_id}/corporationhistory/", headers: headers, params: params)
109
+ get("/characters/#{character_id}/corporationhistory/", headers: headers, params: params).json
109
110
  end
110
111
  alias get_character_corporation_history get_character_corporationhistory
111
112
  alias get_characters_character_id_corporationhistory get_character_corporationhistory
@@ -135,7 +136,7 @@ module ESI
135
136
  #
136
137
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_fatigue
137
138
  def get_character_fatigue(character_id:, headers: {}, params: {})
138
- get("/characters/#{character_id}/fatigue/", headers: headers, params: params)
139
+ get("/characters/#{character_id}/fatigue/", headers: headers, params: params).json
139
140
  end
140
141
  alias get_characters_character_id_fatigue get_character_fatigue
141
142
 
@@ -164,7 +165,7 @@ module ESI
164
165
  #
165
166
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_medals
166
167
  def get_character_medals(character_id:, headers: {}, params: {})
167
- get("/characters/#{character_id}/medals/", headers: headers, params: params)
168
+ get("/characters/#{character_id}/medals/", headers: headers, params: params).json
168
169
  end
169
170
  alias get_characters_character_id_medals get_character_medals
170
171
 
@@ -193,7 +194,7 @@ module ESI
193
194
  #
194
195
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_notifications_contacts
195
196
  def get_character_notification_contacts(character_id:, headers: {}, params: {})
196
- get("/characters/#{character_id}/notifications/contacts/", headers: headers, params: params)
197
+ get("/characters/#{character_id}/notifications/contacts/", headers: headers, params: params).json
197
198
  end
198
199
  alias get_characters_character_id_notifications_contacts get_character_notification_contacts
199
200
 
@@ -223,7 +224,7 @@ module ESI
223
224
  #
224
225
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_notifications
225
226
  def get_character_notifications(character_id:, headers: {}, params: {})
226
- get("/characters/#{character_id}/notifications/", headers: headers, params: params)
227
+ get("/characters/#{character_id}/notifications/", headers: headers, params: params).json
227
228
  end
228
229
  alias get_characters_character_id_notifications get_character_notifications
229
230
 
@@ -246,7 +247,7 @@ module ESI
246
247
  #
247
248
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_portrait
248
249
  def get_character_portrait(character_id:, headers: {}, params: {})
249
- get("/characters/#{character_id}/portrait/", headers: headers, params: params)
250
+ get("/characters/#{character_id}/portrait/", headers: headers, params: params).json
250
251
  end
251
252
  alias get_characters_character_id_portrait get_character_portrait
252
253
 
@@ -275,7 +276,7 @@ module ESI
275
276
  #
276
277
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_roles
277
278
  def get_character_roles(character_id:, headers: {}, params: {})
278
- get("/characters/#{character_id}/roles/", headers: headers, params: params)
279
+ get("/characters/#{character_id}/roles/", headers: headers, params: params).json
279
280
  end
280
281
  alias get_characters_character_id_roles get_character_roles
281
282
 
@@ -304,7 +305,7 @@ module ESI
304
305
  #
305
306
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_standings
306
307
  def get_character_standings(character_id:, headers: {}, params: {})
307
- get("/characters/#{character_id}/standings/", headers: headers, params: params)
308
+ get("/characters/#{character_id}/standings/", headers: headers, params: params).json
308
309
  end
309
310
  alias get_characters_character_id_standings get_character_standings
310
311
 
@@ -333,7 +334,7 @@ module ESI
333
334
  #
334
335
  # @see https://esi.evetech.net/ui/#/Character/get_characters_character_id_titles
335
336
  def get_character_titles(character_id:, headers: {}, params: {})
336
- get("/characters/#{character_id}/titles/", headers: headers, params: params)
337
+ get("/characters/#{character_id}/titles/", headers: headers, params: params).json
337
338
  end
338
339
  alias get_characters_character_id_titles get_character_titles
339
340
 
@@ -361,7 +362,7 @@ module ESI
361
362
  #
362
363
  # @see https://esi.evetech.net/ui/#/Character/post_characters_character_id_cspa
363
364
  def post_character_cspa(character_id:, characters:, headers: {}, params: {})
364
- post("/characters/#{character_id}/cspa/", headers: headers, params: params, payload: characters)
365
+ post("/characters/#{character_id}/cspa/", headers: headers, params: params, payload: characters).json
365
366
  end
366
367
  alias post_characters_character_id_cspa post_character_cspa
367
368
 
@@ -384,7 +385,7 @@ module ESI
384
385
  #
385
386
  # @see https://esi.evetech.net/ui/#/Character/post_characters_affiliation
386
387
  def post_characters_affiliation(characters:, headers: {}, params: {})
387
- post("/characters/affiliation/", headers: headers, params: params, payload: characters)
388
+ post("/characters/affiliation/", headers: headers, params: params, payload: characters).json
388
389
  end
389
390
  end
390
391
  end