1.0.1 • Published 9 years ago
share-online v1.0.1
node-share-online
Share-online.biz Download API for Node.js
Installation
npm install share-online --save
Configuration
Create a api token on digitalocean and save it under config/Default.json
{
"Username": "012345678",
"Password": "ah.k2kSAd0K"
}
Usage
Check links for status
api.checkLinks(['SBABJKLNYE3T', 'www.share-online.biz/dl/CBGAJOL7XE3T'])
.then(function(links) {
...
});
Get details of your account
api.getUserDetail()
.then(function(account) {
...
});
Get download details by id
api.getDownloadLink(download_id)
.then(function(details) {
...
});
Download file with progress callback
var progress_callback = function(current, total) {
console.log('%d of %d', current, total);
};
api.downloadFile(download_link, file_name, a, progress_callback)
.then(function(response) {
...
});