esi-sdk 1.1.2 → 2.1.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 +38 -0
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +21 -40
  7. data/README.md +2 -0
  8. data/Rakefile +75 -37
  9. data/bin/console +1 -1
  10. data/esi-sdk.gemspec +2 -3
  11. data/lib/esi/client/alliance.rb +103 -10
  12. data/lib/esi/client/assets.rb +193 -18
  13. data/lib/esi/client/bookmarks.rb +130 -12
  14. data/lib/esi/client/calendar.rb +144 -16
  15. data/lib/esi/client/character.rb +414 -42
  16. data/lib/esi/client/clones.rb +65 -6
  17. data/lib/esi/client/contacts.rb +294 -30
  18. data/lib/esi/client/contracts.rb +294 -31
  19. data/lib/esi/client/corporation.rb +755 -152
  20. data/lib/esi/client/dogma.rb +118 -12
  21. data/lib/esi/client/faction_warfare.rb +198 -14
  22. data/lib/esi/client/fittings.rb +94 -10
  23. data/lib/esi/client/fleets.rb +469 -49
  24. data/lib/esi/client/incursions.rb +23 -1
  25. data/lib/esi/client/industry.rb +250 -23
  26. data/lib/esi/client/insurance.rb +23 -1
  27. data/lib/esi/client/killmails.rb +95 -10
  28. data/lib/esi/client/location.rb +98 -9
  29. data/lib/esi/client/loyalty.rb +57 -6
  30. data/lib/esi/client/mail.rb +262 -28
  31. data/lib/esi/client/market.rb +322 -34
  32. data/lib/esi/client/opportunities.rb +124 -13
  33. data/lib/esi/client/planetary_interaction.rb +124 -13
  34. data/lib/esi/client/routes.rb +34 -6
  35. data/lib/esi/client/search.rb +64 -7
  36. data/lib/esi/client/skills.rb +95 -9
  37. data/lib/esi/client/sovereignty.rb +69 -3
  38. data/lib/esi/client/status.rb +24 -1
  39. data/lib/esi/client/universe.rb +817 -194
  40. data/lib/esi/client/user_interface.rb +157 -14
  41. data/lib/esi/client/wallet.rb +199 -22
  42. data/lib/esi/client/wars.rb +81 -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 +2 -2
  48. data/yarn.lock +3695 -0
  49. metadata +10 -22
@@ -17,6 +17,7 @@ module ESI
17
17
  # @param add_to_beginning [Boolean] Whether this solar system should be added to the beginning of all waypoints
18
18
  # @param clear_other_waypoints [Boolean] Whether clean other waypoints beforing adding this one
19
19
  # @param destination_id [Integer] The destination to travel to, can be solar system, station or structure's id
20
+ # @param params [Hash] Additional query string parameters
20
21
  # @param headers [Hash] Additional headers
21
22
  #
22
23
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -28,9 +29,65 @@ module ESI
28
29
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
29
30
  #
30
31
  # @see https://esi.evetech.net/ui/#/User Interface/post_ui_autopilot_waypoint
