https://github.com/glavin001/node-kickass
Query for torrents at Kickass.to with Node.js.
https://github.com/glavin001/node-kickass
Last synced: 14 days ago
JSON representation
Query for torrents at Kickass.to with Node.js.
- Host: GitHub
- URL: https://github.com/glavin001/node-kickass
- Owner: Glavin001
- License: mit
- Created: 2014-01-12T06:23:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-12T21:30:29.000Z (over 11 years ago)
- Last Synced: 2025-04-30T08:13:33.898Z (14 days ago)
- Homepage: https://www.npmjs.com/package/node-kickass
- Size: 145 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-kickass [](http://badge.fury.io/js/node-kickass) [](https://travis-ci.org/Glavin001/node-kickass)
============[](https://nodei.co/npm/node-kickass/)
> Query for torrents at Kickass.to with Node.js.
## Installation
Add `node-kickass` to your existing Node.js project.
```bash
npm install node-kickass --save
```## Usage
See [examples](https://github.com/Glavin001/node-kickass/tree/master/examples) for more usage details.
Built as a [Fluent Interface](http://en.wikipedia.org/wiki/Fluent_interface).
Also known as [method chaining](http://en.wikipedia.org/wiki/Method_chaining#jQuery),
as used in [jQuery](http://jquery.com/).```javascript
var Kickass = require('node-kickass');var k = new Kickass()
.setQuery('Almost Human') // Set search Query parameter
.setPage(0) // Optional
.run(function(errors, data) {
/*
this {context} => Current Context is set to be `k`.
errors {array} => An array of errors that occured.
data {array} => An array of items/articles that were read.
*/
if (! errors.length > 0) {
// No errors occured.
console.log(data.length, "results");
console.log(
errors, // Array of errors, will be empty array given there are no errors.
data, // Array of items/articles read from this `run`.
this.items // Array of all items/articles read that have been associated to `k`, which is the current context `this`.
);
} else {
// One or more errors occured.
console.log(errors, "errors");
}
})```
## Functions
- `constructor`
```javascript
var k = new Kickass()
```- `setQuery`
```javascript
k.setQuery("Search Name")
```- `setPage`
```javascript
k.setPage(0)
```- `setSort`
```javascript
k.setSort({
field: "seeders",
sorder: "desc"
});
```- `run`
```javascript
k.run(function(errors, data) {
//console.log(data);
if (! errors.length > 0) {
done();
//console.log(data.length);
} else {
//console.log(errors);
}
});
```- `wait` (FIXME)
Waits for all requests to be completed.
```javascript
k.wait()
```-----
### 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.