-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathexample.js
25 lines (20 loc) · 897 Bytes
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* eslint-disable */
const TorrentIndexer = require("./");
const torrentIndexer = new TorrentIndexer();
(async function() {
// search tv series
const series = await torrentIndexer.search("rick and morty s04e04", "series");
console.log("Series", series[0]); // show first result
// search movies
const movies = await torrentIndexer.search("the dark knight 2008", "movie");
console.log("Movies", movies[0]); // show first result
// search anime
const anime = await torrentIndexer.search("ride your wave", "anime");
console.log("Anime", anime[0]); // show first result
// search music
const music = await torrentIndexer.search("lana del rey", "music");
console.log("Music", music[0]); // show first result
// search other thing in page 2
const torrents = await torrentIndexer.search("ubuntu", null, 2);
console.log("Other", torrents[0]); // show first result
})();