31
- def post_ui_autopilot_waypoint(add_to_beginning:, clear_other_waypoints:, destination_id:, headers: {})
32
- query_string = URI.encode_www_form([["add_to_beginning", add_to_beginning], ["clear_other_waypoints", clear_other_waypoints], ["destination_id", destination_id]])
33
- post("/ui/autopilot/waypoint/?#{query_string}", headers: headers)
32
+ def post_ui_autopilot_waypoint(add_to_beginning:, clear_other_waypoints:, destination_id:, headers: {}, params: {})
33
+ post_ui_autopilot_waypoint_raw(add_to_beginning: add_to_beginning, clear_other_waypoints: clear_other_waypoints, destination_id: destination_id, headers: headers, params: params).json
34
+ end
35
+
36
+ # Set a solar system as autopilot waypoint.
37
+ #
38
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
39
+ #
40
+ # @esi_scope esi-ui.write_waypoint.v1
41
+ #
42
+ # @esi_version dev
43
+ # @esi_version legacy
44
+ # @esi_version v2
45
+ #
46
+ # @param add_to_beginning [Boolean] Whether this solar system should be added to the beginning of all waypoints
47
+ # @param clear_other_waypoints [Boolean] Whether clean other waypoints beforing adding this one
48
+ # @param destination_id [Integer] The destination to travel to, can be solar system, station or structure's id
49
+ # @param params [Hash] Additional query string parameters
50
+ # @param headers [Hash] Additional headers
51
+ #
52
+ # @raise [ESI::Errors::BadRequestError] Bad request
53
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
54
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
55
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
56
+ # @raise [ESI::Errors::InternalServerError] Internal server error
57
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
58
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
59
+ #
60
+ # @see https://esi.evetech.net/ui/#/User Interface/post_ui_autopilot_waypoint
61
+ def post_ui_autopilot_waypoint_raw(add_to_beginning:, clear_other_waypoints:, destination_id:, headers: {}, params: {})
62
+ params.merge!("add_to_beginning" => add_to_beginning, "clear_other_waypoints" => clear_other_waypoints, "destination_id" => destination_id)
63
+ post("/ui/autopilot/waypoint/", headers: headers, params: params)
64
+ end
65
+
66
+ # Open the contract window inside the client.
67
+ #
68
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
69
+ #
70
+ # @esi_scope esi-ui.open_window.v1
71
+ #
72
+ # @esi_version dev
73
+ # @esi_version legacy
74
+ # @esi_version v1
75
+ #
76
+ # @param contract_id [Integer] The contract to open
77
+ # @param params [Hash] Additional query string parameters
78
+ # @param headers [Hash] Additional headers
79
+ #
80
+ # @raise [ESI::Errors::BadRequestError] Bad request
81
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
82
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
83
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
84
+ # @raise [ESI::Errors::InternalServerError] Internal server error
85
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
86
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
87
+ #
88
+ # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_contract
89
+ def post_ui_openwindow_contract(contract_id:, headers: {}, params: {})
90
+ post_ui_openwindow_contract_raw(contract_id: contract_id, headers: headers, params: params).json
34
91
  end
35
92
 
36
93
  # Open the contract window inside the client.
@@ -44,6 +101,7 @@ module ESI
44
101
  # @esi_version v1
45
102
  #
46
103
  # @param contract_id [Integer] The contract to open
104
+ # @param params [Hash] Additional query string parameters
47
105
  # @param headers [Hash] Additional headers
48
106
  #
49
107
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -55,9 +113,9 @@ module ESI
55
113
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
56
114
  #
57
115
  # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_contract
58
- def post_ui_openwindow_contract(contract_id:, headers: {})
59
- query_string = URI.encode_www_form([["contract_id", contract_id]])
60
- post("/ui/openwindow/contract/?#{query_string}", headers: headers)
116
+ def post_ui_openwindow_contract_raw(contract_id:, headers: {}, params: {})
117
+ params.merge!("contract_id" => contract_id)
118
+ post("/ui/openwindow/contract/", headers: headers, params: params)
61
119
  end
62
120
 
63
121
  # Open the information window for a character, corporation or alliance inside the client.
@@ -71,6 +129,7 @@ module ESI
71
129
  # @esi_version v1
72
130
  #
73
131
  # @param target_id [Integer] The target to open
132
+ # @param params [Hash] Additional query string parameters
74
133
  # @param headers [Hash] Additional headers
75
134
  #
76
135
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -82,9 +141,36 @@ module ESI
82
141
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
83
142
  #
84
143
  # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_information
