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
@@ -16,7 +16,7 @@ module ESI
16
16
  # @esi_version legacy
17
17
  # @esi_version v1
18
18
  #
19
- # @param character_id [Integer,String] An EVE character ID
19
+ # @param character_id [Integer] An EVE character ID
20
20
  # @param params [Hash] Additional query string parameters
21
21
  # @param headers [Hash] Additional headers
22
22
  #
@@ -29,18 +29,47 @@ module ESI
29
29
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
30
30
  #
31
31
  # @see https://esi.evetech.net/ui/#/Opportunities/get_characters_character_id_opportunities
32
- def get_character_opportunities(character_id:, params: {}, headers: {})
33
- get("/characters/#{character_id}/opportunities/", headers: headers, params: params)
32
+ def get_character_opportunities(character_id:, headers: {}, params: {})
33
+ get_character_opportunities_raw(character_id: character_id, headers: headers, params: params).json
34
34
  end
35
35
  alias get_characters_character_id_opportunities get_character_opportunities
36
36
 
37
+ # Return a list of tasks finished by a character.
38
+ #
39
+ # This endpoint is cached for up to 3600 seconds.
40
+ #
41
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
42
+ #
43
+ # @esi_scope esi-characters.read_opportunities.v1
44
+ #
45
+ # @esi_version dev
46
+ # @esi_version legacy
47
+ # @esi_version v1
48
+ #
49
+ # @param character_id [Integer] An EVE character ID
50
+ # @param params [Hash] Additional query string parameters
51
+ # @param headers [Hash] Additional headers
52
+ #
53
+ # @raise [ESI::Errors::BadRequestError] Bad request
54
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
55
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
56
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
57
+ # @raise [ESI::Errors::InternalServerError] Internal server error
58
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
59
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
60
+ #
61
+ # @see https://esi.evetech.net/ui/#/Opportunities/get_characters_character_id_opportunities
62
+ def get_character_opportunities_raw(character_id:, headers: {}, params: {})
63
+ get("/characters/#{character_id}/opportunities/", headers: headers, params: params)
64
+ end
65
+
37
66
  # Return information of an opportunities group.
38
67
  #
39
68
  # @esi_version dev
40
69
  # @esi_version legacy
41
70
  # @esi_version v1
42
71
  #
43
- # @param group_id [Integer,String] ID of an opportunities group
72
+ # @param group_id [Integer] ID of an opportunities group
44
73
  # @param params [Hash] Additional query string parameters
45
74
  # @param headers [Hash] Additional headers
46
75
  #
@@ -51,18 +80,39 @@ module ESI
51
80
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
52
81
  #
53
82
  # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_groups_group_id
54
- def get_opportunities_group(group_id:, params: {}, headers: {})
55
- get("/opportunities/groups/#{group_id}/", headers: headers, params: params)
83
+ def get_opportunities_group(group_id:, headers: {}, params: {})
84
+ get_opportunities_group_raw(group_id: group_id, headers: headers, params: params).json
56
85
  end
57
86
  alias get_opportunities_groups_group_id get_opportunities_group
58
87
 
88
+ # Return information of an opportunities group.
89
+ #
90
+ # @esi_version dev
91
+ # @esi_version legacy
92
+ # @esi_version v1
93
+ #
94
+ # @param group_id [Integer] ID of an opportunities group
95
+ # @param params [Hash] Additional query string parameters
96
+ # @param headers [Hash] Additional headers
97
+ #
98
+ # @raise [ESI::Errors::BadRequestError] Bad request
99
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
100
+ # @raise [ESI::Errors::InternalServerError] Internal server error
101
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
102
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
103
+ #
104
+ # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_groups_group_id
105
+ def get_opportunities_group_raw(group_id:, headers: {}, params: {})
106
+ get("/opportunities/groups/#{group_id}/", headers: headers, params: params)
107
+ end
108
+
59
109
  # Return information of an opportunities task.
60
110
  #
61
111
  # @esi_version dev
62
112
  # @esi_version legacy
63
113
  # @esi_version v1
64
114
  #
