esi-sdk 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,11 +28,38 @@ module ESI
28
28
  #
29
29
  # @see https://esi.evetech.net/ui/#/Contacts/delete_characters_character_id_contacts
30
30
  def delete_character_contacts(character_id:, contact_ids:, headers: {}, params: {})
31
- params.merge!("contact_ids" => contact_ids)
32
- delete("/characters/#{character_id}/contacts/", headers: headers, params: params).json
31
+ delete_character_contacts_raw(character_id: character_id, contact_ids: contact_ids, headers: headers, params: params).json
33
32
  end
34
33
  alias delete_characters_character_id_contacts delete_character_contacts
35
34
 
35
+ # Bulk delete contacts.
36
+ #
37
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
38
+ #
39
+ # @esi_scope esi-characters.write_contacts.v1
40
+ #
41
+ # @esi_version dev
42
+ # @esi_version v2
43
+ #
44
+ # @param character_id [Integer] An EVE character ID
45
+ # @param contact_ids [Array] A list of contacts to delete
46
+ # @param params [Hash] Additional query string parameters
47
+ # @param headers [Hash] Additional headers
48
+ #
49
+ # @raise [ESI::Errors::BadRequestError] Bad request
50
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
51
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
52
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
53
+ # @raise [ESI::Errors::InternalServerError] Internal server error
54
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
55
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
56
+ #
57
+ # @see https://esi.evetech.net/ui/#/Contacts/delete_characters_character_id_contacts
58
+ def delete_character_contacts_raw(character_id:, contact_ids:, headers: {}, params: {})
59
+ params.merge!("contact_ids" => contact_ids)
60
+ delete("/characters/#{character_id}/contacts/", headers: headers, params: params)
61
+ end
62
+
36
63
  # Return custom labels for an alliance's contacts.
37
64
  #
38
65
  # This endpoint is cached for up to 300 seconds.
@@ -59,10 +86,39 @@ module ESI
59
86
  #
60
87
  # @see https://esi.evetech.net/ui/#/Contacts/get_alliances_alliance_id_contacts_labels
61
88
  def get_alliance_contact_labels(alliance_id:, headers: {}, params: {})
62
- get("/alliances/#{alliance_id}/contacts/labels/", headers: headers, params: params).json
89
+ get_alliance_contact_labels_raw(alliance_id: alliance_id, headers: headers, params: params).json
63
90
  end
64
91
  alias get_alliances_alliance_id_contacts_labels get_alliance_contact_labels
65
92
 
93
+ # Return custom labels for an alliance's contacts.
94
+ #
95
+ # This endpoint is cached for up to 300 seconds.
96
+ #
97
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
98
+ #
99
+ # @esi_scope esi-alliances.read_contacts.v1
100
+ #
101
+ # @esi_version dev
102
+ # @esi_version legacy
103
+ # @esi_version v1
104
+ #
105
+ # @param alliance_id [Integer] An EVE alliance 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/#/Contacts/get_alliances_alliance_id_contacts_labels
118
+ def get_alliance_contact_labels_raw(alliance_id:, headers: {}, params: {})
119
+ get("/alliances/#{alliance_id}/contacts/labels/", headers: headers, params: params)
120
+ end
121
+
66
122
  # Return contacts of an alliance.
67
123
  #
68
124
  # This endpoint is cached for up to 300 seconds.
@@ -88,11 +144,39 @@ module ESI
88
144
  #
89
145
  # @see https://esi.evetech.net/ui/#/Contacts/get_alliances_alliance_id_contacts
90
146
  def get_alliance_contacts(alliance_id:, headers: {}, params: {})
91
- responses = get("/alliances/#{alliance_id}/contacts/", headers: headers, params: params)
147
+ responses = get_alliance_contacts_raw(alliance_id: alliance_id, headers: headers, params: params)
92
148
  responses.map(&:json).reduce([], :concat)
93
149
  end
94
150
  alias get_alliances_alliance_id_contacts get_alliance_contacts
95
151
 