85
- def post_ui_openwindow_information(target_id:, headers: {})
86
- query_string = URI.encode_www_form([["target_id", target_id]])
87
- post("/ui/openwindow/information/?#{query_string}", headers: headers)
144
+ def post_ui_openwindow_information(target_id:, headers: {}, params: {})
145
+ post_ui_openwindow_information_raw(target_id: target_id, headers: headers, params: params).json
146
+ end
147
+
148
+ # Open the information window for a character, corporation or alliance inside the client.
149
+ #
150
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
151
+ #
152
+ # @esi_scope esi-ui.open_window.v1
153
+ #
154
+ # @esi_version dev
155
+ # @esi_version legacy
156
+ # @esi_version v1
157
+ #
158
+ # @param target_id [Integer] The target to open
159
+ # @param params [Hash] Additional query string parameters
160
+ # @param headers [Hash] Additional headers
161
+ #
162
+ # @raise [ESI::Errors::BadRequestError] Bad request
163
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
164
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
165
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
166
+ # @raise [ESI::Errors::InternalServerError] Internal server error
167
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
168
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
169
+ #
170
+ # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_information
171
+ def post_ui_openwindow_information_raw(target_id:, headers: {}, params: {})
172
+ params.merge!("target_id" => target_id)
173
+ post("/ui/openwindow/information/", headers: headers, params: params)
88
174
  end
89
175
 
90
176
  # Open the market details window for a specific typeID inside the client.
@@ -98,6 +184,7 @@ module ESI
98
184
  # @esi_version v1
99
185
  #
100
186
  # @param type_id [Integer] The item type to open in market window
187
+ # @param params [Hash] Additional query string parameters
101
188
  # @param headers [Hash] Additional headers
102
189
  #
103
190
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -109,9 +196,64 @@ module ESI
109
196
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
110
197
  #
111
198
  # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_marketdetails
112
- def post_ui_openwindow_marketdetails(type_id:, headers: {})
113
- query_string = URI.encode_www_form([["type_id", type_id]])
114
- post("/ui/openwindow/marketdetails/?#{query_string}", headers: headers)
199
+ def post_ui_openwindow_marketdetails(type_id:, headers: {}, params: {})
200
+ post_ui_openwindow_marketdetails_raw(type_id: type_id, headers: headers, params: params).json
201
+ end
202
+
203
+ # Open the market details window for a specific typeID inside the client.
204
+ #
205
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
206
+ #
207
+ # @esi_scope esi-ui.open_window.v1
208
+ #
209
+ # @esi_version dev
210
+ # @esi_version legacy
211
+ # @esi_version v1
212
+ #
213
+ # @param type_id [Integer] The item type to open in market window
214
+ # @param params [Hash] Additional query string parameters
215
+ # @param headers [Hash] Additional headers
216
+ #
217
+ # @raise [ESI::Errors::BadRequestError] Bad request
218
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
219
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
220
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
221
+ # @raise [ESI::Errors::InternalServerError] Internal server error
222
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
223
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
224
+ #
225
+ # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_marketdetails
226
+ def post_ui_openwindow_marketdetails_raw(type_id:, headers: {}, params: {})
227
+ params.merge!("type_id" => type_id)
228
+ post("/ui/openwindow/marketdetails/", headers: headers, params: params)
229
+ end
230
+
231
+ # Open the New Mail window, according to settings from the request if applicable.
232
+ #
233
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
234
+ #
235
+ # @esi_scope esi-ui.open_window.v1
236
+ #
237
+ # @esi_version dev
238
+ # @esi_version legacy
239
+ # @esi_version v1
240
+ #
241
+ # @param new_mail [Hash] The details of mail to create
242
+ # @param params [Hash] Additional query string parameters
243
+ # @param headers [Hash] Additional headers
244
+ #
245
+ # @raise [ESI::Errors::BadRequestError] Bad request
246
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
247
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
248
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
249
+ # @raise [ESI::Errors::UnprocessableEntityError] Invalid request
250
+ # @raise [ESI::Errors::InternalServerError] Internal server error
251
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
252
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
253
+ #
254
+ # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_newmail
255
+ def post_ui_openwindow_newmail(new_mail:, headers: {}, params: {})
256
+ post_ui_openwindow_newmail_raw(new_mail: new_mail, headers: headers, params: params).json
115
257
  end
116
258
 
117
259
  # Open the New Mail window, according to settings from the request if applicable.