65
- # @param task_id [Integer,String] ID of an opportunities task
115
+ # @param task_id [Integer] ID of an opportunities task
66
116
  # @param params [Hash] Additional query string parameters
67
117
  # @param headers [Hash] Additional headers
68
118
  #
@@ -73,11 +123,32 @@ module ESI
73
123
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
74
124
  #
75
125
  # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_tasks_task_id
76
- def get_opportunities_task(task_id:, params: {}, headers: {})
77
- get("/opportunities/tasks/#{task_id}/", headers: headers, params: params)
126
+ def get_opportunities_task(task_id:, headers: {}, params: {})
127
+ get_opportunities_task_raw(task_id: task_id, headers: headers, params: params).json
78
128
  end
79
129
  alias get_opportunities_tasks_task_id get_opportunities_task
80
130
 
131
+ # Return information of an opportunities task.
132
+ #
133
+ # @esi_version dev
134
+ # @esi_version legacy
135
+ # @esi_version v1
136
+ #
137
+ # @param task_id [Integer] ID of an opportunities task
138
+ # @param params [Hash] Additional query string parameters
139
+ # @param headers [Hash] Additional headers
140
+ #
141
+ # @raise [ESI::Errors::BadRequestError] Bad request
142
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
143
+ # @raise [ESI::Errors::InternalServerError] Internal server error
144
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
145
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
146
+ #
147
+ # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_tasks_task_id
148
+ def get_opportunities_task_raw(task_id:, headers: {}, params: {})
149
+ get("/opportunities/tasks/#{task_id}/", headers: headers, params: params)
150
+ end
151
+
81
152
  # Return a list of opportunities groups.
82
153
  #
83
154
  # @esi_version dev
@@ -94,11 +165,31 @@ module ESI
94
165
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
95
166
  #
96
167
  # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_groups
97
- def get_opportunity_groups(params: {}, headers: {})
98
- get("/opportunities/groups/", headers: headers, params: params)
168
+ def get_opportunity_groups(headers: {}, params: {})
169
+ get_opportunity_groups_raw(headers: headers, params: params).json
99
170
  end
100
171
  alias get_opportunities_groups get_opportunity_groups
101
172
 
173
+ # Return a list of opportunities groups.
174
+ #
175
+ # @esi_version dev
176
+ # @esi_version legacy
177
+ # @esi_version v1
178
+ #
179
+ # @param params [Hash] Additional query string parameters
180
+ # @param headers [Hash] Additional headers
181
+ #
182
+ # @raise [ESI::Errors::BadRequestError] Bad request
183
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
184
+ # @raise [ESI::Errors::InternalServerError] Internal server error
185
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
186
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
187
+ #
188
+ # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_groups
189
+ def get_opportunity_groups_raw(headers: {}, params: {})
190
+ get("/opportunities/groups/", headers: headers, params: params)
191
+ end
192
+
102
193
  # Return a list of opportunities tasks.
103
194
  #
104
195
  # @esi_version dev
@@ -115,10 +206,30 @@ module ESI
115
206
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
116
207
  #
117
208
  # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_tasks
118
- def get_opportunity_tasks(params: {}, headers: {})
119
- get("/opportunities/tasks/", headers: headers, params: params)
209
+ def get_opportunity_tasks(headers: {}, params: {})
210
+ get_opportunity_tasks_raw(headers: headers, params: params).json
120
211
  end
121
212
  alias get_opportunities_tasks get_opportunity_tasks
213
+
214
+ # Return a list of opportunities tasks.
215
+ #
216
+ # @esi_version dev
217
+ # @esi_version legacy
218
+ # @esi_version v1
219
+ #
220
+ # @param params [Hash] Additional query string parameters
221
+ # @param headers [Hash] Additional headers
222
+ #
223
+ # @raise [ESI::Errors::BadRequestError] Bad request
224
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
225
+ # @raise [ESI::Errors::InternalServerError] Internal server error
226
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
227
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
228
+ #
229
+ # @see https://esi.evetech.net/ui/#/Opportunities/get_opportunities_tasks
230
+ def get_opportunity_tasks_raw(headers: {}, params: {})
231
+ get("/opportunities/tasks/", headers: headers, params: params)
232
+ end
122
233
  end
