Skip to content

RPDJF/Jikan.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jikan.js Banner

Jikan.js - Unofficial Jikan API Wrapper for Deno 🚀

Development Status Test Status

Deno badge TypeScript badge

Jikan.js is a simple, efficient, and easy-to-use library for interacting with the Jikan API — a RESTful API that brings MyAnimeList data to your fingertips!

Built with ❤️ in TypeScript, Jikan.js is designed for Deno and comes with powerful features like rate-limiting, caching, and self-hosted API support. Whether you're building the next anime tracker or just want to fetch your favorite characters, Jikan.js has you covered!

⚠️ Heads up! This library is still a work in progress. The first release is coming soon, but you're welcome to follow along and share your feedback! 🙌


✨ Why Jikan.js?

  1. Unleash the Power of MyAnimeList: Fetch anime, manga, characters, and more with ease!
  2. No More Rate-Limit Headaches: Built-in queue system to keep things smooth.
  3. Cache It Like a Pro: Cache responses to save time and bandwidth.
  4. Fully Typed: Enjoy TypeScript's sweet autocompletion and safety.
  5. Customizable: Use the official Jikan API or your self-hosted version.

🌟 Features (So Far...)

  • ✅ Fetch data effortlessly from the Jikan API.
  • ✅ Queue system to handle rate limits like a champ.
  • ✅ Interfaced responses for clean and easy data handling.
  • 🔄 Cache system to store responses for reuse (implemented but need testing).
  • ✅ Support for self-hosted Jikan API setups.

💡 Coming Soon:

  • Full Jikan API v4 support, NodeJS support (or alternative repo), automatic retries, and more!

🚧 Roadmap to Awesomeness 🗺️

Feature Status Will be in first stable release?
Stable release 🔄 In Progress Obviously 🥲
Full documentation 🔄 In Progress
Queue system to prevent rate limiting ✅ Complete
Interfaced responses for easy access to data ✅ Complete
Cache system to store responses for a certain amount of time 🟡 Need testing
Support for self-hosted Jikan API ✅ Complete
Support for authenticated requests ❌ Not Started
Support for request retries (not part of stable) ❌ Not Started
Full support for Jikan API v4
Sub-feature Status
Anime ✅ Complete
Characters ✅ Complete
Clubs ❌ Not Started
Genres ❌ Not Started
Magazines ❌ Not Started
Manga ✅ Complete
People ❌ Not Started
Producers ❌ Not Started
Random 🔄 In Progress
Recommendations ❌ Not Started
Reviews ❌ Not Started
Schedules ❌ Not Started
Users ❌ Not Started
Seasons ❌ Not Started
Top ❌ Not Started
Watch ❌ Not Started
🔄 In Progress

🚀 Getting Started

🛠️ Importing the Library

Note: This library isn’t on the Deno registry yet. Stay tuned for updates!

To try it out now:

import { JikanClient } from "https://raw.githubusercontent.com/RPDJF/Jikan.js/refs/heads/main/src/mod.ts";

🎯 Example Usage

Have a look at JikanClient facade methods

Here is an example of how you can use the library to fetch data from the Jikan API:

const client = new JikanClient();

client.getCharacter(1).then((character) => {
  console.log(character.name);
});

The library will fully support Jikan API v4, meaning you can make the same queries as you would on the official Jikan API:

client.getMangas({
	page: 5,
	limit: 5,
	order_by: "popularity",
	sort: "desc",
}).then((mangas) => {
	console.log(mangas);
});

Pro Tip: The client requests may throw errors, so it’s a good idea to wrap them in a try-catch block:

try {
  const character = await client.getCharacter(1);
  console.log(character.name);
} catch (error) {
  console.error(error);
}

🌐 Self-Hosted Jikan API

const client = new JikanClient({
  host: "https://my-jikan-api.com",
  baseUri: "/v4",
});

⚙️ DEBUG Mode

You can enable debug mode to see detailed logs: Linux/MacOS:

export DEBUG=true

Windows:

set DEBUG=true

Then simply run your program as usual.

💬 What is Jikan API?

Jikan API is an unofficial MyAnimeList API that scrapes MAL data. It provides information on anime, manga, characters, schedules, and more!

Why Jikan over MAL’s official API?

  • More features (e.g., character & staff info).
  • No weird rate limit mysteries.
  • Community-driven goodness.

🌌 Why Deno?

Deno is secure, fast, and modern — the perfect playground for this library! Plus, it’s a refreshing break from Node.js. 🦕


🛤️ What’s Next?

I’m just getting started! Stay tuned for more features and a polished first release. Want to contribute or share ideas? Open an issue or fork the repo — I’d love to learn from you! 😊


📜 License

This project is licensed under the MIT License. Use it, share it, and don’t forget to give a ⭐ if you like it!


Let’s build something awesome together!

About

Unofficial Jikan API Wrapper for Deno

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published