152
+ # Return contacts of an alliance.
153
+ #
154
+ # This endpoint is cached for up to 300 seconds.
155
+ #
156
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
157
+ #
158
+ # @esi_scope esi-alliances.read_contacts.v1
159
+ #
160
+ # @esi_version dev
161
+ # @esi_version v2
162
+ #
163
+ # @param alliance_id [Integer] An EVE alliance ID
164
+ # @param params [Hash] Additional query string parameters
165
+ # @param headers [Hash] Additional headers
166
+ #
167
+ # @raise [ESI::Errors::BadRequestError] Bad request
168
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
169
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
170
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
171
+ # @raise [ESI::Errors::InternalServerError] Internal server error
172
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
173
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
174
+ #
175
+ # @see https://esi.evetech.net/ui/#/Contacts/get_alliances_alliance_id_contacts
176
+ def get_alliance_contacts_raw(alliance_id:, headers: {}, params: {})
177
+ get("/alliances/#{alliance_id}/contacts/", headers: headers, params: params)
178
+ end
179
+
96
180
  # Return custom labels for a character's contacts.
97
181
  #
98
182
  # This endpoint is cached for up to 300 seconds.
@@ -119,10 +203,39 @@ module ESI
119
203
  #
120
204
  # @see https://esi.evetech.net/ui/#/Contacts/get_characters_character_id_contacts_labels
121
205
  def get_character_contact_labels(character_id:, headers: {}, params: {})
122
- get("/characters/#{character_id}/contacts/labels/", headers: headers, params: params).json
206
+ get_character_contact_labels_raw(character_id: character_id, headers: headers, params: params).json
123
207
  end
124
208
  alias get_characters_character_id_contacts_labels get_character_contact_labels
125
209
 
210
+ # Return custom labels for a character's contacts.
211
+ #
212
+ # This endpoint is cached for up to 300 seconds.
213
+ #
214
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
215
+ #
216
+ # @esi_scope esi-characters.read_contacts.v1
217
+ #
218
+ # @esi_version dev
219
+ # @esi_version legacy
220
+ # @esi_version v1
221
+ #
222
+ # @param character_id [Integer] An EVE character ID
223
+ # @param params [Hash] Additional query string parameters
224
+ # @param headers [Hash] Additional headers
225
+ #
226
+ # @raise [ESI::Errors::BadRequestError] Bad request
227
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
228
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
229
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
230
+ # @raise [ESI::Errors::InternalServerError] Internal server error
231
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
232
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
233
+ #
234
+ # @see https://esi.evetech.net/ui/#/Contacts/get_characters_character_id_contacts_labels
235
+ def get_character_contact_labels_raw(character_id:, headers: {}, params: {})
236
+ get("/characters/#{character_id}/contacts/labels/", headers: headers, params: params)
237
+ end
238
+
126
239
  # Return contacts of a character.
127
240
  #
128
241
  # This endpoint is cached for up to 300 seconds.
@@ -148,11 +261,39 @@ module ESI
148
261
  #
149
262
  # @see https://esi.evetech.net/ui/#/Contacts/get_characters_character_id_contacts
150
263
  def get_character_contacts(character_id:, headers: {}, params: {})
151
- responses = get("/characters/#{character_id}/contacts/", headers: headers, params: params)
264
+ responses = get_character_contacts_raw(character_id: character_id, headers: headers, params: params)
152
265
  responses.map(&:json).reduce([], :concat)
153
266
  end
154
267
  alias get_characters_character_id_contacts get_character_contacts
155
268
 
269
+ # Return contacts of a character.
270
+ #
271
+ # This endpoint is cached for up to 300 seconds.
272
+ #
273
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
274
+ #
275
+ # @esi_scope esi-characters.read_contacts.v1
276
+ #
277
+ # @esi_version dev
278
+ # @esi_version v2
279
+ #
280
+ # @param character_id [Integer] An EVE character ID
281
+ # @param params [Hash] Additional query string parameters
282
+ # @param headers [Hash] Additional headers
283
+ #
284
+ # @raise [ESI::Errors::BadRequestError] Bad request
285
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
286
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
287
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
288
+ # @raise [ESI::Errors::InternalServerError] Internal server error
289
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
290
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
291
+ #
292
+ # @see https://esi.evetech.net/ui/#/Contacts/get_characters_character_id_contacts
293
+ def get_character_contacts_raw(character_id:, headers: {}, params: {})
294
+ get("/characters/#{character_id}/contacts/", headers: headers, params: params)
295
+ end
296
+
156
297
  # Return custom labels for a corporation's contacts.
157
298
  #
158
299
  # This endpoint is cached for up to 300 seconds.
@@ -179,10 +320,39 @@ module ESI
179
320
  #
