Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/t411
T411 API client
https://github.com/thibauts/t411
Last synced: 2 months ago
JSON representation
T411 API client
- Host: GitHub
- URL: https://github.com/thibauts/t411
- Owner: thibauts
- License: mit
- Created: 2015-05-01T19:28:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-07T08:42:36.000Z (over 7 years ago)
- Last Synced: 2024-11-01T01:53:06.789Z (2 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 17
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
t411
====
### T411 API clientA client for the [T411 API](https://api.t411.io/) that works both in node and the browser with [browserify](http://browserify.org).
Install
-------```bash
$ npm install t411
```Usage
-----```javascript
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 :)
});
```