anitabyte / etsyv3

Python client for the Etsy OpenAPI v3
GNU General Public License v3.0
58 stars 24 forks source link

Add update listing image ID #21

Closed darrelbelvin closed 2 months ago

darrelbelvin commented 4 months ago

The Etsy API endpoint 'uploadListingImage' allows for assigning a previously uploaded listing_image_id, and re-using images is allowed.

This pull request adds a new request type, UpdateListingImageIDRequest, that takes an existing image ID instead of a file and uses that ID to update an image.

My use case was replacing an image that was identical over several hundred listings. I didn't want to upload it several hundred times though. After uploading it once and getting the listing_image_id, linking it to all the rest of the listings took the API just a few seconds. This is also advantageous for viewing performance as the image shares the same URL across listings and visits to subsequent listings can pull it from the cache.

anitabyte commented 2 months ago

Sorry for the delay - been a bit recently. But thanks for your help!