RyanMarcus / node-deluge

A simple Deluge NodeJs API interface/wrapper, asynchronous NodeJs module to interact with the Deluge torrent client API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-deluge

A simple Deluge NodeJs API interface/wrapper, asynchronous NodeJs module to interact with the Deluge torrent client API.

Build Status npm version GitHub license

INSTALLATION

npm install --save node-deluge

USAGE

First 'require' the package into your project node-deluge accepts 3 parameters as input:

  • hostname: your server's url, eg. deluge.nusrath.com or 192.168.1.111
  • password: your server's password
  • port: the port your server consumes - the default is 8112 , if you are running the default port, use null here
var deluge = require('node-deluge')(hostname, password, port).then(function (res) {
  // res is true if authentication is good, false otherwise.
});

Make use of the various methods

The syntax is as follows:

var deluge = require('node-deluge')(hostname, password, port).then(function (res) {
  // res is true if authentication is good, false otherwise.
  return deluge.getStatus(); // OR deluge.getConfig(), currently only two methods available
}).then(function (data) {
  // do something with the data..
  
  deluge.close(); // by default node-deluge keeps the connection open and so programs won't terminate without this
});

TODO

Include all methods mentioned in the link specified in the 'RESOURCES' section

RESOURCES

Deluge API documentation

About

A simple Deluge NodeJs API interface/wrapper, asynchronous NodeJs module to interact with the Deluge torrent client API.

License:MIT License


Languages

Language:JavaScript 98.2%Language:Makefile 1.8%