Socket
Socket
Sign inDemoInstall

myanimelist-api-wrapper

Package Overview
Dependencies
8
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    myanimelist-api-wrapper

A simple wrapper around the MAL API hosted on npm.


Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Install size
727 kB
Created
Weekly downloads
 

Readme

Source

myanimelist-api-list

This is a simple wrapper around the myanimelist API hosted on npm. This library can be used in browsers or node.

Note: It's structured like exactly like the myanimelist API reference, so always refer to it if you have an error. Also, this is under active development, so if there any bugs please email me, or fix it.

Extra Information: There are four types of bundles umd('myanimelist-api-list'), amd('myanimelist-api-list/dist/bundle_amd.js'), iife('myanimelist-api-list/dist/bundle_iife.js'), and es('myanimelist-api-list/dist/bundle_es.js'). By default it uses umd.

Resources:

Table of Contents

Installation

yarn add myanimelist-api-wrapper

Node.js Initialization

const MAL = require("myanimelist-api-wrapper");

Usage

const anime = MAL().anime;
const user_animelist = MAL().user_animelist;
const forum = MAL().forum;
const manga = MAL().manga;
const user_mangalist = MAL().mangalist;
const user = MAL().user;

anime({
  client_id: "insert client_id here",
  q: "one",
  limit: 4,
})
  .anime_list()()
  .then((data) => console.log(data));

user_animelist({
  auth_token: "insert auth_token here",
  anime_id: 17074,
  score: 10,
})
  .update_animelist()()
  .then((data) => console.log(data));

forum({
  client_id: "insert client_id here",
})
  .forum_boards()()
  .then((data) => console.log(data));

manga({
  client_id: "insert client_id here",
  q: "one",
})
  .manga_list()()
  .then((data) => console.log(data));

user_mangalist({
  auth_token: "insert auth_token here",
  manga_id: 208,
})
  .update_mangalist()()
  .then((data) => console.log(data));

user({
  user_id: "@me",
  auth_token: "insert auth_token here",
})
  .get_information()()
  .then((data) => console.log(data));

Anime

anime({
  client_id!: string,
  q!: string,
  limit?: int,
  offset?: int,
  fields?: string,
})
  .animelist()() => Promise<any>

anime({
  client_id!: string,
  anime_id!: int,
  fields?: string,
})
  .anime_details()() => Promise<any>

anime({
  client_id!: string,
  ranking_type!: string,
  limit?: int,
  offset?: int,
  fields?: string
})
  .anime_ranking()() => Promise<any>

anime({
  client_id!: string,
  year!: int,
  season!: string,
  sort?: string,
  limit?: int,
  offset?: int,
  fields?: string
})
  .seasonal_anime()() => Promise<any>

anime({
  auth_token!: string,
  limit?: int,
  offset?: int,
  fields?: string
})
  .suggested_anime()()

User_animelist

user_animelist({
  auth_token!: string,
  anime_id!: int,
  status?: string,
  is_rewatching?: boolean,
  score?: int,
  num_watched_episodes?: int,
  priority?: int,
  num_times_rewatched?: int,
  rewatch_value?: int,
  tags?: string,
  comments?: string
})
  .update_animelist()() => Promise<any>

user_animelist({
  auth_token!: string,
  anime_id!: string,
})
  .delete_anime_item()() => Promise<any>

user_animelist({
  client_id!: string,
  user_name!: int,
  auth_token?(unless user_name=@me): string,
  sort?: string,
  limit?: int,
  offset?: int,
})
  .get_animelist()()

Forum

forum({
  client_id!: string,
}).forum_boards()() => Promise<any>

forum({
  client_id!: string,
  topic_id!: int,
  limit?: int,
  offset?: int,
}).forum_topic_detail()() => Promise<any>

forum({
  client_id!: string,
  board_id?: int,
  subboarrd_id?: int,
  limit?: int,
  offset?: int,
  sort?: string,
  q?: string,
  topic_user_name?: string,
  user_name?: string,
}).forum_topics()() => Promise<any>

Manga

manga({
  client_id!: string,
  q!: string,
  limit?: int,
  offset?: int,
  fields?: string,
}).manga_list()() => Promise<any>

manga({
  client_id!: string,
  manga_id!: int,
  fields?: string,
}).manga_details()() => Promise<any>

manga({
  client_id!: string,
  ranking_type!: string,
  limit?: int,
  offset?: int,
  fields?: string
}).manga_ranking()() => Promise<any>

User_mangalist

user_mangalist({
  auth_token!: string,
  manga_id!: int,
  status?: string,
  is_rereading?: boolean,
  score?: int,
  num_volumes_read?: int,
  num_chapters_read?: int,
  priority?: int,
  num_times_reread?: int,
  reread_value?: int,
  tags?: string,
  comments?: string
}).update_mangalist()() => Promise<any>

user_mangalist({
  auth_token!: string,
  manga_id!: string,
}).delete_manga_item()() => Promise<any>

user_mangalist({
  client_id!: string,
  user_name!: int,
  auth_token?(unless user_name=@me): string,
  sort?: string,
  limit?: int,
  offset?: int,
})
  .get_mangalist()() => Promise<any>

User

user({
  auth_token!: string,
  user_id!: "@me",
  fields?: string,
}).get_information()() => Promise<any>

Contact

Keywords

FAQs

Last updated on 07 Dec 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc