npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chinmei

v1.2.2

Published

Node.js wrapper for MyAnimeList API

Downloads

7

Readme

chinmei npm version Travis CI Build Status

Node.js wrapper for MyAnimeList API

Description

Chinmei is a wrapper for MyAnimeList API. The strong point of Chinmei is the providing of a more accurate search with searchSingleAnime and searchSingleManga than the search method from MAL API.

Table of contents

Install

npm install chinmei

Usage

const Chinmei = require('chinmei');

var myChinmei = new Chinmei(username, password);

More examples are available in examples/.

Methods

User

setUser()

Change the current MyAnimeList user.

getUser()

Get the current user's id and username.

returns Promise<User>

verifyAuth()

Check if the user is valid.

returns Promise

getMalUser()

Get informations about a MyAnimeList user.

| Parameter | Type | Description | Notes | | --------- | ---- | ----------- | ----- | | name | string | Name of the user you are looking for | | | type | int | The type of information you want | 1 = Anime, 2 = Manga (Default to anime) | | status | string | Status of information you are looking for | ? (Default to 'all') |

returns Promise<MalUser>

Search

searchAnimes(name)

Search for animes that correspond more or less.

| Parameter | Type | Description | | --------- | ---- | ----------- | | name | string | Name of the animes you are looking for |

returns Promise<Animes>

searchMangas(name)

Search for mangas that correspond more or less.

| Parameter | Type | Description | | --------- | ---- | ----------- | | name | string | Name of the mangas you are looking for |

returns Promise<Mangas>

searchSingleAnime(name)

Search for a single anime (more accurate than searchAnimes()).

| Parameter | Type | Description | | --------- | ---- | ----------- | | name | string | Name of the anime you are looking for |

returns Promise<Anime>

searchSingleManga(name)

Search for a single manga (more accurate than searchMangas()).

| Parameter | Type | Description | | --------- | ---- | ----------- | | name | string | Name of the manga you are looking for |

returns Promise<Manga>

Anime and Manga

addAnime(anime) & addManga(manga)

Add an anime/manga to the current user's anime/manga list.

| Parameter | Type | Description | | --------- | ---- | ----------- | | anime | object | Anime model | | manga | object | Manga model |

returns Promise containing response body

updateAnime(anime) & updateManga(manga)

Update an anime/manga of the current user's anime/manga list.

| Parameter | Type | Description | | --------- | ---- | ----------- | | anime | object | Anime model | | manga | object | Manga model |

returns Promise containing response body

deleteAnime(id) & deleteManga(id)

Delete an anime/manga of the current user's anime/manga list.

| Parameter | Type | Description | | --------- | ---- | ----------- | | id | int | Id of the anime / manga you want to delete |

returns Promise containing response body

Models

Notes

Even you pass a variable with a wrong type (eg: episode as '0' instead of 0) it will not cause any problem since Chinmei convert each value in the right type before sending them to MyAnimeList !

User model

| Parameter | Type | Description | | --------- | ---- | ----------- | | id | string | Current user's id | | username | string | Current user's username |

Anime model

| Parameter | Type | Description | Notes | | --------- | ---- | ----------- | ----- | | id | int | id of the anime | | | episode | int | Number of episode viewed | | | status | int string | Status of the anime | 1/watching, 2/completed, 3/onhold, 4/dropped, 6/plantowatch | | score | int | Score of the anime | Minimum is 1, maximum is 10 | | storage_type | int | Type of storage you have for this anime | 1 = Hard Drive, 2 = DVD/CD, 3 = None, 4 = Retail DVD, 5 = VHS, 6 = External HD, 7 = NAS, 8 = Blu-ray | | storage_value | float | Value of storage | If storage_type = 1, storage_value will correspond to Total drive space (GB). If storage_type = 8, it will be Total Blu-ray's | | times_rewatched | int | How many time you re-watched this anime | | | rewatch_value | int | Rewatch rating to show how likely it is that you will watch it again | 1 = Very low, 2 = Low, 3 = Medium, 4 = High, 5 = Very high | | date_start | date | When you started watching this anime | Date format doesn't matter, but should at least contain Year, Month and Day | | date_finish | date | When you finished this anime | Date format doesn't matter, but should at least contain Year, Month and Day | | priority | int | Your priority level to watch this anime | 0 = Low, 1 = Medium, 2 = High | | enable_discussion | int | ? | 0 = No, 1 = Yes | | enable_rewatching | int | If you are currently rewatching this anime | 0 = No, 1 = Yes | | comments | string | Comments about this anime | | | tags | string | Tags about this anime | You should separate your tags with commas |

Manga model

| Parameter | Type | Description | Notes | | --------- | ---- | ----------- | ----- | | id | int | id of the manga | | | chapter | int | Number of chapter read | | | volume | int | Number of volume read | | | status | int string | Status of the manga | 1/reading, 2/completed, 3/onhold, 4/dropped, 6/plantoread | | score | int | Score of the manga | Minimum is 1, maximum is 10 | | times_reread | int | How many time you have reread this manga | | | reread_value | int | Reread rating to show how likely it is that you will read it again | 1 = Very low, 2 = Low, 3 = Medium, 4 = High, 5 = Very high | | date_start | date | When you started reading this manga | Date format doesn't matter, but should at least contain Year, Month and Day | | date_finish | date | When you finished this manga | Date format doesn't matter, but should at least contain Year, Month and Day | | priority | int | Your priority level to read this manga | 0 = Low, 1 = Medium, 2 = High | | enable_discussion | int | ? | 0 = No, 1 = Yes | | enable_rereading | int | If you are currently rereading this manga | 0 = No, 1 = Yes | | comments | string | Comments about this manga | | | scan_group | string | ? | | | tags | string | Tags about this manga | You should separate your tags with commas | | retail_volumes | int | How many retail volumes of this manga you have | |