malapi

0.0.3 • Public • Published

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

Package Sidebar

Install

npm i malapi

Weekly Downloads

177

Version

0.0.3

License

MIT

Last publish

Collaborators

  • roflmuffin