MyAnimeList operation catalog
Every public MyAnimeList operation is REST, so the catalog is a single page: the operations below are grouped by response domain.
Anime
mal.anime.get
MyAnimeListAnimeApi.get gets one anime by its MyAnimeList ID through MalAnimeOperation.get. It is the public facade for the GET /anime/{id} endpoint; use MalRequestOptions.fields to select the response shape and MalRequestOptions transport settings to override per call.
Signature
get(id: number, options?: MalRequestOptions): Promise<MalAnime>Auth: Not required for public anime data; pass an access token for list-related fields.
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | The MyAnimeList anime ID. |
options | MalRequestOptions | no | Optional field selection and transport settings; merged over the instance defaults. |
fields | string | readonly string[] | no | Comma-separated MAL field selector, or the same selector as an array. Shapes the response. |
timeout | number | no | Milliseconds before the request is aborted. `0` disables. |
signal | AbortSignal | no | Signal used to cancel the in-flight request. |
| Field | Type | Description |
|---|---|---|
id | number | The MyAnimeList numeric identifier. |
title | string | The canonical MyAnimeList title. |
main_picture | MalPicture | Optional image variants requested through the `fields` query parameter. |
AniLinkApiError— non-success MyAnimeList responseAniLinkNetworkError— timeout, cancellation, or other transport failure
Example
import { AniLink } from "anilink-api-wrapper";
const aniLink = new AniLink({ mal: { accessToken: "mal-token" } });
const anime = await aniLink.mal.anime.get(21, {
fields: ["id", "title", "main_picture", "synopsis"],
});
console.log(anime.title);User
mal.user.me
MyAnimeListUserApi.me gets the currently authenticated MyAnimeList user through MalUserOperation.me. It is the public facade for GET /users/@me and requires a MAL access token from MalCredentials.accessToken via buildMyAnimeListApi; use MalRequestOptions.fields to select the response shape.
Signature
me(options?: MalRequestOptions): Promise<MalUser>Auth: Required — MAL OAuth2 access token (`mal.accessToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
options | MalRequestOptions | no | Optional field selection and transport settings; merged over the instance defaults. |
fields | string | readonly string[] | no | Comma-separated MAL field selector, or the same selector as an array. Shapes the response. |
timeout | number | no | Milliseconds before the request is aborted. `0` disables. |
signal | AbortSignal | no | Signal used to cancel the in-flight request. |
| Field | Type | Description |
|---|---|---|
id | number | The MyAnimeList numeric user identifier. |
name | string | The user's MyAnimeList name. |
location | string | Optional profile location. |
joined_at | string | Optional account creation timestamp. |
AniLinkAuthError— no MAL access token is configuredAniLinkApiError— non-success MyAnimeList responseAniLinkNetworkError— timeout, cancellation, or other transport failure
Example
import { AniLink } from "anilink-api-wrapper";
const aniLink = new AniLink({ mal: { accessToken: "mal-token" } });
const user = await aniLink.mal.user.me({
fields: ["id", "name", "location", "joined_at"],
});
console.log(user.name);