{"analyzedAt":"2022-06-27T18:50:10.189Z","collected":{"metadata":{"name":"torrent-project-api","scope":"unscoped","version":"1.0.4","description":"Torrent search API for torrentproject.se","keywords":["torrentproject","torrent","magnet","api","search"],"date":"2016-03-25T17:07:27.264Z","author":{"name":"Mathias Rasmussen","email":"mathiasvr@gmail.com","username":"mathiasvr"},"publisher":{"username":"mathiasvr","email":"mathiasvr@gmail.com"},"maintainers":[{"username":"mathiasvr","email":"mathiasvr@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/mathiasvr/torrent-project-api.git"},"links":{"npm":"https://www.npmjs.com/package/torrent-project-api","homepage":"https://github.com/mathiasvr/torrent-project-api#readme","repository":"https://github.com/mathiasvr/torrent-project-api","bugs":"https://github.com/mathiasvr/torrent-project-api/issues"},"license":"MIT","dependencies":{"lodash":"^3.10.1","request":"^2.67.0"},"devDependencies":{"tape":"^4.3.0"},"releases":[{"from":"2022-05-28T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2022-03-29T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2021-12-29T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2021-06-27T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2020-06-27T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0}],"hasTestScript":true,"readme":"# Torrent Project API [![npm][npm-image]][npm-url]\n\n[npm-image]: https://img.shields.io/npm/v/torrent-project-api.svg\n[npm-url]: https://www.npmjs.com/package/torrent-project-api\n\nTorrent search API for [torrentproject.se](https://torrentproject.se)\n\n## install\n\n```\nnpm install torrent-project-api\n```\n\n## example\n\n```js\nvar tp = require('torrent-project-api')\n\ntp.search('ubuntu', function (err, result) {\n  if (err) return console.error(err)\n\n  console.log('Found ' + result.torrents.length + ' torrents out of ' + result.total + ' results.')\n\n  console.log('The top result was: ' + result.torrents[0].title)\n\n  tp.magnet(result.torrents[0], function (err, link) {\n    if (err) return console.error(err)\n    console.log('Here is a magnet link for it:')\n    console.log(link)\n  })\n})\n```\n\nThe `result` object looks like this:\n\n```js\n{ total: 18427,\n  torrents: [\n    { title: 'ubuntu-14.04.3-desktop-amd64.iso',\n      category: 'ALL',\n      seeds: 3226,\n      leechs: 59,\n      size: 1054867456,\n      hash: '743bc6fad39e3a35460d31af5322c131dd196ac2' },\n    { ... }\n  ]\n}\n```\n\n## usage\n\n### search\n\nSearch for torrents\n\n```js\nvar query = ['key', 'words']        // array or string\n\nvar options = {\n  limit: 10,                        // amount of results (1-100)\n  order: 'peers',                   // sort order\n  filter: 'tv'                      // filter by category\n}\n\ntp.search(query, options, callback) // or simply tp(...)\n```\n\nSort order for `options.order` can be found in `tp.orderings`:\n> `best`, `latest`, `seeders`, `oldest`, `speed`, `peers`, `sizeD`, `sizeA`\n\nCategories for `options.filter` can be found in `tp.filters`:\n> `all`, `audio`, `lossless`, `mp3`, `video`, `tv`, `dvdrip`, `hdrip`, `dvd`, `lq`, `ebooks`, `comics`, `magazines`, `tutorials`, `audiobook`, `images`, `mobile`, `games`, `pc`, `nintendo`, `playstation`, `xbox`, `applications`, `adult`\n\n### magnet\n\nGet magnet link for `result.torrents[]`\n\n```js\ntp.magnet(torrent, function (err, link) { })\n```\n\nThe returned magnet `link`:\n> magnet:?xt=urn:btih:743bc6fad39e3a35460d31af5322c131dd196ac2&dn=ubuntu-14.04.3-desktop-amd64.iso&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fgalliumsurfer.tk%3A6969%2Fannounce\n\n### trackers\n\nReceive a list of trackers from `result.torrents[]` or `infohash`\n\n```js\ntp.trackers(torrent, function (err, trackers) { })\n```\n\nReturns list of `trackers`:\n```js\n[ 'udp://tracker.leechers-paradise.org:6969/announce', 'udp://galliumsurfer.tk:6969/announce', ... ]\n```\n### peers\n\nReceive amount of seeders and peers from `result.torrents[]` or `infohash`\n\n```js\ntp.peers('743bc6fad39e3a35460d31af5322c131dd196ac2', function (err, peers) { })\n```\n\nReturns list of `peers`:\n```js\n{ seeds: '3226', leechs: '59' }\n```\n\n## license\n\nMIT"},"npm":{"downloads":[{"from":"2022-06-26T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2022-06-20T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":2},{"from":"2022-05-28T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":16},{"from":"2022-03-29T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":65},{"from":"2021-12-29T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":137},{"from":"2021-06-27T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":289}],"starsCount":2},"github":{"starsCount":5,"forksCount":0,"subscribersCount":2,"issues":{"count":0,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"mathiasvr","commitsCount":15}],"commits":[{"from":"2022-06-20T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2022-05-28T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2022-03-29T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2021-12-29T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0},{"from":"2021-06-27T00:00:00.000Z","to":"2022-06-27T00:00:00.000Z","count":0}]},"source":{"files":{"readmeSize":2771,"testsSize":2423},"badges":[{"urls":{"original":"https://img.shields.io/npm/v/torrent-project-api.svg","shields":"https://img.shields.io/npm/v/torrent-project-api.svg","content":"https://img.shields.io/npm/v/torrent-project-api.json"},"info":{"service":"npm","type":"version","modifiers":{"type":"v"}}}],"outdatedDependencies":{"lodash":{"required":"^3.10.1","stable":"4.17.21","latest":"4.17.21"}}}},"evaluation":{"quality":{"carefulness":0.71,"tests":0.6,"health":0.75,"branding":0.15},"popularity":{"communityInterest":10,"downloadsCount":21.666666666666668,"downloadsAcceleration":-0.072279299847793,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9,"issuesDistribution":0.9}},"score":{"final":0.6300437021149059,"detail":{"quality":0.8858845266956874,"popularity":0.0409144349171878,"maintenance":0.9998808339576686}}}