nzbget-api
A complete implementation of the NZBGet API
Last updated 4 years ago by hongkongkiwi .
MIT · Original npm · Tarball · package.json
$ cnpm install nzbget-api 
SYNC missed versions from official npm registry.

nzbget-api

A complete NZBGet API implementation library with extensive tests.

To Install

npm install nzbget-api

To Use

var nzbGet = require('nzbget-api');

var options = {
  host: '127.0.0.1',
  port: 6789,
  login: 'yourusername',
  hash: 'yourpassword'
}

var nzbGet = new NZBGet(options);

Once you have the nzbGet object you can make the calls using the following:

// Get the NZBGet server version
nzbGet.version(function(err, result) {
  console.log(result.version);
});

// Reload the server
nzbGet.reload(function(err, result) {
});

// Shutdown the server
nzbGet.shutdown(function(err, result) {
});

// List groups
nzbGet.listGroups(function(err, result) {
});

// Get History (without hidden)
nzbGet.history(false, function(err, result) {
});

Have a look at the NZBGet API for a full list of functions.

Testing

npm test

The testing is done with mocha and nock with saved JSON responses. You do not need a live server to perform the tests.

License

This project is under the MIT License. See license file for more details.

Contributing

Please send a pull request if you have any additions to the library.

Current Tags

  • 0.0.3                                ...           latest (4 years ago)

2 Versions

  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |