{"analyzedAt":"2022-06-25T12:47:44.527Z","collected":{"metadata":{"name":"rarbg","scope":"unscoped","version":"1.3.2","description":"A wrapper for RARBG's api","keywords":["torrent","rarbg","torrent search"],"date":"2020-11-14T13:21:42.613Z","author":{"name":"Grant Holle","url":"https://github.com/grantholle"},"publisher":{"username":"grantholle","email":"hollegrant@gmail.com"},"maintainers":[{"username":"grantholle","email":"hollegrant@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/grantholle/rarbg.git"},"links":{"npm":"https://www.npmjs.com/package/rarbg","homepage":"https://github.com/grantholle/rarbg#readme","repository":"https://github.com/grantholle/rarbg","bugs":"https://github.com/grantholle/rarbg/issues"},"license":"MIT","dependencies":{"moment":"^2.29.1"},"devDependencies":{"chai":"^4.2.0","mocha":"^5.2.0","nyc":"^14.1.1","standard":"^10.0.3"},"releases":[{"from":"2022-05-26T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2022-03-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2021-12-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2021-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2020-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":2}],"hasTestScript":true,"readme":"# RARBG\n\n[![npm](https://img.shields.io/npm/dw/rarbg.svg?style=for-the-badge)](https://www.npmjs.com/package/rarbg)\n\nThis is a very simple [rarbg api](https://torrentapi.org/apidocs_v2.txt) wrapper in Node using Promises.\n\n## Installation\n\n```bash\n$ npm i rarbg --save\n```\n\n## Usage\n\n```javascript\nconst RarbgApi = require('rarbg')\n\n// Create a new instance of the module\nconst rarbg = new RarbgApi()\n\n// Or create a new instance with different configuration\nconst rarbg = new RarbgApi({\n  host: 'torrentapi.org',\n  path: '/pubapi_v2.php?',\n  app_id: 'my_application',\n  user_agent: 'My Application 0.0.1'\n})\n```\n\n### Methods\n\nThere are two methods, `search()` and `list()` that you can use. The `search()` method takes an object of options (see below) for various searching and sorting capabilities. Both methods return an array of objects containing `filename`, `category`, and `download` properties, or an error in the case of nothing being found or a different error.\n\n```javascript\n// Searching by various parameters\nrarbg.search({\n    search_string: 'star wars',\n    sort: 'seeders',\n    category: rarbg.categories.MOVIES_X264_1080,\n    min_seeders: 50\n  }).then(response => {\n    console.log(response)\n    // Output:\n    // [\n    //   {\n    //     \"filename\": \"Star.Wars.Episode.VII.The.Force.Awakens.2015.1080p.BluRay.H264.AAC-RARBG\",\n    //     \"category\": \"Movies/x264/1080\",\n    //     \"download\": \"magnet:?xt=urn:btih:...\"\n    //   },\n    //   {\n    //     \"filename\": \"Star.Wars.Episode.VII.The.Force.Awakens.2015.1080p.BluRay.x264-Replica\",\n    //     \"category\": \"Movies/x264/1080\",\n    //     \"download\": \"magnet:?xt=urn:btih:...\"\n    //   }\n    // ]\n  }).catch(console.error)\n\n// List recent torrents\nrarbg.list().then(response => {\n    console.log(response)\n    // Output:\n    // [\n    //   {\n    //     \"filename\": \"Those.Who.Cant.S02E02.HDTV.x264-AMBIT[rartv]\",\n    //     \"category\": \"TV Episodes\",\n    //     \"download\": \"magnet:?xt=urn:btih:...\"\n    //   },\n    //   {\n    //     \"filename\": \"Those.Who.Cant.S02E02.720p.HDTV.x264-AMBIT[rartv]\",\n    //     \"category\": \"TV HD Episodes\",\n    //     \"download\": \"magnet:?xt=urn:btih:...\"\n    //   }\n    //   ...\n    // ]\n  }).catch(console.error)\n```\n\n## Options\n\n### Searching\n- `search_string`: The string to search\n- `search_imdb`: Search by imdb id\n- `search_tvdb`: Search by tvdb id\n- `search_themoviedb`: Search by TMdb id\n\n### Categories\n- `category`: The only two string values can be `'movies'` and `'tv'`, but you can use the following constants:\n\n```javascript\nrarbg.categories.XXX\nrarbg.categories.MOVIES_XVID\nrarbg.categories.MOVIES_XVID_720\nrarbg.categories.MOVIES_X264\nrarbg.categories.MOVIES_X264_1080\nrarbg.categories.MOVIES_X264_720\nrarbg.categories.MOVIES_X264_3D\nrarbg.categories.MOVIES_X264_4K\nrarbg.categories.MOVIES_X265_4K\nrarbg.categories.MOVIES_X265_4K_HDR\nrarbg.categories.MOVIES_FULL_BD\nrarbg.categories.MOVIES_BD_REMUX\nrarbg.categories.TV_EPISODES\nrarbg.categories.TV_HD_EPISODES\nrarbg.categories.MUSIC_MP3\nrarbg.categories.MUSIC_FLAC\nrarbg.categories.GAMES_PC_ISO\nrarbg.categories.GAMES_PC_RIP\nrarbg.categories.GAMES_PS3\nrarbg.categories.GAMES_XBOX_360\nrarbg.categories.SOFTWARE_PC_ISO\nrarbg.categories.E_BOOKS\n\n// `category` can be an array to search in more than one category\nrarbg.search({\n  search_string: 'star wars',\n  category: [rarbg.categories.MOVIES_X264_1080, rarbg.categories.MOVIES_X264_720]\n}).then(res => {\n  //\n})\n```\n\n### Sorting\n- `sort`: Possible values are `'seeders'`, `'leechers'`, or `'last'`\n\n### Limiting\n- `limit`: Possible values are `25`, `50`, or `100`. Default is `25`\n\n### Minimum seeders/leechers\n- `min_seeders`: Numerical value for the minimum seeders available\n- `min_leechers`: Numerical value for the minimum leechers available\n\n\n## License\n\n[MIT](LICENSE.txt)"},"npm":{"downloads":[{"from":"2022-06-24T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":1},{"from":"2022-06-18T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":13},{"from":"2022-05-26T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":65},{"from":"2022-03-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":310},{"from":"2021-12-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":642},{"from":"2021-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":1038}],"starsCount":2},"github":{"starsCount":22,"forksCount":4,"subscribersCount":4,"issues":{"count":19,"openCount":1,"distribution":{"3600":9,"10800":0,"32400":1,"97200":1,"291600":0,"874800":0,"2624400":1,"7873200":4,"23619600":0,"70858800":3,"212576400":0},"isDisabled":false},"contributors":[{"username":"grantholle","commitsCount":53},{"username":"ValentinMumble","commitsCount":1},{"username":"ChrisAlderson","commitsCount":13},{"username":"f-hj","commitsCount":1},{"username":"dependabot[bot]","commitsCount":5}],"commits":[{"from":"2022-06-18T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2022-05-26T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2022-03-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2021-12-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":2},{"from":"2021-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":2}]},"source":{"files":{"readmeSize":3798,"testsSize":3256,"hasNpmIgnore":true},"badges":[{"urls":{"original":"https://img.shields.io/npm/dw/rarbg.svg?style=for-the-badge","shields":"https://img.shields.io/npm/dw/rarbg.svg","content":"https://img.shields.io/npm/dw/rarbg.json"},"info":{"service":"npm","type":"downloads","modifiers":{"type":"dw"}}}],"linters":["standard"]}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.6,"health":1,"branding":0.15},"popularity":{"communityInterest":37,"downloadsCount":103.33333333333333,"downloadsAcceleration":0.011415525114155223,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":0.9}},"score":{"final":0.65115033189272,"detail":{"quality":0.9224253195868369,"popularity":0.06987286245439607,"maintenance":0.9999063833075152}}}