Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ejnshtein/nyaasi-api
Unofficial Nyaa.si API for Node.js
https://github.com/ejnshtein/nyaasi-api
nyaa nyaa-si
Last synced: 2 months ago
JSON representation
Unofficial Nyaa.si API for Node.js
- Host: GitHub
- URL: https://github.com/ejnshtein/nyaasi-api
- Owner: ejnshtein
- License: mit
- Created: 2020-02-23T17:17:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T06:10:06.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T13:40:44.315Z (3 months ago)
- Topics: nyaa, nyaa-si
- Language: TypeScript
- Homepage: https://ejnshtein.github.io/nyaasi-api/
- Size: 1.01 MB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# @ejnshtein/nyaasi
[![NPM Version](https://img.shields.io/npm/v/@ejnshtein/nyaasi.svg?style=flat-square)](https://www.npmjs.com/package/@ejnshtein/nyaasi)
[![npm downloads](https://img.shields.io/npm/dm/@ejnshtein/nyaasi.svg?style=flat-square)](http://npm-stat.com/charts.html?package=@ejnshtein/nyaasi)
[![License](https://img.shields.io/npm/l/@ejnshtein/nyaasi?style=flat-square)](https://github.com/ejnshtein/nyaasi)
[![codecov](https://codecov.io/gh/ejnshtein/nyaasi-api/branch/master/graph/badge.svg)](https://codecov.io/gh/ejnshtein/nyaasi-api)This is unofficial [Nyaa.si](https://nyaa.si) website api wrapper.
## Installation
```bash
npm i @ejnshtein/nyaasi# or
yarn add @ejnshtein/nyaasi
```## Example
```js
const { Nyaa } = require('@ejnshtein/nyaasi')Nyaa.search({
title: 'Kotonoha no Niwa',
category: '1_2'
}).then(result => {
console.log(`Found ${result.torrents.length} torrents.`)
})Nyaa.getTorrentAnonymous(890127)
.then(torrent => {
console.log(`Torrent is made by ${torrent.submitter.name}`)
console.log(`Stats: ${torrent.stats.seeders} seeders, ${torrent.stats.leechers} leechers and ${torrent.stats.downloaded} downloads.`)
console.log(`Magnet link: ${torrent.links.magnet}`)
})```
## API
API section is available on the [website](https://ejnshtein.github.io/nyaasi-api/).
---
## Contact
[My telegram](https://t.me/ejnshtein) and a [group](https://t.me/nyaasi_chat) where you can ask your questions or suggest something.