A typed TypeScript wrapper for the AniList GraphQL API and the MyAnimeList REST API. One class, two isolated provider surfaces, normalized errors, retries, and a generated operation reference.
npm install anilink-api-wrapper
import { AniLink } from "anilink-api-wrapper";
// AniList (GraphQL) — public queries need no token
const aniLink = new AniLink();
const anime = await aniLink.anilist.query.media({ id: 21, type: "ANIME" });
// MyAnimeList (REST) — isolated credential slot
const client = new AniLink({ mal: { accessToken: "mal-token" } });
const malAnime = await client.mal.anime.get(21, { fields: ["id", "title", "main_picture"] });
| Provider | Namespace | Capabilities |
|---|---|---|
| AniList | aniLink.anilist |
Queries, page queries, mutations, pagination helpers, custom(), data helpers |
| MyAnimeList | aniLink.mal |
anime.get and user.me REST reads with field selection |
Both surfaces share one transport layer (timeouts, retries, pacing, circuit breaker, hooks) while keeping credentials and transport settings isolated per provider slot.
| Surface | Start here |
|---|---|
| Guides | Introduction · Getting started · Provider configuration · Per-request options · Error handling · Retries & resilience · Cancellation & timeouts · Observability · Recipes · TypeScript patterns · Troubleshooting |
| AniList guides | Authentication · Client configuration · Querying · Page queries · Pagination · Mutations · Custom queries · Helpers |
| MAL guides | Authentication · Client configuration · Operations |
| Operation reference | Overview · AniList catalog · MAL catalog |
| API reference (TypeDoc) | AniLink — full generated reference at the docs root |
npm install # install dependencies
npm run check # typecheck, lint, tests, format, JSDoc, api-compare, build
npm run docs:generate # TypeDoc + operation reference + guides site into docs/
npm run docs:dev # serve the guides site locally
See the contributing guide for workflow details.