Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

malapi

roflmuffin320MIT0.0.3

Node MyAnimeList API

myanimelist, anime, my, anime, list, scraper, information

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);
});