如何使用其API来删除Imageshack图像 [英] How to delete an image on Imageshack using its API
问题描述
我试图用Imageshack API来删除图像上传到我的帐户。
I'm trying to use the Imageshack api to delete an image uploaded to my account.
我已经成功地设法使用API上传图片到它。
I have successfully managed to upload an image to it using the API.
https://www.imageshack.us/upload_api.php?url=[URL_OF_THE_IMAGE]&key=[MY_KEY]
我可以删除通过使用标准接口上载的图象。
I can delete the image uploaded by using the standard interface.
使用API的任何解决方案?
Any solution using the API?
推荐答案
我已经做管理了下列文件:
I have managed it by doing the following:
首先登录到得到的auth_token:
First log in to get an auth_token:
HTTP POST
https://api.imageshack.us/v1/user/login?username=YOUR_USERNAME&password=YOUR_PASSWORD
从响应解析的auth_token
Parse "auth_token" from the response
然后删除:
HTTP DELETE
https://api.imageshack.us/v1/images/SERVER/FILENAME?auth_token=AUTHTOKEN
在除的authToken你需要包括服务器和文件名,我存储这些从files.server和files.image.filename了回来应对上传API调用。
In addition to AUTHTOKEN you need include SERVER and FILENAME, I store these from files.server and files.image.filename that come back in the response to the upload API call.
这篇关于如何使用其API来删除Imageshack图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!