Skip to content

Nyaa.si

Kylart edited this page Oct 21, 2017 · 12 revisions

Available methods

Import

const {si} = require('nyaapi')

[si] methods:

search

prototype

si.search(term, n = null, opts = {})

Usage

There are two ways of using this method.

  • 3 arguments
si.search('HorribleSubs', 20, {
  order: true,
  sort: '4'
})
  .then((data) => console.log(data))
  .catch((err) => console.log(err))
  • 1 object argument
si.search({
  term: 'HorribleSubs',
  n: 20,
  order: true,
  sort: '4'
})
  .then((data) => console.log(data))
  .catch((err) => console.log(err))

If no n parameter is given, nyaapi will call the searchAll method with the same term and options.

Clone this wiki locally