123
234
  end
124
235
  end
@@ -13,8 +13,8 @@ module ESI
13
13
  # @esi_version dev
14
14
  # @esi_version v3
15
15
  #
16
- # @param character_id [Integer,String] An EVE character ID
17
- # @param planet_id [Integer,String] Planet id of the target planet
16
+ # @param character_id [Integer] An EVE character ID
17
+ # @param planet_id [Integer] Planet id of the target planet
18
18
  # @param params [Hash] Additional query string parameters
19
19
  # @param headers [Hash] Additional headers
20
20
  #
@@ -28,11 +28,39 @@ module ESI
28
28
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
29
29
  #
30
30
  # @see https://esi.evetech.net/ui/#/Planetary Interaction/get_characters_character_id_planets_planet_id
31
- def get_character_planet(character_id:, planet_id:, params: {}, headers: {})
32
- get("/characters/#{character_id}/planets/#{planet_id}/", headers: headers, params: params)
31
+ def get_character_planet(character_id:, planet_id:, headers: {}, params: {})
32
+ get_character_planet_raw(character_id: character_id, planet_id: planet_id, headers: headers, params: params).json
33
33
  end
34
34
  alias get_characters_character_id_planets_planet_id get_character_planet
35
35
 
36
+ # Returns full details on the layout of a single planetary colony, including links, pins and routes. Note: Planetary information is only recalculated when the colony is viewed through the client. Information will not update until this criteria is met.
37
+ #
38
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
39
+ #
40
+ # @esi_scope esi-planets.manage_planets.v1
41
+ #
42
+ # @esi_version dev
43
+ # @esi_version v3
44
+ #
45
+ # @param character_id [Integer] An EVE character ID
46
+ # @param planet_id [Integer] Planet id of the target planet
47
+ # @param params [Hash] Additional query string parameters
48
+ # @param headers [Hash] Additional headers
49
+ #
50
+ # @raise [ESI::Errors::BadRequestError] Bad request
51
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
52
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
53
+ # @raise [ESI::Errors::NotFoundError] Colony not found
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/#/Planetary Interaction/get_characters_character_id_planets_planet_id
60
+ def get_character_planet_raw(character_id:, planet_id:, headers: {}, params: {})
61
+ get("/characters/#{character_id}/planets/#{planet_id}/", headers: headers, params: params)
62
+ end
63
+
36
64
  # Returns a list of all planetary colonies owned by a character.
37
65
  #
38
66
  # This endpoint is cached for up to 600 seconds.
@@ -45,7 +73,7 @@ module ESI
45
73
  # @esi_version legacy
46
74
  # @esi_version v1
47
75
  #
48
- # @param character_id [Integer,String] An EVE character ID
76
+ # @param character_id [Integer] An EVE character ID
49
77
  # @param params [Hash] Additional query string parameters
50
78
  # @param headers [Hash] Additional headers
51
79
  #
@@ -58,11 +86,40 @@ module ESI
58
86
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
59
87
  #
60
88
  # @see https://esi.evetech.net/ui/#/Planetary Interaction/get_characters_character_id_planets
61
- def get_character_planets(character_id:, params: {}, headers: {})
62
- get("/characters/#{character_id}/planets/", headers: headers, params: params)
89
+ def get_character_planets(character_id:, headers: {}, params: {})
90
+ get_character_planets_raw(character_id: character_id, headers: headers, params: params).json
63
91
  end
64
92
  alias get_characters_character_id_planets get_character_planets
65
93
 
