Creates a new AniLink instance. The authToken parameter is optional and only required for authenticated queries and mutations. If no authToken is provided, only public queries will be available. You are able to create multiple AniLink instances with different authTokens.
OptionalauthToken: string
The authentication token to use for API requests.
Optionaloptions: AniLinkOptions
Timeout, cancellation, and debugging settings for API requests.
Anilist API methods.
Custom query or mutation.
Mutation methods for updating data on the Anilist API.
Deletes an activity on the Anilist API. Mod Only
Deletes an activity reply on the Anilist API.
Deletes a custom list on the Anilist API. There is no mutation specifically for creating a custom list. You can create a custom list through the updateUser mutation under the animeListOptions or mangaListOptions variables.
Deletes a media list entry on the Anilist API.
Deletes a review on the Anilist API.
Deletes a thread on the Anilist API.
Deletes a thread comment on the Anilist API.
Rates a review on the Anilist API.
Saves an activity reply on the Anilist API. If no id is provided, a new activity reply will be created. If an id is provided, the activity reply with that id will be updated.
Saves a list activity on the Anilist API. Mod Only
Saves a media list entry on the Anilist API.
Saves a message activity on the Anilist API. If no id is provided, a new activity will be created. If an id is provided, the activity with that id will be updated.
Saves a recommendation on the Anilist API.
Saves a review on the Anilist API. If no id is provided, a new review will be created. If an id is provided, the review with that id will be updated.
Saves a text activity on the Anilist API. If no id is provided, a new activity will be created. If an id is provided, the activity with that id will be updated.
Saves a thread on the Anilist API. If no id is provided, a new thread will be created. If an id is provided, the thread with that id will be updated.
Saves a thread comment on the Anilist API. If no id is provided, a new thread comment will be created. If an id is provided, the thread comment with that id will be updated.
Toggles the pin status of an activity on the Anilist API.
Toggles the subscription status of an activity on the Anilist API.
Toggles a favorite on the Anilist API.
Toggles a follow on the Anilist API.
Toggles a like on the Anilist API.
Toggles a like on the Anilist API.
Returns a different response than the toggleLike mutation.
Toggles a thread subscription on the Anilist API.
Updates the AniChart highlights for a user on the Anilist API.
Updates the AniChart settings for a user on the Anilist API.
Updates the order of favourites on the Anilist API.
Updates media list entries on the Anilist API.
Updates a user on the Anilist API.
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}]
});
Query methods for fetching data from the Anilist API.
Fetches activity data from the Anilist API.
Fetches activity reply data from the Anilist API.
Fetches airing schedule data from the Anilist API.
Fetches aniChart user data from the Anilist API.
Fetches character data from the Anilist API.
Fetches external link source collection data from the Anilist API.
Fetches follower data from the Anilist API.
Fetches following data from the Anilist API.
Fetches genre collection data from the Anilist API.
Fetches users who liked a model from the Anilist API.
Fetches markdown data from the Anilist API.
Fetches media data from the Anilist API.
Fetches media list data from the Anilist API.
Fetches media list collection data from the Anilist API.
Fetches media tag collection data from the Anilist API.
Fetches media trend data from the Anilist API.
Fetches notification data from the Anilist API.
Fetches pages of data from the Anilist API.
All page queries have the same structure as original queries with the addition of page and perPage variables.
Fetches activities data from the Anilist API.
Fetches activity replies data from the Anilist API.
Fetches airing schedules data from the Anilist API.
Fetches characters data from the Anilist API.
Fetches followers data from the Anilist API.
Fetches following data from the Anilist API.
Fetches likes data from the Anilist API.
Fetches media lists data from the Anilist API.
Fetches medias data from the Anilist API.
Fetches media trends data from the Anilist API.
Fetches notifications data from the Anilist API.
Fetches recommendations data from the Anilist API.
Fetches reviews data from the Anilist API.
Fetches staffs data from the Anilist API.
Fetches studios data from the Anilist API.
Fetches thread comments data from the Anilist API.
Fetches threads data from the Anilist API.
Fetches users data from the Anilist API.
Fetches recommendation data from the Anilist API.
Fetches review data from the Anilist API.
Fetches site statistics data from the Anilist API.
Fetches staff data from the Anilist API.
await aniLink.anilist.query.staff({
id: 132186,
asHtml: true,
staffMediaSort: ['POPULARITY_DESC'],
staffMediaType: 'ANIME',
staffMediaOnList: true,
staffMediaPage: 1,
staffMediaPerPage: 10,
charactersSort: ['ID'],
charactersPage: 1,
charactersPerPage: 10,
characterMediaSort: ['POPULARITY_DESC'],
characterMediaOnList: true,
characterMediaPage: 1,
characterMediaPerPage: 10
});
Fetches studio data from the Anilist API.
Fetches thread data from the Anilist API.
Fetches thread comment data from the Anilist API.
Fetches user data from the Anilist API.
Fetches viewer data from the Anilist API.
AniLinkis a class for interacting with the APIs. It provides methods for querying and mutating data.