JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q51855F
  • License MIT

T411 API client

Package Exports

  • t411

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (t411) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

t411

T411 API client

A client for the T411 API that works both in node and the browser with browserify.

Install

$ npm install t411

Usage

var T411 = require('t411');

var client = new T411();

client.auth('your-username', 'your-password', function(err) {
  if(err) throw err;

  // search torrents
  client.search('interstellar', function(err, result) {
    if(err) throw err;
    console.log(result);
  });

  // download and parse a .torrent
  client.download(id, function(err, buf) {
    // `buf` is a Buffer in node as well as in the browser
    var parsed = require('parse-torrent')(buf);
    console.log(parsed);
  });

  // All the methods provided by the API are implemented (categories,
  // terms, tops, bookmarks). For advanced use check the source code, 
  // it should be pretty easy to read :)
});