94
+ # Returns a list of all planetary colonies owned by a character.
95
+ #
96
+ # This endpoint is cached for up to 600 seconds.
97
+ #
98
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
99
+ #
100
+ # @esi_scope esi-planets.manage_planets.v1
101
+ #
102
+ # @esi_version dev
103
+ # @esi_version legacy
104
+ # @esi_version v1
105
+ #
106
+ # @param character_id [Integer] An EVE character ID
107
+ # @param params [Hash] Additional query string parameters
108
+ # @param headers [Hash] Additional headers
109
+ #
110
+ # @raise [ESI::Errors::BadRequestError] Bad request
111
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
112
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
113
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
114
+ # @raise [ESI::Errors::InternalServerError] Internal server error
115
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
116
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
117
+ #
118
+ # @see https://esi.evetech.net/ui/#/Planetary Interaction/get_characters_character_id_planets
119
+ def get_character_planets_raw(character_id:, headers: {}, params: {})
120
+ get("/characters/#{character_id}/planets/", headers: headers, params: params)
121
+ end
122
+
66
123
  # List customs offices owned by a corporation.
67
124
  #
68
125
  # This endpoint is cached for up to 3600 seconds.
@@ -75,7 +132,7 @@ module ESI
75
132
  # @esi_version legacy
76
133
  # @esi_version v1
77
134
  #
78
- # @param corporation_id [Integer,String] An EVE corporation ID
135
+ # @param corporation_id [Integer] An EVE corporation ID
79
136
  # @param params [Hash] Additional query string parameters
80
137
  # @param headers [Hash] Additional headers
81
138
  #
@@ -88,11 +145,41 @@ module ESI
88
145
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
89
146
  #
90
147
  # @see https://esi.evetech.net/ui/#/Planetary Interaction/get_corporations_corporation_id_customs_offices
91
- def get_corporation_customs_offices(corporation_id:, params: {}, headers: {})
92
- get("/corporations/#{corporation_id}/customs_offices/", headers: headers, params: params)
148
+ def get_corporation_customs_offices(corporation_id:, headers: {}, params: {})
149
+ responses = get_corporation_customs_offices_raw(corporation_id: corporation_id, headers: headers, params: params)
150
+ responses.map(&:json).reduce([], :concat)
93
151
  end
94
152
  alias get_corporations_corporation_id_customs_offices get_corporation_customs_offices
95
153
 
154
+ # List customs offices owned by a corporation.
155
+ #
156
+ # This endpoint is cached for up to 3600 seconds.
157
+ #
158
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
159
+ #
160
+ # @esi_scope esi-planets.read_customs_offices.v1
161
+ #
162
+ # @esi_version dev
163
+ # @esi_version legacy
164
+ # @esi_version v1
165
+ #
166
+ # @param corporation_id [Integer] An EVE corporation 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/#/Planetary Interaction/get_corporations_corporation_id_customs_offices
179
+ def get_corporation_customs_offices_raw(corporation_id:, headers: {}, params: {})
180
+ get("/corporations/#{corporation_id}/customs_offices/", headers: headers, params: params)
181
+ end
182
+
96
183
  # Get information on a planetary factory schematic.
97
184
  #
98
185
  # This endpoint is cached for up to 3600 seconds.
@@ -101,7 +188,7 @@ module ESI
101
188
  # @esi_version legacy
102
189
  # @esi_version v1
103
190
  #
104
- # @param schematic_id [Integer,String] A PI schematic ID
191
+ # @param schematic_id [Integer] A PI schematic ID
105
192
  # @param params [Hash] Additional query string parameters
106
193
  # @param headers [Hash] Additional headers
107
194
  #
@@ -113,10 +200,34 @@ module ESI
113
200
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
114
201
  #
115
202
  # @see https://esi.evetech.net/ui/#/Planetary Interaction/get_universe_schematics_schematic_id
116
- def get_universe_schematic(schematic_id:, params: {}, headers: {})
117
- get("/universe/schematics/#{schematic_id}/", headers: headers, params: params)
203
+ def get_universe_schematic(schematic_id:, headers: {}, params: {})
204
+ get_universe_schematic_raw(schematic_id: schematic_id, headers: headers, params: params).json
118
205
  end
119
206
  alias get_universe_schematics_schematic_id get_universe_schematic