@@ -125,6 +267,7 @@ module ESI
125
267
  # @esi_version v1
126
268
  #
127
269
  # @param new_mail [Hash] The details of mail to create
270
+ # @param params [Hash] Additional query string parameters
128
271
  # @param headers [Hash] Additional headers
129
272
  #
130
273
  # @raise [ESI::Errors::BadRequestError] Bad request
@@ -137,8 +280,8 @@ module ESI
137
280
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
138
281
  #
139
282
  # @see https://esi.evetech.net/ui/#/User Interface/post_ui_openwindow_newmail
140
- def post_ui_openwindow_newmail(new_mail:, headers: {})
141
- post("/ui/openwindow/newmail/", headers: headers, payload: new_mail)
283
+ def post_ui_openwindow_newmail_raw(new_mail:, headers: {}, params: {})
284
+ post("/ui/openwindow/newmail/", headers: headers, params: params, payload: new_mail)
142
285
  end
143
286
  end
144
287
  end
@@ -15,7 +15,7 @@ module ESI
15
15
  # @esi_version legacy
16
16
  # @esi_version v1
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
  #
@@ -28,11 +28,39 @@ module ESI
28
28
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
29
29
  #
30
30
  # @see https://esi.evetech.net/ui/#/Wallet/get_characters_character_id_wallet
31
- def get_character_wallet(character_id:, params: {}, headers: {})
32
- get("/characters/#{character_id}/wallet/", headers: headers, params: params)
31
+ def get_character_wallet(character_id:, headers: {}, params: {})
32
+ get_character_wallet_raw(character_id: character_id, headers: headers, params: params).json
33
33
  end
34
34
  alias get_characters_character_id_wallet get_character_wallet
35
35
 
36
+ # Returns a character's wallet balance.
37
+ #
38
+ # This endpoint is cached for up to 120 seconds.
39
+ #
40
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
41
+ #
42
+ # @esi_scope esi-wallet.read_character_wallet.v1
43
+ #
44
+ # @esi_version legacy
45
+ # @esi_version v1
46
+ #
47
+ # @param character_id [Integer] An EVE character ID
48
+ # @param params [Hash] Additional query string parameters
49
+ # @param headers [Hash] Additional headers
50
+ #
51
+ # @raise [ESI::Errors::BadRequestError] Bad request
52
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
53
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
54
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
55
+ # @raise [ESI::Errors::InternalServerError] Internal server error
56
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
57
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
58
+ #
59
+ # @see https://esi.evetech.net/ui/#/Wallet/get_characters_character_id_wallet
60
+ def get_character_wallet_raw(character_id:, headers: {}, params: {})
61
+ get("/characters/#{character_id}/wallet/", headers: headers, params: params)
62
+ end
63
+
36
64
  # Retrieve the given character's wallet journal going 30 days back.
37
65
  #
38
66
  # This endpoint is cached for up to 3600 seconds.
@@ -44,7 +72,7 @@ module ESI
44
72
  # @esi_version dev
45
73
  # @esi_version v6
46
74
  #
47
- # @param character_id [Integer,String] An EVE character ID
75
+ # @param character_id [Integer] An EVE character ID
48
76
  # @param params [Hash] Additional query string parameters
49
77
  # @param headers [Hash] Additional headers
50
78
  #
@@ -57,11 +85,40 @@ module ESI
57
85
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
58
86
  #
59
87
  # @see https://esi.evetech.net/ui/#/Wallet/get_characters_character_id_wallet_journal
60
- def get_character_wallet_journal(character_id:, params: {}, headers: {})
61
- get("/characters/#{character_id}/wallet/journal/", headers: headers, params: params)
88
+ def get_character_wallet_journal(character_id:, headers: {}, params: {})
89
+ responses = get_character_wallet_journal_raw(character_id: character_id, headers: headers, params: params)
90
+ responses.map(&:json).reduce([], :concat)
62
91
  end
63
92
  alias get_characters_character_id_wallet_journal get_character_wallet_journal
