Simplify your integration with the AniList API, a comprehensive database for anime and manga. This robust and type-safe TypeScript wrapper provides an intuitive way to access various AniList functionalities, making it easier than ever to build amazing applications related to anime and manga.
- ✨ Key Features
- 🚀 Quick Start
- 📦 Installation
- 🛠️ Usage
- 🔑 Authentication
- ⚙️ Functionality
- 🤝 Contributing
- 📜 License
- 💖 Support
- Type-Safe TypeScript: Enjoy the benefits of static typing and improved developer experience.
- Comprehensive Coverage: Access a wide range of AniList API endpoints, including anime, manga, characters, staff, user lists, and more.
- Simplified Requests: Abstract away the complexities of making raw HTTP requests to the AniList GraphQL API.
- Modular Design: Well-organized services for different aspects of the AniList API.
- Easy Authentication: Simple integration with AniList's authentication mechanism.
Get up and running with the AniList API Wrapper in minutes!
- Install the package:
# npm
npm install @tdanks2000/anilist-wrapper
# yarn
yarn install @tdanks2000/anilist-wrapper
# pnpm
pnpm install @tdanks2000/anilist-wrapper
# bun
bun install @tdanks2000/anilist-wrapper
- Import and initialize:
import { Anilist } from "@tdanks2000/anilist-wrapper";
// For public endpoints
const anilist = new Anilist();
// OR for authenticated endpoints
const anilist = new Anilist("YOUR_ACCESS_TOKEN");
- Start making API calls:
const data = await anilist.anime.getAnimeById(1);
console.log(data);
To integrate the AniList TypeScript Wrapper into your project, use one of the following package managers:
# npm
npm install @tdanks2000/anilist-wrapper
# yarn
yarn install @tdanks2000/anilist-wrapper
# pnpm
pnpm install @tdanks2000/anilist-wrapper
# bun
bun install @tdanks2000/anilist-wrapper
Learn how to use the AniList TypeScript Wrapper in your TypeScript project.
Import the Anilist
class from the package:
import { Anilist } from "@tdanks2000/anilist-wrapper";
Create an instance of the Anilist
class. You can optionally provide an access token for authenticated requests:
// For accessing public endpoints
const anilist = new Anilist();
// For accessing authenticated endpoints (requires an access token)
const anilistWithToken = new Anilist("YOUR_ACCESS_TOKEN");
The anilist
object provides access to various services, each dedicated to a specific area of the AniList API. Here's a basic example of fetching anime details:
const data = await anilist.anime.getAnimeById(1);
console.log(data);
Refer to the Functionality section for a list of available services and their purpose. Consult the individual service files or generated documentation for specific methods and parameters.
Some features of the AniList API require authentication. To authenticate, you need to obtain an OAuth access token from the AniList website. Follow their official documentation for instructions on how to generate an access token.
Once you have your access token, you can provide it when creating an instance of the Anilist
class:
const anilist = new Anilist("YOUR_ACCESS_TOKEN");
This will enable you to access authenticated endpoints and perform actions on behalf of a user.
The AniList API Wrapper organizes its functionality into the following services:
Provides methods for accessing anime-related information, such as:
- Fetching details about a specific anime.
- Retrieving characters and staff associated with an anime.
- Getting recommendations for similar anime.
- Exploring related anime entries.
Allows you to retrieve information about specific anime and manga characters.
Offers methods for accessing manga-related information, similar to the Anime Service, including details, characters, staff, and recommendations.
Provides general functions for searching and retrieving information about both anime and manga (media). This might include broader search capabilities or combined results.
Enables you to manage a user's anime and manga lists, including adding, updating, and retrieving entries. This requires authentication.
Allows you to retrieve information about staff members involved in the production of anime and manga (e.g., voice actors, directors, writers).
Provides access to user profiles, statistics, and their anime and manga lists. Many of these endpoints require authentication.
We welcome contributions to the AniList TypeScript Wrapper! If you have any bug reports, feature requests, or would like to contribute code, please follow the guidelines outlined in the repository's CONTRIBUTING.md
file.
The AniList TypeScript Wrapper is open-source and licensed under the MIT License. Feel free to use, modify, and distribute this library according to the terms of the license.
Thank you for using the AniList API Wrapper! If you encounter any issues or have questions, please don't hesitate to:
- Open an issue on the GitHub repository.