Share-online.biz Download API for Node.js
npm install share-online --save
Create a api token on digitalocean and save it under config/Default.json
{
"Username": "012345678",
"Password": "ah.k2kSAd0K"
}
api.checkLinks(['SBABJKLNYE3T', 'www.share-online.biz/dl/CBGAJOL7XE3T'])
.then(function(links) {
...
});
api.getUserDetail()
.then(function(account) {
...
});
api.getDownloadLink(download_id)
.then(function(details) {
...
});
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) {
...
});