0.0.3 • Published 7 years ago

malapi v0.0.3

Weekly downloads
473
License
MIT
Repository
github
Last release
7 years ago

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