-
Notifications
You must be signed in to change notification settings - Fork 17
Nyaa.si
Kylart edited this page Oct 21, 2017
·
12 revisions
const {si} = require('nyaapi')
[si] methods:
si.search(term, n = null, opts = {})
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
.