AniLink - v3.1.0
    Preparing search index...

    Interface MyAnimeListUserApi

    MyAnimeListUserApi is the user group exposed by MyAnimeListApi under aniLink.mal.user.

    It is the facade boundary for the MyAnimeList user reads. me delegates to MalUserOperation and returns a MalUser shaped by MalRequestOptions.fields. The paginated user-list reads animeList and mangaList cover GET /users/{user_name}/animelist and GET /users/{user_name}/mangalist.

    interface MyAnimeListUserApi {
        animeList: (
            params: MalUserAnimeListParams,
            options?: MalRequestOptions,
        ) => Promise<MalUserAnimeListResponse>;
        get: (
            params: MalUserGetParams,
            options?: MalRequestOptions,
        ) => Promise<MalUser>;
        mangaList: (
            params: MalUserMangaListParams,
            options?: MalRequestOptions,
        ) => Promise<MalUserMangaListResponse>;
        me: (options?: MalRequestOptions) => Promise<MalUser>;
    }
    Index
    animeList: (
        params: MalUserAnimeListParams,
        options?: MalRequestOptions,
    ) => Promise<MalUserAnimeListResponse>

    MyAnimeListUserApi.animeList gets a user's anime list through MalUserOperation.animeList.

    It is the public facade for GET /users/{user_name}/animelist; username accepts a user name or @me. A public list needs only MalCredentials.clientId (or an access token), since MAL rejects unauthenticated requests. @me and private lists need an access token (a client ID alone cannot resolve @me). The @me check is case-insensitive and ignores surrounding whitespace. Use MalUserAnimeListParams to filter by status, sort, and page with limit/offset.

    Type Declaration

    AniLinkAuthError when username is @me and no access token is configured.

    AniLinkValidationError when username is empty or only whitespace.

    AniLinkRestError for a non-success MyAnimeList response.

    AniLinkNetworkError for timeout, cancellation, or other transport failures.

    const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
    const list = await api.user.animeList(
    { username: "@me", status: "watching" },
    { fields: ["id", "title", "list_status"] }
    );
    console.log(list.data[0]?.node.title);
    get: (params: MalUserGetParams, options?: MalRequestOptions) => Promise<MalUser>

    MyAnimeListUserApi.get gets a MyAnimeList user profile through MalUserOperation.get.

    It is the public facade for GET /users/{user_name}. MyAnimeList documents only @me for this endpoint. Other usernames are passed through, but MyAnimeList currently answers them with 404. Every request requires an access token. Use MalRequestOptions.fields to select the response shape.

    Type Declaration

    AniLinkAuthError when no access token is configured.

    AniLinkValidationError when username is empty or only whitespace.

    AniLinkRestError for a non-success MyAnimeList response.

    AniLinkNetworkError for timeout, cancellation, or other transport failures.

    const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
    const user = await api.user.get(
    { username: "@me" },
    { fields: ["id", "name", "location"] }
    );
    console.log(user.name);
    mangaList: (
        params: MalUserMangaListParams,
        options?: MalRequestOptions,
    ) => Promise<MalUserMangaListResponse>

    MyAnimeListUserApi.mangaList gets a user's manga list through MalUserOperation.mangaList.

    It is the public facade for GET /users/{user_name}/mangalist; username accepts a user name or @me. A public list needs only MalCredentials.clientId (or an access token), since MAL rejects unauthenticated requests. @me and private lists need an access token (a client ID alone cannot resolve @me). The @me check is case-insensitive and ignores surrounding whitespace. Use MalUserMangaListParams to filter by status, sort, and page with limit/offset.

    Type Declaration

    AniLinkAuthError when username is @me and no access token is configured.

    AniLinkValidationError when username is empty or only whitespace.

    AniLinkRestError for a non-success MyAnimeList response.

    AniLinkNetworkError for timeout, cancellation, or other transport failures.

    const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
    const list = await api.user.mangaList(
    { username: "@me", status: "reading" },
    { fields: ["id", "title", "list_status"] }
    );
    console.log(list.data[0]?.node.title);
    me: (options?: MalRequestOptions) => Promise<MalUser>

    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.

    Type Declaration

    AniLinkAuthError when no MAL access token is configured.

    AniLinkRestError for a non-success MyAnimeList response.

    AniLinkNetworkError for timeout, cancellation, or other transport failures.

    const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
    const user = await api.user.me({ fields: ["id", "name"] });