64
93
 
94
+ # Retrieve the given character's wallet journal going 30 days back.
95
+ #
96
+ # This endpoint is cached for up to 3600 seconds.
97
+ #
98
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
99
+ #
100
+ # @esi_scope esi-wallet.read_character_wallet.v1
101
+ #
102
+ # @esi_version dev
103
+ # @esi_version v6
104
+ #
105
+ # @param character_id [Integer] An EVE character ID
106
+ # @param params [Hash] Additional query string parameters
107
+ # @param headers [Hash] Additional headers
108
+ #
109
+ # @raise [ESI::Errors::BadRequestError] Bad request
110
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
111
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
112
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
113
+ # @raise [ESI::Errors::InternalServerError] Internal server error
114
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
115
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
116
+ #
117
+ # @see https://esi.evetech.net/ui/#/Wallet/get_characters_character_id_wallet_journal
118
+ def get_character_wallet_journal_raw(character_id:, headers: {}, params: {})
119
+ get("/characters/#{character_id}/wallet/journal/", headers: headers, params: params)
120
+ end
121
+
65
122
  # Get wallet transactions of a character.
66
123
  #
67
124
  # This endpoint is cached for up to 3600 seconds.
@@ -74,7 +131,7 @@ module ESI
74
131
  # @esi_version legacy
75
132
  # @esi_version v1
76
133
  #
77
- # @param character_id [Integer,String] An EVE character ID
134
+ # @param character_id [Integer] An EVE character ID
78
135
  # @param from_id [Integer] Only show transactions happened before the one referenced by this id
79
136
  # @param params [Hash] Additional query string parameters
80
137
  # @param headers [Hash] Additional headers
@@ -88,12 +145,42 @@ module ESI
88
145
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
89
146
  #
90
147
  # @see https://esi.evetech.net/ui/#/Wallet/get_characters_character_id_wallet_transactions
91
- def get_character_wallet_transactions(character_id:, from_id:, params: {}, headers: {})
92
- query_string = URI.encode_www_form([["from_id", from_id]])
93
- get("/characters/#{character_id}/wallet/transactions/?#{query_string}", headers: headers, params: params)
148
+ def get_character_wallet_transactions(character_id:, from_id: nil, headers: {}, params: {})
149
+ get_character_wallet_transactions_raw(character_id: character_id, from_id: from_id, headers: headers, params: params).json
94
150
  end
95
151
  alias get_characters_character_id_wallet_transactions get_character_wallet_transactions
96
152
 
153
+ # Get wallet transactions of a character.
154
+ #
155
+ # This endpoint is cached for up to 3600 seconds.
156
+ #
157
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
158
+ #
159
+ # @esi_scope esi-wallet.read_character_wallet.v1
160
+ #
161
+ # @esi_version dev
162
+ # @esi_version legacy
163
+ # @esi_version v1
164
+ #
165
+ # @param character_id [Integer] An EVE character ID
166
+ # @param from_id [Integer] Only show transactions happened before the one referenced by this id
167
+ # @param params [Hash] Additional query string parameters
168
+ # @param headers [Hash] Additional headers
169
+ #
170
+ # @raise [ESI::Errors::BadRequestError] Bad request
171
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
172
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
173
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
174
+ # @raise [ESI::Errors::InternalServerError] Internal server error
175
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
176
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
177
+ #
178
+ # @see https://esi.evetech.net/ui/#/Wallet/get_characters_character_id_wallet_transactions
179
+ def get_character_wallet_transactions_raw(character_id:, from_id: nil, headers: {}, params: {})
180
+ params.merge!("from_id" => from_id)
181
+ get("/characters/#{character_id}/wallet/transactions/", headers: headers, params: params)
182
+ end
183
+
97
184
  # Get a corporation's wallets.
98
185
  #
99
186
  # This endpoint is cached for up to 300 seconds.
@@ -106,7 +193,7 @@ module ESI
106
193
  # @esi_version legacy
107
194
  # @esi_version v1
