node-kickass-json

0.1.1 • Public • Published

node-kickass-json NPM version Build Status

NPM

Query for torrents at Kickass.to with Node.js.

Installation

Add node-kickass-json to your existing Node.js project.

npm install node-kickass-json --save

Usage

See examples for more usage details.

Built as a Fluent Interface. Also known as method chaining, as used in jQuery. Fork of node-kickass by @Glavin001

var Kickass = require('node-kickass-json');
 
var k = new Kickass()
.setQuery('Almost Human')   // Set search Query parameter
.run(function(error, data) {
  /*
  this  {context} => Current Context is set to be `k`.
  error  {error} => An Error object representing the error encountered
  data    {array} => An array of Torrent.
  */
  if (error === null) {
    // No errors occured.
    console.log(data.length, "results");
    console.log(
      errors,     // Error object, will be null if no error
      data       // Array of Torrent read from this `run`.
      );
  } else {
    // An error occurred.
    console.log(error, "error");
  }
})
 

Functions

  • constructor
var k = new Kickass()
  • setQuery
k.setQuery("Search Name")
  • setSort
k.setSort({
  field: "seeders",
  sorder: "desc"
});
  • run
k.run(function(error, data) {
            //console.log(data);
            if (error === null && data !== null) {
                    done();
            }
        });

Disclaimer

There are obvious legal issues, with downloading copyrighted material you do not have a license for. We do not endorse such use cases and take no responsibility for the use people make of it.

Package Sidebar

Install

npm i node-kickass-json

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • belphemur