https://github.com/jc21/nodejs-nzbget-jsonrpc-api
NodeJS NzbGet JSONRPC API Client for v18+
https://github.com/jc21/nodejs-nzbget-jsonrpc-api
Last synced: 2 months ago
JSON representation
NodeJS NzbGet JSONRPC API Client for v18+
- Host: GitHub
- URL: https://github.com/jc21/nodejs-nzbget-jsonrpc-api
- Owner: jc21
- License: mit
- Created: 2018-10-03T22:33:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T03:33:58.000Z (almost 4 years ago)
- Last Synced: 2025-02-26T08:38:34.817Z (3 months ago)
- Language: TypeScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NzbGet JSONRPC API Client
[](https://www.npmjs.com/package/@jc21/nzbget-jsonrpc-api)
[](https://www.npmjs.com/package/@jc21/nzbget-jsonrpc-api)
[](https://www.npmjs.com/package/@jc21/nzbget-jsonrpc-api)See: https://nzbget.net/api/
This client is designed for NZBGet v18+
### Usage
```javascript
const NzbGet = require('@jc21/nzbget-jsonrpc-api').Client;let ng = new NzbGet('http://username:password@localhost:6789/jsonrpc');
// Using the helper method:
ng.listgroups()
.then(groups => {
console.log(groups);
})
.catch(err => {
console.error('ERR:', err);
});// Or using the custom call method:
ng.call('listgroups')
.then(groups => {
console.log(result);
})
.catch(err => {
console.error('ERR:', err);
});
```#### Helper Methods
These methods have the same method signature as the [API Documentation](https://nzbget.net/api/)
- `ng.version()`
- `ng.shutdown()`
- `ng.reload()`
- `ng.listgroups()`
- `ng.listfiles()`
- `ng.history()`
- `ng.append()`
- `ng.editqueue()`
- `ng.scan()`
- `ng.status()`
- `ng.getlog()`
- `ng.writelog()`
- `ng.loadlog()`
- `ng.servervolumes()`
- `ng.resetservervolume()`
- `ng.rate()`
- `ng.pausedownload()`
- `ng.resumedownload()`
- `ng.pausepost()`
- `ng.resumepost()`
- `ng.pausescan()`
- `ng.resumescan()`
- `ng.scheduleresume()`
- `ng.config()`
- `ng.loadconfig()`
- `ng.saveconfig()`
- `ng.configtemplates()`### Compiling
```bash
npm install
tsc --project tsconfig.build.json
```