180
321
  # @see https://esi.evetech.net/ui/#/Contacts/get_corporations_corporation_id_contacts_labels
181
322
  def get_corporation_contact_labels(corporation_id:, headers: {}, params: {})
182
- get("/corporations/#{corporation_id}/contacts/labels/", headers: headers, params: params).json
323
+ get_corporation_contact_labels_raw(corporation_id: corporation_id, headers: headers, params: params).json
183
324
  end
184
325
  alias get_corporations_corporation_id_contacts_labels get_corporation_contact_labels
185
326
 
327
+ # Return custom labels for a corporation's contacts.
328
+ #
329
+ # This endpoint is cached for up to 300 seconds.
330
+ #
331
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
332
+ #
333
+ # @esi_scope esi-corporations.read_contacts.v1
334
+ #
335
+ # @esi_version dev
336
+ # @esi_version legacy
337
+ # @esi_version v1
338
+ #
339
+ # @param corporation_id [Integer] An EVE corporation ID
340
+ # @param params [Hash] Additional query string parameters
341
+ # @param headers [Hash] Additional headers
342
+ #
343
+ # @raise [ESI::Errors::BadRequestError] Bad request
344
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
345
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
346
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
347
+ # @raise [ESI::Errors::InternalServerError] Internal server error
348
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
349
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
350
+ #
351
+ # @see https://esi.evetech.net/ui/#/Contacts/get_corporations_corporation_id_contacts_labels
352
+ def get_corporation_contact_labels_raw(corporation_id:, headers: {}, params: {})
353
+ get("/corporations/#{corporation_id}/contacts/labels/", headers: headers, params: params)
354
+ end
355
+
186
356
  # Return contacts of a corporation.
187
357
  #
188
358
  # This endpoint is cached for up to 300 seconds.
@@ -208,11 +378,39 @@ module ESI
208
378
  #
209
379
  # @see https://esi.evetech.net/ui/#/Contacts/get_corporations_corporation_id_contacts
210
380
  def get_corporation_contacts(corporation_id:, headers: {}, params: {})
211
- responses = get("/corporations/#{corporation_id}/contacts/", headers: headers, params: params)
381
+ responses = get_corporation_contacts_raw(corporation_id: corporation_id, headers: headers, params: params)
212
382
  responses.map(&:json).reduce([], :concat)
213
383
  end
214
384
  alias get_corporations_corporation_id_contacts get_corporation_contacts
215
385
 
386
+ # Return contacts of a corporation.
387
+ #
388
+ # This endpoint is cached for up to 300 seconds.
389
+ #
390
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
391
+ #
392
+ # @esi_scope esi-corporations.read_contacts.v1
393
+ #
394
+ # @esi_version dev
395
+ # @esi_version v2
396
+ #
397
+ # @param corporation_id [Integer] An EVE corporation ID
398
+ # @param params [Hash] Additional query string parameters
399
+ # @param headers [Hash] Additional headers
400
+ #
401
+ # @raise [ESI::Errors::BadRequestError] Bad request
402
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
403
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
404
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
405
+ # @raise [ESI::Errors::InternalServerError] Internal server error
406
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
407
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
408
+ #
409
+ # @see https://esi.evetech.net/ui/#/Contacts/get_corporations_corporation_id_contacts
410
+ def get_corporation_contacts_raw(corporation_id:, headers: {}, params: {})
411
+ get("/corporations/#{corporation_id}/contacts/", headers: headers, params: params)
412
+ end
413
+
216
414
  # Bulk add contacts with same settings.
217
415
  #
218
416
  # This endpoint requires authorization (see {ESI::Client#authorize}).
@@ -241,11 +439,42 @@ module ESI
241
439
  #
242
440
  # @see https://esi.evetech.net/ui/#/Contacts/post_characters_character_id_contacts
243
441
  def post_character_contacts(character_id:, contact_ids:, standing:, label_ids: nil, watched: nil, headers: {}, params: {})
244
- params.merge!("label_ids" => label_ids, "standing" => standing, "watched" => watched)
245
- post("/characters/#{character_id}/contacts/", headers: headers, params: params, payload: contact_ids).json
442
+ post_character_contacts_raw(character_id: character_id, contact_ids: contact_ids, label_ids: label_ids, standing: standing, watched: watched, headers: headers, params: params).json
246
443
  end
