Skip to content
墨 AniLink

MyAnimeList forum operations ​

This page lists public MyAnimeList forum operations by response domain.

Forum

mal.forum.boards

MyAnimeListForumApi.boards gets the MyAnimeList forum board tree through MalForumOperation.boards. It is the public facade for GET /forum/boards; use MalRequestOptions transport settings to override per call.

Signature

TypeScript
boards(options?: MalRequestOptions): Promise<MalForumBoardsResponse>

Auth: Not required: a public read.

NameTypeRequiredDescription
optionsMalRequestOptionsnoOptional transport settings; a MalRequestOptions merged over the instance defaults.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
categoriesMalForumCategory[]The forum categories, each carrying its boards.
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const boards = await api.forum.boards();
console.log(boards.categories[0]?.boards[0]?.title);

mal.forum.topics

MyAnimeListForumApi.topics gets the MyAnimeList forum topic list through MalForumOperation.topics. It is the public facade for GET /forum/topics; filter by board, keyword, or creator with MalForumTopicsParams and page with limit/offset.

Signature

TypeScript
topics(params?: MalForumTopicsParams, options?: MalRequestOptions): Promise<MalForumTopicsResponse>

Auth: Not required: a public read.

NameTypeRequiredDescription
paramsMalForumTopicsParamsnoThe topic-list read inputs; a MalForumTopicsParams carrying the optional board, keyword, creator, sort, and paging filters.
  boardIdnumbernoThe board to list topics of, when limiting to one board.
  subboardIdnumbernoThe subboard to list topics of, when limiting to one subboard.
  qstringnoThe keyword to filter topic titles by.
  topicUserNamestringnoThe user name whose created topics to list.
  userNamestringnoThe user name whose posts to list topics by.
  sortMalForumTopicSortnoThe sort order; one of MalForumTopicSort.
  limitnumbernoThe number of entries per page; defaults to 100, capped at 100 by MyAnimeList.
  offsetnumbernoThe offset of the first entry; defaults to 0.
optionsMalRequestOptionsnoOptional transport settings; a MalRequestOptions merged over the instance defaults.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
dataMalForumTopicSummary[]The topic entries on this page.
pagingMalPagingThe paging node with the next/previous page URLs, when the list continues.
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const topics = await api.forum.topics({ q: "one piece" });
console.log(topics.data[0]?.title);

mal.forum.topic

MyAnimeListForumApi.topic gets one forum topic with its posts and poll through MalForumOperation.topic. It is the public facade for GET /forum/topic/{topic_id}; page through a long topic's posts with the limit/offset fields of MalForumTopicParams.

Signature

TypeScript
topic(params: MalForumTopicParams, options?: MalRequestOptions): Promise<MalForumTopicResponse>

Auth: Not required: a public read.

NameTypeRequiredDescription
paramsMalForumTopicParamsyesThe topic read inputs; a MalForumTopicParams carrying the topic ID plus the optional post-paging filters.
  idnumbernoThe MyAnimeList forum topic ID.
  limitnumbernoThe number of posts per page; defaults to 100, capped at 100 by MyAnimeList.
  offsetnumbernoThe offset of the first post; defaults to 0.
optionsMalRequestOptionsnoOptional transport settings; a MalRequestOptions merged over the instance defaults.
  timeoutnumbernoMilliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to DEFAULT_REQUEST_TIMEOUT; timeout errors carry the effective duration as `AniLinkNetworkError.timeoutMs`.
  signalAbortSignalnoSignal used to cancel in-flight requests.
FieldTypeDescription
dataMalForumTopicDetailThe topic's detail: title, posts, and poll.
pagingMalPagingThe paging node with the next/previous post-page URLs, when the topic continues.
  • AniLinkRestError: for a non-success MyAnimeList response
  • AniLinkNetworkError: for timeout, cancellation, or other transport failures

Example

TypeScript
const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
const topic = await api.forum.topic({ id: 23744 });
console.log(topic.data.title, topic.data.posts[0]?.body);

AniLink, typed AniList & MyAnimeList client for TypeScript.