207
+
208
+ # Get information on a planetary factory schematic.
209
+ #
210
+ # This endpoint is cached for up to 3600 seconds.
211
+ #
212
+ # @esi_version dev
213
+ # @esi_version legacy
214
+ # @esi_version v1
215
+ #
216
+ # @param schematic_id [Integer] A PI schematic ID
217
+ # @param params [Hash] Additional query string parameters
218
+ # @param headers [Hash] Additional headers
219
+ #
220
+ # @raise [ESI::Errors::BadRequestError] Bad request
221
+ # @raise [ESI::Errors::NotFoundError] Schematic not found
222
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
223
+ # @raise [ESI::Errors::InternalServerError] Internal server error
224
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
225
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
226
+ #
227
+ # @see https://esi.evetech.net/ui/#/Planetary Interaction/get_universe_schematics_schematic_id
228
+ def get_universe_schematic_raw(schematic_id:, headers: {}, params: {})
229
+ get("/universe/schematics/#{schematic_id}/", headers: headers, params: params)
230
+ end
120
231
  end
121
232
  end
122
233
  end
@@ -12,11 +12,11 @@ module ESI
12
12
  # @esi_version legacy
13
13
  # @esi_version v1
14
14
  #
15
- # @param destination [Integer,String] destination solar system ID
16
- # @param origin [Integer,String] origin solar system ID
15
+ # @param destination [Integer] destination solar system ID
16
+ # @param origin [Integer] origin solar system ID
17
17
  # @param avoid [Array] avoid solar system ID(s)
18
18
  # @param connections [Array] connected solar system pairs
19
- # @param flag [String] route security preference
19
+ # @param flag [String] route security preference. Must be one of: `shortest`, `secure`, `insecure`
20
20
  # @param params [Hash] Additional query string parameters
21
21
  # @param headers [Hash] Additional headers
22
22
  #
@@ -28,9 +28,37 @@ module ESI
28
28
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
29
29
  #
30
30
  # @see https://esi.evetech.net/ui/#/Routes/get_route_origin_destination
31
- def get_route_origin_destination(destination:, origin:, avoid:, connections:, flag:, params: {}, headers: {})
32
- query_string = URI.encode_www_form([["avoid", avoid], ["connections", connections], ["flag", flag]])
33
- get("/route/#{origin}/#{destination}/?#{query_string}", headers: headers, params: params)
31
+ def get_route_origin_destination(destination:, origin:, avoid: nil, connections: nil, flag: "shortest", headers: {}, params: {})
32
+ get_route_origin_destination_raw(destination: destination, origin: origin, avoid: avoid, connections: connections, flag: flag, headers: headers, params: params).json
33
+ end
34
+
35
+ # Get the systems between origin and destination.
36
+ #
37
+ # This endpoint is cached for up to 86400 seconds.
38
+ #
39
+ # @esi_version dev
40
+ # @esi_version legacy
41
+ # @esi_version v1
42
+ #
43
+ # @param destination [Integer] destination solar system ID
44
+ # @param origin [Integer] origin solar system ID
45
+ # @param avoid [Array] avoid solar system ID(s)
46
+ # @param connections [Array] connected solar system pairs
47
+ # @param flag [String] route security preference. Must be one of: `shortest`, `secure`, `insecure`
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::NotFoundError] No route found
53
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
54
+ # @raise [ESI::Errors::InternalServerError] Internal server error
55
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
56
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
57
+ #
58
+ # @see https://esi.evetech.net/ui/#/Routes/get_route_origin_destination
59
+ def get_route_origin_destination_raw(destination:, origin:, avoid: nil, connections: nil, flag: "shortest", headers: {}, params: {})
60
+ params.merge!("avoid" => avoid, "connections" => connections, "flag" => flag)
61
+ get("/route/#{origin}/#{destination}/", headers: headers, params: params)
34
62
  end
35
63
  end
36
64
  end
@@ -16,7 +16,7 @@ module ESI
16
16
  # @esi_version legacy
17
17
  # @esi_version v3
18
18
  #
19
- # @param character_id [Integer,String] An EVE character ID
19
+ # @param character_id [Integer] An EVE character ID
20
20
  # @param categories [Array] Type of entities to search for