247
444
  alias post_characters_character_id_contacts post_character_contacts
248
445
 
446
+ # Bulk add contacts with same settings.
447
+ #
448
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
449
+ #
450
+ # @esi_scope esi-characters.write_contacts.v1
451
+ #
452
+ # @esi_version dev
453
+ # @esi_version v2
454
+ #
455
+ # @param character_id [Integer] An EVE character ID
456
+ # @param contact_ids [Array] A list of contacts
457
+ # @param label_ids [Array] Add custom labels to the new contact
458
+ # @param standing [Number] Standing for the contact
459
+ # @param watched [Boolean] Whether the contact should be watched, note this is only effective on characters
460
+ # @param params [Hash] Additional query string parameters
461
+ # @param headers [Hash] Additional headers
462
+ #
463
+ # @raise [ESI::Errors::BadRequestError] Bad request
464
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
465
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
466
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
467
+ # @raise [ESI::Errors::InternalServerError] Internal server error
468
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
469
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
470
+ # @raise [ESI::Errors::EveServerError] Internal error thrown from the EVE server
471
+ #
472
+ # @see https://esi.evetech.net/ui/#/Contacts/post_characters_character_id_contacts
473
+ def post_character_contacts_raw(character_id:, contact_ids:, standing:, label_ids: nil, watched: nil, headers: {}, params: {})
474
+ params.merge!("label_ids" => label_ids, "standing" => standing, "watched" => watched)
475
+ post("/characters/#{character_id}/contacts/", headers: headers, params: params, payload: contact_ids)
476
+ end
477
+
249
478
  # Bulk edit contacts with same settings.
250
479
  #
251
480
  # This endpoint requires authorization (see {ESI::Client#authorize}).
@@ -273,10 +502,40 @@ module ESI
273
502
  #
274
503
  # @see https://esi.evetech.net/ui/#/Contacts/put_characters_character_id_contacts
275
504
  def put_character_contacts(character_id:, contact_ids:, standing:, label_ids: nil, watched: nil, headers: {}, params: {})
276
- params.merge!("label_ids" => label_ids, "standing" => standing, "watched" => watched)
277
- put("/characters/#{character_id}/contacts/", headers: headers, params: params, payload: contact_ids).json
505
+ put_character_contacts_raw(character_id: character_id, contact_ids: contact_ids, label_ids: label_ids, standing: standing, watched: watched, headers: headers, params: params).json
278
506
  end
279
507
  alias put_characters_character_id_contacts put_character_contacts
508
+
509
+ # Bulk edit contacts with same settings.
510
+ #
511
+ # This endpoint requires authorization (see {ESI::Client#authorize}).
512
+ #
513
+ # @esi_scope esi-characters.write_contacts.v1
514
+ #
515
+ # @esi_version dev
516
+ # @esi_version v2
517
+ #
518
+ # @param character_id [Integer] An EVE character ID
519
+ # @param contact_ids [Array] A list of contacts
520
+ # @param label_ids [Array] Add custom labels to the contact
521
+ # @param standing [Number] Standing for the contact
522
+ # @param watched [Boolean] Whether the contact should be watched, note this is only effective on characters
523
+ # @param params [Hash] Additional query string parameters
524
+ # @param headers [Hash] Additional headers
525
+ #
526
+ # @raise [ESI::Errors::BadRequestError] Bad request
527
+ # @raise [ESI::Errors::UnauthorizedError] Unauthorized
528
+ # @raise [ESI::Errors::ForbiddenError] Forbidden
529
+ # @raise [ESI::Errors::ErrorLimitedError] Error limited
530
+ # @raise [ESI::Errors::InternalServerError] Internal server error
531
+ # @raise [ESI::Errors::ServiceUnavailableError] Service unavailable
532
+ # @raise [ESI::Errors::GatewayTimeoutError] Gateway timeout
533
+ #
534
+ # @see https://esi.evetech.net/ui/#/Contacts/put_characters_character_id_contacts
535
+ def put_character_contacts_raw(character_id:, contact_ids:, standing:, label_ids: nil, watched: nil, headers: {}, params: {})
536
+ params.merge!("label_ids" => label_ids, "standing" => standing, "watched" => watched)
537
+ put("/characters/#{character_id}/contacts/", headers: headers, params: params, payload: contact_ids)
538
+ end
280
539
  end
281
540
  end
282
541
  end