kkito-transmission-rpc
v0.2.0
Published
transmission-rpc
Downloads
23
Readme
transmission rpc client
transmission daemon client
the rpc client by using node https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt
how to use
import { Transmission } from './src/transmission'
// port and auth are optional
const t = new Transmission({ host: '192.168.x.x' });
// const token = await t.getToken();
const result = await t.getTorrents();
// tslint:disable-next-line:no-console
// console.log(token);
// const result = await t.getTorrentInfo("1");
// const result = await t.getTorrents()
// const result = await t.startTorrent('./jYAlukcm.torrent' , '/mnt/sda1/');
// const result = await t.removeTorrent(12);
// tslint:disable-next-line:no-console
console.log(result);
install
npm install -g kkito-transmission-rpc
or install local npm install -g .
test env
use (https://hub.docker.com/r/linuxserver/transmission/)[https://hub.docker.com/r/linuxserver/transmission/] for test env
use in cli
host=192.168.123.36 port=9091 node-transmission list
host=192.168.123.36 port=9091 node-transmission list-working
host=192.168.123.36 port=9091 node-transmission add /tmp/my.torrent /mnt/sdc/path