AniList mutation operations
The authenticated AniList GraphQL mutation operations, grouped by response domain.
Users
anilist.mutation.updateUser
UpdateUserMutation updates a user on the AniList API.
Signature
updateUser(variables: UpdateUserVariables, options?: RequestOptions): Promise<UpdateUserResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
about | string | no | a string representing the updated about section of the user. |
titleLanguage | UserTitleLanguage | no | a UserTitleLanguage representing the updated title language preference of the user. |
displayAdultContent | boolean | no | a boolean representing the updated preference of the user for displaying adult content. |
airingNotifications | boolean | no | a boolean representing the updated preference of the user for receiving airing notifications. |
scoreFormat | ScoreFormat | no | a ScoreFormat representing the updated score format preference of the user. |
rowOrder | string | no | a string representing the updated row order preference of the user. |
profileColor | string | no | a string representing the updated profile color preference of the user. |
donatorBadge | string | no | a string representing the updated donator badge of the user. |
notificationOptions | NotificationOptions[] | no | an array of NotificationOptions representing the updated notification options of the user. |
timezone | string | no | a string representing the updated timezone of the user. |
activityMergeTime | number | no | a number representing the updated activity merge time of the user. |
animeListOptions | MediaListOptions | no | a MediaListOptions representing the updated anime list options of the user. |
mangaListOptions | MediaListOptions | no | a MediaListOptions representing the updated manga list options of the user. |
staffNameLanguage | UserStaffNameLanguage | no | a UserStaffNameLanguage representing the updated staff name language preference of the user. |
restrictMessagesToFollowing | boolean | no | a boolean representing the updated preference of the user for restricting messages to following. |
disabledListActivity | DisabledListActivity[] | no | an array of DisabledListActivity representing the updated disabled list activity preferences of the user. |
See the TypeDoc page for the full UpdateUserResponse shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.updateUser({
about: 'New about text',
titleLanguage: 'ENGLISH',
displayAdultContent: true,
airingNotifications: true,
scoreFormat: 'POINT_10',
rowOrder: 'title',
profileColor: 'blue',
donatorBadge: 'Supporter',
notificationOptions: [{type: 'AIRING', enabled: true}],
timezone: '-06:00',
activityMergeTime: 30,
animeListOptions: {sectionOrder: ['title'], customLists: ['test'], advancedScoring: [], advancedScoringEnabled: false},
mangaListOptions: {sectionOrder: ['title'], customLists: ['test'], advancedScoring: [], advancedScoringEnabled: false},
staffNameLanguage: 'ROMAJI',
restrictMessagesToFollowing: false,
disabledListActivity: [{type: 'CURRENT', disabled: false}]
});anilist.mutation.toggleFavourite
ToggleFavouriteMutation toggles a favourite on the AniList API.
Signature
toggleFavourite(variables: ToggleFavouriteVariables, options?: RequestOptions): Promise<Favourites>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
animeId | number | yes | a number representing the id of the anime to toggle as a favourite. |
mangaId | number | yes | a number representing the id of the manga to toggle as a favourite. |
characterId | number | yes | a number representing the id of the character to toggle as a favourite. |
staffId | number | yes | a number representing the id of the staff to toggle as a favourite. |
studioId | number | yes | a number representing the id of the studio to toggle as a favourite. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the connection |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the connection |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the connection |
id | number | The id of the character |
full | string | The character's first and last name |
id | number | The id of the character |
full | string | The character's first and last name |
id | number | The id of the connection |
id | number | The id of the staff member |
full | string | The person's first and last name |
id | number | The id of the staff member |
full | string | The person's first and last name |
id | number | The id of the connection |
id | number | The id of the studio |
name | string | The name of the studio |
id | number | The id of the studio |
name | string | The name of the studio |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.toggleFavourite({studioId: 561});anilist.mutation.updateFavouriteOrder
UpdateFavouriteOrderMutation updates the order of favourites on the AniList API.
Signature
updateFavouriteOrder(variables: UpdateFavouriteOrderVariables, options?: RequestOptions): Promise<Favourites>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
animeIds | number[] | yes | an array of numbers representing the ids of the anime to update the order of. |
mangaIds | number[] | yes | an array of numbers representing the ids of the manga to update the order of. |
characterIds | number[] | yes | an array of numbers representing the ids of the characters to update the order of. |
staffIds | number[] | yes | an array of numbers representing the ids of the staff to update the order of. |
studioIds | number[] | yes | an array of numbers representing the ids of the studios to update the order of. |
animeOrder | number[] | yes | an array of numbers representing the order of the anime. |
mangaOrder | number[] | yes | an array of numbers representing the order of the manga. |
characterOrder | number[] | yes | an array of numbers representing the order of the characters. |
staffOrder | number[] | yes | an array of numbers representing the order of the staff. |
studioOrder | number[] | yes | an array of numbers representing the order of the studios. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the connection |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the connection |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the connection |
id | number | The id of the character |
full | string | The character's first and last name |
id | number | The id of the character |
full | string | The character's first and last name |
id | number | The id of the connection |
id | number | The id of the staff member |
full | string | The person's first and last name |
id | number | The id of the staff member |
full | string | The person's first and last name |
id | number | The id of the connection |
id | number | The id of the studio |
name | string | The name of the studio |
id | number | The id of the studio |
name | string | The name of the studio |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.updateFavouriteOrder({
animeIds: [1],
mangaIds: [],
characterIds: [],
staffIds: [],
studioIds: [],
animeOrder: [1],
mangaOrder: [],
characterOrder: [],
staffOrder: [],
studioOrder: [],
});Lists
anilist.mutation.saveMediaListEntry
SaveMediaListEntryMutation saves a media list entry on the AniList API.
Signature
saveMediaListEntry(variables: SaveMediaListEntryVariables, options?: RequestOptions): Promise<MediaListResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | no | a number representing the id of the media list entry. |
mediaId | number | yes | a number representing the id of the media associated with the media list entry. |
status | MediaListStatus | no | a MediaListStatus representing the status of the media list entry. |
score | number | no | a number representing the score of the media list entry. |
scoreRaw | number | no | a number representing the raw score of the media list entry. |
progress | number | no | a number representing the progress of the media list entry. |
progressVolumes | number | no | a number representing the progress volumes of the media list entry. |
repeat | number | no | a number representing the repeat status of the media list entry. |
priority | number | no | a number representing the priority of the media list entry. |
private | boolean | no | a boolean representing the privacy status of the media list entry. |
notes | string | no | a string representing the notes of the media list entry. |
hiddenFromStatusLists | boolean | no | a boolean representing whether the media list entry is hidden from status lists. |
customLists | string[] | no | an array of strings representing the custom lists of the media list entry. |
advancedScores | number[] | no | an array of numbers representing the advanced scores of the media list entry. |
startedAt | FuzzyDateInput | no | a FuzzyDateInput representing when the media list entry started. |
completedAt | FuzzyDateInput | no | a FuzzyDateInput representing when the media list entry was completed. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the list entry |
userId | number | The id of the user owner of the list entry |
mediaId | number | The id of the media |
status | string | The watching/reading status |
score | number | The score of the entry |
progress | number | The amount of episodes/chapters consumed by the user |
progressVolumes | number | The amount of volumes read by the user |
repeat | number | The amount of times the user has rewatched/read the media |
priority | number | Priority of planning |
private | boolean | If the entry should only be visible to authenticated user |
notes | string | Text notes |
hiddenFromStatusLists | boolean | If the entry shown be hidden from non-custom lists |
customLists | string[] | boolean[] | Map of booleans for which custom lists the entry are in |
advancedScores | unknown | Map of advanced scores with name keys |
startedAt | FuzzyDate | When the entry was started by the user |
completedAt | FuzzyDate | When the entry was completed by the user |
updatedAt | number | When the entry data was last updated |
createdAt | number | When the entry data was created |
media | Media | an instance of `Media` representing the media. |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveMediaListEntry({mediaId: 1, status: 'COMPLETED'});anilist.mutation.deleteMediaListEntry
DeleteMediaListEntryMutation deletes a media list entry on the AniList API.
Signature
deleteMediaListEntry(variables: DeleteMediaListEntryVariables, options?: RequestOptions): Promise<DeleteMediaListEntryResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the media list entry ID. |
| Field | Type | Description |
|---|---|---|
deleted | boolean | If an item has been successfully deleted |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
const result = await new DeleteMediaListEntryMutation("your-token").deleteMediaListEntry({ id: 1 });Misc
anilist.mutation.deleteCustomList
DeleteCustomListMutation deletes a custom list on the AniList API. There is no mutation specifically for creating a custom list; create one through UpdateUserMutation under the animeListOptions or mangaListOptions variables.
Signature
deleteCustomList(variables: DeleteCustomListVariables, options?: RequestOptions): Promise<DeleteResult>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
customList | string | yes | a string representing the custom list to delete. |
type | MediaType | yes | a string representing the type of the media. |
See the TypeDoc page for the full DeleteResult shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.deleteCustomList({customList: 'test', type: 'ANIME'});anilist.mutation.toggleFollow
ToggleFollowMutation toggles a follow on the AniList API.
Signature
toggleFollow(variables: ToggleFollowVariables, options?: RequestOptions): Promise<UserResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
userId | number | yes | a number representing the id of the user to follow. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the user |
name | string | The name of the user |
about | string | The bio written by user (Markdown) |
large | string | The avatar of user at its largest size |
medium | string | The avatar of user at medium size |
bannerImage | string | The user's banner images |
isFollowing | boolean | If the authenticated user if following this user |
isFollower | boolean | If this user if following the authenticated user |
isBlocked | boolean | If the user is blocked by the authenticated user |
bans | string[] | List of active bans. Mod-only |
titleLanguage | UserTitleLanguage | The language the user wants to see media titles in |
displayAdultContent | boolean | Whether the user has enabled viewing of 18+ content |
airingNotifications | boolean | Whether the user receives notifications when a show they are watching aires |
profileColor | string | Profile highlight color (blue, purple, pink, orange, red, green, gray) |
type | NotificationType | The type of notification |
enabled | boolean | Whether this type of notification is enabled |
timezone | string | The user's timezone offset (Auth user only) |
activityMergeTime | number | Minutes between activity for them to be merged together. 0 is Never, Above 2 weeks (20160 mins) is Always. |
staffNameLanguage | UserStaffNameLanguage | The language the user wants to see staff and character names in |
restrictMessagesToFollowing | boolean | Whether the user only allow messages from users they follow |
disabled | boolean | a boolean value representing the disabled. |
type | NotificationType | a NotificationType value representing the type. |
scoreFormat | ScoreFormat | The score format the user is using for media lists |
rowOrder | string | The default order list rows should be displayed in |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
sectionOrder | string[] | The order each list should be displayed in |
splitCompletedSectionByFormat | boolean | If the completed sections of the list should be separated by format |
customLists | string[] | The names of the user's custom lists |
advancedScoring | string[] | The names of the user's advanced scoring sections |
advancedScoringEnabled | boolean | If advanced scoring is enabled |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
id | number | The id of the media |
romaji | string | The romanization of the native language title |
english | string | The official english title |
native | string | Official title in it's native language |
userPreferred | string | The currently authenticated users preferred title language. Default romaji for non-authenticated |
characters | unknown[] | Favourite characters |
staff | unknown[] | Favourite staff |
studios | unknown[] | Favourite studios |
statistics | Statistics | The users anime & manga list statistics |
stats | UserStats | The user's statistics |
unreadNotificationCount | number | The number of unread notifications the user has |
siteUrl | string | The url for the user page on the AniList website |
donatorTier | number | The donation tier of the user |
donatorBadge | string | Custom donation badge text |
moderatorRoles | string[] | The user's moderator roles if they are a site moderator |
createdAt | number | When the user's account was created. (Does not exist for accounts created before 2020) |
updatedAt | number | When the user's data was last updated |
name | string | A previous name of the user. |
createdAt | number | When the user first changed from this name. |
updatedAt | number | When the user most recently changed from this name. |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.toggleFollow({userId: 542244});anilist.mutation.rateReview
RateReviewMutation rates a review on the AniList API.
Signature
rateReview(variables: RateReviewVariables, options?: RequestOptions): Promise<ReviewResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
reviewId | number | yes | a number representing the id of the review to rate. |
rating | ReviewRating | yes | a ReviewRating representing the vote to apply to the review. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the review |
mediaId | number | The id of the review's media |
userId | number | The id of the review's creator |
mediaType | string | For which type of media the review is for |
summary | string | A short summary of the review |
body | string | The main review body text |
rating | number | The total user rating of the review |
ratingAmount | number | The amount of user ratings of the review |
score | number | The review score of the media |
private | boolean | If the review is not yet publicly published and is only viewable by creator |
siteUrl | string | The url for the review page on the AniList website |
createdAt | number | The time of the thread creation |
updatedAt | number | The time of the thread last update |
user | BasicUser | The creator of the review |
media | Media | The media the review is of |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.rateReview({reviewId: 8008, rating: 'UP_VOTE'});anilist.mutation.updateAniChartSettings
UpdateAniChartSettingsMutation updates the AniChart settings for a user on the AniList API.
Signature
updateAniChartSettings(variables: UpdateAniChartSettingsVariables, options?: RequestOptions): Promise<string>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
titleLanguage | string | yes | a string representing the language of the title. |
outgoingLinkProvider | string | yes | a string representing the outgoing link provider. |
theme | string | yes | a string representing the theme of the AniChart. |
sort | string | yes | a string representing the sort order of the AniChart. |
See the TypeDoc page for the full string shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.updateAniChartSettings({
titleLanguage: 'romaji',
outgoingLinkProvider: 'ANILIST',
theme: 'dark',
sort: 'POPULARITY',
});anilist.mutation.updateAniChartHighlights
UpdateAniChartHighlightsMutation updates the AniChart highlights for a user on the AniList API.
Signature
updateAniChartHighlights(variables: UpdateAniChartHighlightsVariables, options?: RequestOptions): Promise<string>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
mediaId | number | yes | a number representing the media ID. |
highlight | boolean | yes | a boolean representing the highlight status. |
See the TypeDoc page for the full string shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.updateAniChartHighlights({
highlights: {mediaId: 1, highlight: true},
});Activity
anilist.mutation.saveTextActivity
SaveTextActivityMutation saves a text activity on the AniList API.
Signature
saveTextActivity(variables: SaveTextActivityVariables, options?: RequestOptions): Promise<Activity>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity. |
text | string | no | a string representing the text of the activity. |
locked | boolean | no | a boolean representing whether the activity is locked. |
asHtml | boolean | no | a boolean representing whether the activity text is returned as HTML. |
See the TypeDoc page for the full Activity shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveTextActivity({id: 1, text: 'Hello, world!'});anilist.mutation.saveMessageActivity
SaveMessageActivityMutation saves a message activity on the AniList API.
Signature
saveMessageActivity(variables: SaveMessageActivityVariables, options?: RequestOptions): Promise<Activity>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity. |
message | string | no | a string representing the message. |
recipientId | number | no | a number representing the id of the recipient. |
private | boolean | no | a boolean representing whether the message is private. |
locked | boolean | no | a boolean representing whether the message is locked. |
asMod | boolean | no | a boolean representing whether the activity is saved as a moderator. |
asHtml | boolean | no | a boolean representing whether the description in the return response is in HTML format. |
See the TypeDoc page for the full Activity shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveMessageActivity({id: 1, message: 'Hello, world!'});anilist.mutation.saveListActivity
SaveListActivityMutation saves a list activity on the AniList API. Mod Only
Signature
saveListActivity(variables: SaveListActivityVariables, options?: RequestOptions): Promise<Activity>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the list activity. |
locked | boolean | no | a boolean representing whether the list activity is locked. |
asHtml | boolean | no | a boolean representing whether the list activity is in HTML format. |
See the TypeDoc page for the full Activity shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveListActivity({id: 1});anilist.mutation.deleteActivity
DeleteActivityMutation deletes an activity on the AniList API. Mod Only
Signature
deleteActivity(variables: DeleteActivityVariables, options?: RequestOptions): Promise<DeleteResult>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity. |
See the TypeDoc page for the full DeleteResult shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.deleteActivity({id: 1});anilist.mutation.toggleActivityPin
ToggleActivityPinMutation toggles the pin status of an activity on the AniList API.
Signature
toggleActivityPin(variables: ToggleActivityPinVariables, options?: RequestOptions): Promise<Activity>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity. |
pinned | boolean | no | a boolean representing whether the activity is pinned. |
asHtml | boolean | no | a boolean representing whether the activity descriptions is in HTML format. |
See the TypeDoc page for the full Activity shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.toggleActivityPin({id: 1, pinned: true});anilist.mutation.toggleActivitySubscription
ToggleActivitySubscriptionMutation toggles the subscription status of an activity on the AniList API.
Signature
toggleActivitySubscription(variables: ToggleActivitySubscriptionVariables, options?: RequestOptions): Promise<Activity>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
activityId | number | yes | a number representing the id of the activity. |
subscribe | boolean | yes | a boolean representing whether the activity is subscribed. |
asHtml | boolean | no | a boolean representing whether the activity descriptions is in HTML format. |
See the TypeDoc page for the full Activity shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.toggleActivitySubscription({activityId: 1, subscribe: true});anilist.mutation.saveActivityReply
SaveActivityReplyMutation saves an activity reply on the AniList API.
Signature
saveActivityReply(variables: SaveActivityReplyVariables, options?: RequestOptions): Promise<ActivityReply>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity reply. |
activityId | number | no | a number representing the id of the activity. |
text | string | yes | a string representing the text of the activity reply. |
asMod | boolean | no | a boolean representing the locked status of the activity reply. |
asHtml | boolean | no | a boolean representing the status of the activity reply. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the reply |
userId | number | The id of the replies creator |
activityId | number | The id of the parent activity |
text | string | The reply text |
likeCount | number | The amount of likes the reply has |
isLiked | boolean | If the currently authenticated user liked the reply |
createdAt | number | The time the reply was created at |
user | BasicUser | The user who created reply |
likes | BasicUser[] | The users who liked the reply |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveActivityReply({id: 1, activityId: 2, text: 'Hello, world!'});anilist.mutation.deleteActivityReply
DeleteActivityReplyMutation deletes an activity reply on the AniList API.
Signature
deleteActivityReply(variables: DeleteActivityReplyVariables, options?: RequestOptions): Promise<DeleteResult>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity reply. |
See the TypeDoc page for the full DeleteResult shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.deleteActivityReply({id: 1});anilist.mutation.toggleLike
ToggleLikeMutation toggles a like on the AniList API.
Signature
toggleLike(variables: ToggleLikeVariables, options?: RequestOptions): Promise<BasicUser>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the likeable object. |
type | LikeableType | yes | a string representing the type of the likeable object. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the user |
name | string | The name of the user |
large | string | The avatar of user at its largest size |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.toggleLike({id: 1, type: 'ACTIVITY'});Reviews
anilist.mutation.saveReview
SaveReviewMutation saves a review on the AniList API.
Signature
saveReview(variables: SaveReviewVariables, options?: RequestOptions): Promise<ReviewResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | the ID of the review. |
mediaId | number | yes | the ID of the media. |
body | string | yes | the body of the review. |
summary | string | yes | the summary of the review. |
score | number | yes | the score of the review. |
private | boolean | yes | a boolean that determines if the review is private. |
asHtml | boolean | no | a boolean that determines if the review is in HTML format. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the review |
mediaId | number | The id of the review's media |
userId | number | The id of the review's creator |
mediaType | string | For which type of media the review is for |
summary | string | A short summary of the review |
body | string | The main review body text |
rating | number | The total user rating of the review |
ratingAmount | number | The amount of user ratings of the review |
score | number | The review score of the media |
private | boolean | If the review is not yet publicly published and is only viewable by creator |
siteUrl | string | The url for the review page on the AniList website |
createdAt | number | The time of the thread creation |
updatedAt | number | The time of the thread last update |
user | BasicUser | The creator of the review |
media | Media | The media the review is of |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveReview({id: 1, mediaId: 1, body: 'testing', summary: 'testing', score: 8, private: true});anilist.mutation.deleteReview
DeleteReviewMutation deletes a review on the AniList API.
Signature
deleteReview(variables: DeleteReviewVariables, options?: RequestOptions): Promise<DeleteResult>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | the ID of the review. |
See the TypeDoc page for the full DeleteResult shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.deleteReview({id: 1});anilist.mutation.saveRecommendation
SaveRecommendationMutation saves a recommendation on the AniList API.
Signature
saveRecommendation(variables: SaveRecommendationVariables, options?: RequestOptions): Promise<RecommendationResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
mediaId | number | yes | the ID of the media. |
mediaRecommendationId | number | yes | the ID of the media recommendation. |
rating | RecommendationRating | yes | the rating of the recommendation. |
asHtml | boolean | no | a boolean that determines if the review is in HTML format. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the recommendation |
rating | number | Users rating of the recommendation |
userRating | string | The rating of the recommendation by currently authenticated user |
media | Media | The media the recommendation is from |
mediaRecommendation | Media | The recommended media |
user | BasicUser | The user that first created the recommendation |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveRecommendation({mediaId: 1, mediaRecommendationId: 2, rating: 'RATE_UP'});Community
anilist.mutation.saveThread
SaveThreadMutation saves a thread on the AniList API.
Signature
saveThread(variables: SaveThreadVariables, options?: RequestOptions): Promise<ThreadResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | the ID of the thread. |
title | string | yes | the title of the thread. |
body | string | yes | the body of the thread. |
categories | number[] | yes | an array of category IDs that the thread belongs to. |
mediaCategories | number[] | yes | an array of media category IDs that the thread belongs to. |
sticky | boolean | yes | a boolean that determines if the thread is sticky. |
locked | boolean | yes | a boolean that determines if the thread is locked. |
asHtml | boolean | yes | a boolean that determines if the response is in HTML format. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the thread |
title | string | The title of the thread |
body | string | The text body of the thread (Markdown) |
userId | number | The id of the thread owner user |
replyUserId | number | The id of the user who most recently commented on the thread |
replyCommentId | number | The id of the most recent comment on the thread |
replyCount | number | The number of comments on the thread |
viewCount | number | The number of times users have viewed the thread |
isLocked | boolean | If the thread is locked and can receive comments |
isSticky | boolean | If the thread is stickied and should be displayed at the top of the page |
isSubscribed | boolean | If the currently authenticated user is subscribed to the thread |
likeCount | number | The amount of likes the thread has |
isLiked | boolean | If the currently authenticated user liked the thread |
repliedAt | number | The time of the last reply |
createdAt | number | The time of the thread creation |
updatedAt | number | The time of the thread last update |
user | BasicUser | The owner of the thread |
replyUser | BasicUser | The user to last reply to the thread |
likes | BasicUser[] | The users who liked the thread |
siteUrl | string | The url for the thread page on the AniList website |
id | number | The id of the category |
name | string | The name of the category |
mediaCategories | Media[] | The media categories of the thread |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveThread({
id: 1,
title: 'Hello, world!',
body: 'Hello, world!',
categories: [],
mediaCategories: [],
sticky: false,
locked: false,
asHtml: true,
});anilist.mutation.deleteThread
DeleteThreadMutation deletes a thread on the AniList API.
Signature
deleteThread(variables: DeleteThreadVariables, options?: RequestOptions): Promise<DeleteResult>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity. |
See the TypeDoc page for the full DeleteResult shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.deleteThread({id: 1});anilist.mutation.toggleThreadSubscription
ToggleThreadSubscriptionMutation toggles a thread subscription on the AniList API.
Signature
toggleThreadSubscription(variables: ToggleThreadSubscriptionVariables, options?: RequestOptions): Promise<ThreadResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
threadId | number | yes | a number representing the id of the thread. |
subscribe | boolean | yes | a boolean representing whether the activity is subscribed. |
asHtml | boolean | no | a boolean representing whether the activity descriptions is in HTML format. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the thread |
title | string | The title of the thread |
body | string | The text body of the thread (Markdown) |
userId | number | The id of the thread owner user |
replyUserId | number | The id of the user who most recently commented on the thread |
replyCommentId | number | The id of the most recent comment on the thread |
replyCount | number | The number of comments on the thread |
viewCount | number | The number of times users have viewed the thread |
isLocked | boolean | If the thread is locked and can receive comments |
isSticky | boolean | If the thread is stickied and should be displayed at the top of the page |
isSubscribed | boolean | If the currently authenticated user is subscribed to the thread |
likeCount | number | The amount of likes the thread has |
isLiked | boolean | If the currently authenticated user liked the thread |
repliedAt | number | The time of the last reply |
createdAt | number | The time of the thread creation |
updatedAt | number | The time of the thread last update |
user | BasicUser | The owner of the thread |
replyUser | BasicUser | The user to last reply to the thread |
likes | BasicUser[] | The users who liked the thread |
siteUrl | string | The url for the thread page on the AniList website |
id | number | The id of the category |
name | string | The name of the category |
mediaCategories | Media[] | The media categories of the thread |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.toggleThreadSubscription({threadId: 1, subscribe: true});anilist.mutation.saveThreadComment
SaveThreadCommentMutation saves a thread comment on the AniList API.
Signature
saveThreadComment(variables: SaveThreadCommentVariables, options?: RequestOptions): Promise<ThreadCommentResponse>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | the ID of the thread. |
threadId | number | yes | the ID of the thread. |
parentCommentId | number | yes | the ID of the parent comment. |
comment | string | yes | the comment to be saved. |
locked | boolean | yes | a boolean that determines if the thread is locked. |
asHtml | boolean | yes | a boolean that determines if the response is in HTML format. |
| Field | Type | Description |
|---|---|---|
id | number | The id of the comment |
userId | number | The user id of the comment's owner |
threadId | number | The id of thread the comment belongs to |
comment | string | The text content of the comment (Markdown) |
likeCount | number | The amount of likes the comment has |
isLiked | boolean | If the currently authenticated user liked the comment |
siteUrl | string | The url for the comment page on the AniList website |
createdAt | number | The time of the comments creation |
updatedAt | number | The time of the comments last update |
thread | ThreadResponse | The thread the comment belongs to |
user | BasicUser | The user who created the comment |
likes | BasicUser[] | The users who liked the comment |
childComments | unknown | The comment's child reply comments |
isLocked | boolean | If the comment tree is locked and may not receive replies or edits |
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.saveThreadComment({
id: 1,
threadId: 1,
parentCommentId: 0,
comment: 'Hello, world!',
locked: false,
asHtml: true,
});anilist.mutation.deleteThreadComment
DeleteThreadCommentMutation deletes a thread comment on the AniList API.
Signature
deleteThreadComment(variables: DeleteThreadCommentVariables, options?: RequestOptions): Promise<DeleteResult>Auth: Required — AniList access token (constructor `authToken` or `anilist.authToken` credential slot).
| Name | Type | Required | Description |
|---|---|---|---|
id | number | yes | a number representing the id of the activity. |
See the TypeDoc page for the full DeleteResult shape.
AniLinkAuthError— no AniList token is configuredAniLinkApiError— non-success AniList HTTP responseAniLinkGraphQLError— HTTP 200 response carrying GraphQL errorsAniLinkNetworkError— timeout, cancellation, or transport failure
Example
await aniLink.anilist.mutation.deleteThreadComment({id: 1});