catbox.js

0.0.1 • Public • Published

catbox.js

A wrapper for the Catbox api

Use

const CatboxClient = require("catbox.js");

//Leave `userHash` out to use the API anonymously
const client = new CatboxClient("<userHash>");

//Upload a file
client.fileUpload("/path/to/file.png").then(url => console.log(url));

//Upload a file from a url
client.urlUpload("https://example.org/path/to/file.png").then(url => console.log(url));

//Delete files
client.deleteFiles(["filename.png", "abcdef.jpg"]);

Package Sidebar

Install

npm i catbox.js

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

59.2 kB

Total Files

6

Last publish

Collaborators

  • samsamson33