2.0.0 • Published 10 years ago

jipics v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

jipics

Node.JS wrapper for jipics image hosting website.

Installation

$ npm i jipics

Example

// Dependencies
var Jipics = require("jipics")
  , Request = require("request")
  ;

// Upload the local file
Jipics.upload(__dirname + "/heisencat.png", function (err, data) {
    console.log(err || "Image sucessfully uploaded: " + JSON.stringify(data, null, 4));
});

// Upload some laaaarge file, from remote
Jipics.upload({
    stream: Request("https://github.com/IonicaBizau/node-statique/raw/master/examples/public/images/large.jpg")
}, function (err, data) {
    console.log(err || "Image sucessfully uploaded: " + JSON.stringify(data, null, 4));
});

Documentation

upload(options, callback)

Uploads an image to jipics.net.

Params

  • Object options: A string representing the image path or an object:
    • path (String): the path to the image.
    • stream (Stream): a readable stream to get the image from (remote, hard-disk etc).
    • deleteAfterUpload (Boolean): if true, the image will be deleted after a sucessful upload.
  • Function callback: The callback function.

Return

  • Request The request object.

How to contribute

Have an idea? Found a bug? See how to contribute.

License

See the LICENSE file.

2.0.0

10 years ago

1.0.0

10 years ago

0.2.0

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago