1.1.0 • Published 3 years ago
anilist-js v1.1.0
Table of Contents
Projects Using anilist-js
- MrScopes/AniSearch -> DISCORD BOT for fetching anime information.
- MrScopes/anime-api -> WEBSITE for testing anilist-js.
Documentation
Types
- anime
- manga
- character
get(type: String, id: Integer)
:
AniList.get('anime', 21).then(media => {
console.log(media);
// logs a HUGE amount of info on One Piece
});
console.log(await AniList.get('character', 17));
// logs information on Naruto Uzumaki
search(type: String, variables: {})
:
AniList.search('anime', { search: 'One Piece', perPage: 5, sort: 'SCORE', format: 'OVA' }).then(media => {
console.log(media);
// logs small bits of information on 3 most popular One Piece OVAs
});
console.log(await AniList.search('character', { search: 'Naruto', perPage: 3 }));
// logs basic information on 3 most popular characters with a name containing 'Naruto'
view the variables on the API Reference