108
195
  #
109
- # @param corporation_id [Integer,String] An EVE corporation ID
196
+ # @param corporation_id [Integer] An EVE corporation ID
110
197
  # @param params [Hash] Additional query string parameters
111
198
  # @param headers [Hash] Additional headers
112
199
  #
@@ -119,11 +206,40 @@ module ESI
119
206
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
120
207
  #
121
208
  # @see https://esi.evetech.net/ui/#/Wallet/get_corporations_corporation_id_wallets
122
- def get_corporation_wallets(corporation_id:, params: {}, headers: {})
123
- get("/corporations/#{corporation_id}/wallets/", headers: headers, params: params)
209
+ def get_corporation_wallets(corporation_id:, headers: {}, params: {})
210
+ get_corporation_wallets_raw(corporation_id: corporation_id, headers: headers, params: params).json
124
211
  end
125
212
  alias get_corporations_corporation_id_wallets get_corporation_wallets
126
213
 
214
+ # Get a corporation's wallets.
215
+ #
216
+ # This endpoint is cached for up to 300 seconds.
217
+ #
218
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
219
+ #
220
+ # @esi_scope esi-wallet.read_corporation_wallets.v1
221
+ #
222
+ # @esi_version dev
223
+ # @esi_version legacy
224
+ # @esi_version v1
225
+ #
226
+ # @param corporation_id [Integer] An EVE corporation ID
227
+ # @param params [Hash] Additional query string parameters
228
+ # @param headers [Hash] Additional headers
229
+ #
230
+ # @raise [ESI::Errors::BadRequestError] Bad request
231
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
232
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
233
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
234
+ # @raise [ESI::Errors::InternalServerError] Internal server error
235
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
236
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
237
+ #
238
+ # @see https://esi.evetech.net/ui/#/Wallet/get_corporations_corporation_id_wallets
239
+ def get_corporation_wallets_raw(corporation_id:, headers: {}, params: {})
240
+ get("/corporations/#{corporation_id}/wallets/", headers: headers, params: params)
241
+ end
242
+
127
243
  # Retrieve the given corporation's wallet journal for the given division going 30 days back.
128
244
  #
129
245
  # This endpoint is cached for up to 3600 seconds.
@@ -135,8 +251,8 @@ module ESI
135
251
  # @esi_version dev
136
252
  # @esi_version v4
137
253
  #
138
- # @param corporation_id [Integer,String] An EVE corporation ID
139
- # @param division [Integer,String] Wallet key of the division to fetch journals from
254
+ # @param corporation_id [Integer] An EVE corporation ID
255
+ # @param division [Integer] Wallet key of the division to fetch journals from
140
256
  # @param params [Hash] Additional query string parameters
141
257
  # @param headers [Hash] Additional headers
142
258
  #
@@ -149,11 +265,41 @@ module ESI
149
265
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
150
266
  #
151
267
  # @see https://esi.evetech.net/ui/#/Wallet/get_corporations_corporation_id_wallets_division_journal
152
- def get_corporation_wallets_division_journal(corporation_id:, division:, params: {}, headers: {})
153
- get("/corporations/#{corporation_id}/wallets/#{division}/journal/", headers: headers, params: params)
268
+ def get_corporation_wallets_division_journal(corporation_id:, division:, headers: {}, params: {})
269
+ responses = get_corporation_wallets_division_journal_raw(corporation_id: corporation_id, division: division, headers: headers, params: params)
270
+ responses.map(&:json).reduce([], :concat)
154
271
  end
155
272
  alias get_corporations_corporation_id_wallets_division_journal get_corporation_wallets_division_journal
156
273
 
