bittorrent-sync

A simple wrapper for the BitTorrent Sync API

Node BitTorrent Sync

A simple wrapper for the BitTorrent Sync API.

Installation

$ npm install bittorrent-sync

Usage

var BTSync = require('bittorrent-sync');
 
var btsync = new BTSync({
  host: 'localhost',
  port: 8888,
  username: 'myusername',
  password: 'mypassword',
  timeout: 10000
});
 
btsync.getFolders(function(errdata) {
  if (err) throw err;
  console.log(data);
});
 
btsync.addFolder({
  dir: '/btsync/data/folder1'
}, function(errdata) {
    if (err) throw err;
    console.log(data);
});

Available methods

  • getFolders
  • addFolder
  • removeFolder
  • getFiles
  • setFilePrefs
  • getFolderPeers
  • getSecrets
  • getFolderPrefs
  • setFolderPrefs
  • getFolderHosts
  • setFolderHosts
  • getPrefs
  • setPrefs
  • getOs
  • getVersion
  • getSpeed
  • shutdown

Full API documentation can be found on the BitTorrent Sync Website

License

Node BitTorrent Sync is licensed under the MIT License.