Skip to content

yannickcr/node-bittorrent-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node BitTorrent Sync

Maintenance Status NPM version Build Status Dependency Status Coverage Status Code Climate

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(err, data) {
  if (err) throw err;
  console.log(data);
});

btsync.addFolder({
  dir: '/btsync/data/folder1'
}, function(err, data) {
    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

Tests

Run tests using mocha

$ npm test

Code Coverage

Output a code coverage report in coverage.html

$ npm run coverage

Code Style

Check the code style with JSCS

$ npm run checkstyle

License

Node BitTorrent Sync is licensed under the MIT License.

About

A simple wrapper for the BitTorrent Sync API

Resources

License

Stars

Watchers

Forks

Packages

No packages published