npm.io
1.0.3 • Published 8 years ago

kuvien.js

Licence
ISC
Version
1.0.3
Deps
1
Vulns
1
Weekly
0

kuvien.js

A Node module for interfacing with the Kuvien.io API

Install

npm install kuvien.js

Functions

(For examples, replace <kjs> with whatever your variable is)

.uploadStream(stream, key, callback) Upload a file read stream to Kuvien.io Example

// Replace file.png with your filename
var s = fs.createReadStream('file.png');

<kjs>.uploadStream(s, 'yourKuvienDomainKey', function(url) {
    console.log(url);
});

.listDomains(callback) List all domains on the service Example

<kjs>.listDomains(function(domains) {
    // The domains variable is an array containing every domain
    console.log(domains);
    console.log(domains[0]);
});

Keywords