274
+ # Retrieve the given corporation's wallet journal for the given division going 30 days back.
275
+ #
276
+ # This endpoint is cached for up to 3600 seconds.
277
+ #
278
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
279
+ #
280
+ # @esi_scope esi-wallet.read_corporation_wallets.v1
281
+ #
282
+ # @esi_version dev
283
+ # @esi_version v4
284
+ #
285
+ # @param corporation_id [Integer] An EVE corporation ID
286
+ # @param division [Integer] Wallet key of the division to fetch journals from
287
+ # @param params [Hash] Additional query string parameters
288
+ # @param headers [Hash] Additional headers
289
+ #
290
+ # @raise [ESI::Errors::BadRequestError] Bad request
291
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
292
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
293
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
294
+ # @raise [ESI::Errors::InternalServerError] Internal server error
295
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
296
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
297
+ #
298
+ # @see https://esi.evetech.net/ui/#/Wallet/get_corporations_corporation_id_wallets_division_journal
299
+ def get_corporation_wallets_division_journal_raw(corporation_id:, division:, headers: {}, params: {})
300
+ get("/corporations/#{corporation_id}/wallets/#{division}/journal/", headers: headers, params: params)
301
+ end
302
+
157
303
  # Get wallet transactions of a corporation.
158
304
  #
159
305
  # This endpoint is cached for up to 3600 seconds.
@@ -166,8 +312,8 @@ module ESI
166
312
  # @esi_version legacy
167
313
  # @esi_version v1
168
314
  #
169
- # @param corporation_id [Integer,String] An EVE corporation ID
170
- # @param division [Integer,String] Wallet key of the division to fetch journals from
315
+ # @param corporation_id [Integer] An EVE corporation ID
316
+ # @param division [Integer] Wallet key of the division to fetch journals from
171
317
  # @param from_id [Integer] Only show journal entries happened before the transaction referenced by this id
172
318
  # @param params [Hash] Additional query string parameters
173
319
  # @param headers [Hash] Additional headers
@@ -181,11 +327,42 @@ module ESI
181
327
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
182
328
  #
183
329
  # @see https://esi.evetech.net/ui/#/Wallet/get_corporations_corporation_id_wallets_division_transactions
184
- def get_corporation_wallets_division_transactions(corporation_id:, division:, from_id:, params: {}, headers: {})
185
- query_string = URI.encode_www_form([["from_id", from_id]])
186
- get("/corporations/#{corporation_id}/wallets/#{division}/transactions/?#{query_string}", headers: headers, params: params)
330
+ def get_corporation_wallets_division_transactions(corporation_id:, division:, from_id: nil, headers: {}, params: {})
331
+ get_corporation_wallets_division_transactions_raw(corporation_id: corporation_id, division: division, from_id: from_id, headers: headers, params: params).json
187
332
  end
188
333
  alias get_corporations_corporation_id_wallets_division_transactions get_corporation_wallets_division_transactions
334
+
335
+ # Get wallet transactions of a corporation.
336
+ #
337
+ # This endpoint is cached for up to 3600 seconds.
338
+ #
339
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
340
+ #
341
+ # @esi_scope esi-wallet.read_corporation_wallets.v1
342
+ #
343
+ # @esi_version dev
344
+ # @esi_version legacy
345
+ # @esi_version v1
346
+ #
347
+ # @param corporation_id [Integer] An EVE corporation ID
348
+ # @param division [Integer] Wallet key of the division to fetch journals from
349
+ # @param from_id [Integer] Only show journal entries happened before the transaction referenced by this id
350
+ # @param params [Hash] Additional query string parameters
351
+ # @param headers [Hash] Additional headers
352
+ #
353
+ # @raise [ESI::Errors::BadRequestError] Bad request
354
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
355
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
356
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
357
+ # @raise [ESI::Errors::InternalServerError] Internal server error
358
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
359
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
360
+ #
361
+ # @see https://esi.evetech.net/ui/#/Wallet/get_corporations_corporation_id_wallets_division_transactions
362
+ def get_corporation_wallets_division_transactions_raw(corporation_id:, division:, from_id: nil, headers: {}, params: {})
363
+ params.merge!("from_id" => from_id)
364
+ get("/corporations/#{corporation_id}/wallets/#{division}/transactions/", headers: headers, params: params)
365
+ end
189
366
  end
190
367
  end
191
368
  end