malapi
v0.0.3
Published
Node MyAnimeList API
Downloads
247
Maintainers
Readme
Node MyAnimeList API
This module wraps the official MyAnimeList.net API and also makes use of scraping to retrieve additional information not generally available through the (limited!) official API.
Install
npm install malapi
Examples
Retrieve anime information by MAL Id
var Anime = require('malapi').Anime;
Anime.fromId(28891).then(anime => {
console.log(anime);
});
Retrieve anime information by Url
var Anime = require('malapi').Anime;
Anime.fromUrl('http://myanimelist.net/anime/28891/Haikyuu_Second_Season')
.then(anime => {
console.log(anime);
});
Retrieve anime information by Name
var Anime = require('malapi').Anime;
Anime.fromName('Haikyuu!! Second Season').then(anime => {
console.log(anime);
});
Get episode list of anime
let haikyuu = ...
haikyuu.getEpisodes().then(episodes => {
console.log(episodes);
});
Get episode information (includes synopsis)
let firstEp = episodes[0];
firstEp.getInformation().then(episode => {
console.log(episode.synopsis);
});