21
21
  # @param search [String] The string to search on
22
22
  # @param strict [Boolean] Whether the search should be a strict match
@@ -32,12 +32,69 @@ module ESI
32
32
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
33
33
  #
34
34
  # @see https://esi.evetech.net/ui/#/Search/get_characters_character_id_search
35
- def get_character_search(character_id:, categories:, search:, strict:, params: {}, headers: {})
36
- query_string = URI.encode_www_form([["categories", categories], ["search", search], ["strict", strict]])
37
- get("/characters/#{character_id}/search/?#{query_string}", headers: headers, params: params)
35
+ def get_character_search(character_id:, categories:, search:, strict: nil, headers: {}, params: {})
36
+ get_character_search_raw(character_id: character_id, categories: categories, search: search, strict: strict, headers: headers, params: params).json
38
37
  end
39
38
  alias get_characters_character_id_search get_character_search
40
39
 
40
+ # Search for entities that match a given sub-string.
41
+ #
42
+ # This endpoint is cached for up to 3600 seconds.
43
+ #
44
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
45
+ #
46
+ # @esi_scope esi-search.search_structures.v1
47
+ #
48
+ # @esi_version dev
49
+ # @esi_version legacy
50
+ # @esi_version v3
51
+ #
52
+ # @param character_id [Integer] An EVE character ID
53
+ # @param categories [Array] Type of entities to search for
54
+ # @param search [String] The string to search on
55
+ # @param strict [Boolean] Whether the search should be a strict match
56
+ # @param params [Hash] Additional query string parameters
57
+ # @param headers [Hash] Additional headers
58
+ #
59
+ # @raise [ESI::Errors::BadRequestError] Bad request
60
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
61
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
62
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
63
+ # @raise [ESI::Errors::InternalServerError] Internal server error
64
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
65
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
66
+ #
67
+ # @see https://esi.evetech.net/ui/#/Search/get_characters_character_id_search
68
+ def get_character_search_raw(character_id:, categories:, search:, strict: nil, headers: {}, params: {})
69
+ params.merge!("categories" => categories, "search" => search, "strict" => strict)
70
+ get("/characters/#{character_id}/search/", headers: headers, params: params)
71
+ end
72
+
73
+ # Search for entities that match a given sub-string.
74
+ #
75
+ # This endpoint is cached for up to 3600 seconds.
76
+ #
77
+ # @esi_version dev
78
+ # @esi_version legacy
79
+ # @esi_version v2
80
+ #
81
+ # @param categories [Array] Type of entities to search for
82
+ # @param search [String] The string to search on
83
+ # @param strict [Boolean] Whether the search should be a strict match
84
+ # @param params [Hash] Additional query string parameters
85
+ # @param headers [Hash] Additional headers
86
+ #
87
+ # @raise [ESI::Errors::BadRequestError] Bad request
88
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
89
+ # @raise [ESI::Errors::InternalServerError] Internal server error
90
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
91
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
92
+ #
93
+ # @see https://esi.evetech.net/ui/#/Search/get_search
94
+ def get_search(categories:, search:, strict: nil, headers: {}, params: {})
95
+ get_search_raw(categories: categories, search: search, strict: strict, headers: headers, params: params).json
96
+ end
97
+
41
98
  # Search for entities that match a given sub-string.
42
99
  #
43
100
  # This endpoint is cached for up to 3600 seconds.
@@ -59,9 +116,9 @@ module ESI
59
116
  # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
60
117
  #
61
118
  # @see https://esi.evetech.net/ui/#/Search/get_search
62
- def get_search(categories:, search:, strict:, params: {}, headers: {})
63
- query_string = URI.encode_www_form([["categories", categories], ["search", search], ["strict", strict]])
64
- get("/search/?#{query_string}", headers: headers, params: params)
119
+ def get_search_raw(categories:, search:, strict: nil, headers: {}, params: {})
120
+ params.merge!("categories" => categories, "search" => search, "strict" => strict)
121
+ get("/search/", headers: headers, params: params)
65
122
  end
66
123
  end
67
124
  end