node-imageshack
A node.js wrapper for the new ImageShack-API (v2). The module asynchronously uploads files to ImageShack.
Install
npm install imageshack
Usage
You must have an ImageShack-Account and an API-Key (https://imageshack.com/contact/api).
Setup
var imageshack = api_key: "your_api_key" email: "you@email.com" passwd: "yourpassword";
Upload a File
You can upload a file to ImageShack by calling upload-function and passing a NodeJS-Stream-Object.
var myfile = fs; imageshack;
Delete a File
You can delete a file by calling del-function and passing the file-ID (see upload-response)
imageshack;
Attention: ImageShack-API gives you also a success, if the image has already been deleted -- so if you try to delete an already deleted image, you will get a success as well.
Upload multiple files asynchronously
node-imageshack is designed asynchronously; you can call multiple upload()-methods and then all would work asynchronously:
var myfile1 = fs;var myfile2 = fs; imageshack; imageshack;
Upload multiple files (async.js)
You may also use async.js
to upload multiple files defined in an array.
var files = fsfs; async;
License
node-imageshack is licensed under the MIT license.