Taki is a simple MAL API wrapper made for Kumiko as none of the API wrappers I found were neither as fast, or as streamlined as I would have liked them. This is my first interaction with node's Fetch API, json querying, jest, environment variables, and propper workflow Actions. With all of that listed, I don't know what I don't know and if there's any improvements as I develop this wrapper, please say so!
This is incredibly simple, all you have to do is head here. Inline with the section heading "Clients Accessing the MAL API", click the "Create ID" button. Once the required information has been filled out, all there is to do is agree to the license and click submit!
Now to find your Client ID, again under the section header "Clients Accessing the MAL API", click "Edit" and your Client ID will be listed there for you to copy and do whatever you will with it.
A more detailed post can be found here.
Since I am not yet done, if you would like to install it, you will have to do so manually
- Download the latest release
- Run:
npm install [your-file-location]/taki-{version}.tgz
- Example:
npm install ../../downloads/myfolder/taki-0.1.0.tgz
- Example:
Remeber, When interacting with anime data, you MUST set your client key!
We will also assume that this call to the constructor exists in all of the rest of the provided examples.
const Taki = require('../taki/index.js');
require("dotenv").config();
// Honestly you could just copy/paste it lol
new Taki(process.env.CLIENT_KEY);
Returns an Anime Info Data Model
/**
* Gets anime info of a provided ID or from a full-length MAL URL
* @param {string|number} param - Anime ID or MAL webpage URL
* @param {string} [fields] - Optional argument that if specified, by default will return
* `{id, title, main_picture}`, but if not, returns ALL avaliable fields
* @returns {Promise} Anime Info Model Json Object
*/
Returns an array of the Anime Info Data Models
/**
* Searches for an anime on a best-match case
* @param {string} animeName
* @param {number} [limit=10] limitvalue
* @returns {Promise} Array of the Anime Info Model Json Data Object
*/
Returns an Anime Ranking Model
/**
* Get the current top anime
* @param {string} [rankingType='all'] rankingType
* @param {number} [limit=10] limit
* @returns {Promise} Anime Ranking Json Data Object
*/
Returns an Anime Season Data Models
/**
* Gets Anime from a specified season and year
* @param {string} season
* @param {number} year
* @param {number} [limit=10] limit
* @returns {Promise} Anime Season Model Json Data Object
*/
Returns a Manga Info Model
/**
* Gets manga info of a provided ID or from a full-length MAL URL
* @param {string|number} param - Manga ID or MAL webpage URL
* @param {string} [fields] - Optional argument that if specified, by default will return
* `{id, title, main_picture}`, but if not, returns ALL avaliable fields
* @returns {Promise} Manga Info Model Json Data Object
*/
Returns an array of the Manga Info Model
/**
* Searches for a manga on a best-match case
* @param {string} mangaName
* @param {number} [limit=10] limit
* @returns {Promise} Array of the Manga Info Model Json Data Object
*/
Returns a Manga Ranking Model
/**
* Get the current top manga
* @param {string} [rankingType='all'] rankingType
* @param {number} [limit=10] limit
* @returns {Promise} Manga Ranking Json Data Object
*/
Returns a User's Anime List Model
/**
* Retrieves a user's watched anime list
* @param {string} user
* @param {number} [limit=10] limit
* @param {string} [status='watching'] status
* @param {string} [sort='list_score'] sort
* @returns {Promise} User Anime List Json Data Object
*/
Returns a User's Manga List Model
/**
* Retrieves a user's read manga list
* @param {string} user
* @returns {Promise} User Manga List Json Data Object
*/
To view a specific data model on the MAL API page, under "Responses", selecting "200 OK" to open the drop down, we can find all of the the accessable data provided by the default queries.
MIT License
Copyright (c) 2023 Akross