New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-myanimelist

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-myanimelist

Node.js wrappers for MAL.

latest
Source
npmnpm
Version
4.1.2
Version published
Weekly downloads
58
-15.94%
Maintainers
1
Weekly downloads
 
Created
Source

NodeMal API Banner

Node-MyAnimeList

Node-MyAnimeList is a small promise based package for downloading information from MyAnimeList. Node-MyAnimeList is using Jikan.moe API and flew methods created by me specially for this package

Intellisens Support (Typescript)

Gif

Instalation

NPM

npm i node-myanimelist

Import

const { Mal, Jikan } = require("node-myanimelist");
// Or
import { Mal, Jikan } from 'node-myanimelist';

MalAPI Example

const auth = Mal.auth("6114d00ca681b7701d1e15fe11a4987e" /* app_id */ );

// Unoffical way to login (not recomended)
const acount = await auth.Unstable.login("username","password");

// Offical way to login (recomended)
// import pkceChallenge from "pkce-challenge";
// const pkce = pkceChallenge();

const url = auth.getOAuthUrl(pkce.code_challenge)
// Open returned url, accept oauth and use returned code to authorize
const acount = await auth.authorizeWithCode(code,pkce.code_challenge);

let search = await acount.manga.search(
   "Sakurasou",
   Mal.Manga.fields()
      .alternativeTitles()
      .startDate()
      .endDate()
      .synopsis()
      .mean()
      .rank()
      .popularity()
      .numListUsers()
      .numScoringUsers()
      .nsfw()
      .genres()
      .createdAt()
      .updatedAt()
      .mediaType()
      .status()
      .myListStatus(
         Mal.Manga.listStatusFields()
            .startDate()
            .finishDate()
            .priority()
            .numTimesReread()
            .rereadValue()
            .tags()
            .comments()
      )
      .numVolumes()
      .numChapters()
      .authors()
).call();

// Alternative if you don't care about choosing fields
let searchIDC = await acount.manga.search(
   "Sakurasou",
   Mal.Manga.fields().all()
).call();

List of functions

For more detalis visit doc

Keywords

MAL

FAQs

Package last updated on 20 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts