Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/no0dles/node-share-online
Share-online.biz Download API
https://github.com/no0dles/node-share-online
Last synced: 25 days ago
JSON representation
Share-online.biz Download API
- Host: GitHub
- URL: https://github.com/no0dles/node-share-online
- Owner: no0dles
- Created: 2015-03-25T18:00:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-25T18:05:05.000Z (almost 10 years ago)
- Last Synced: 2024-04-28T04:42:29.315Z (9 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`
```json
{
"Username": "012345678",
"Password": "ah.k2kSAd0K"
}
```## Usage
### Check links for status
```js
api.checkLinks(['SBABJKLNYE3T', 'www.share-online.biz/dl/CBGAJOL7XE3T'])
.then(function(links) {
...
});
```### Get details of your account
```js
api.getUserDetail()
.then(function(account) {
...
});
```### Get download details by id
```js
api.getDownloadLink(download_id)
.then(function(details) {
...
});
```### Download file with progress callback
```js
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) {
...
});
```