AniList

Interact with the user's AniList account.

Permission

my-plugin.json
{
    //...
    "plugin": {
        "permissions": {
            "scopes": ["anilist"]
        }
    }
}

Refresh collections

This is needed if you edit the user's collection.

$anilist.refreshAnimeCollection()
$anilist.refreshMangaCollection()

Update entry

$anilist.updateEntry(
    mediaId: number,
    status: $app.AL_MediaListStatus | undefined,
    scoreRaw: number | undefined,
    progress: number | undefined,
    startedAt: $app.AL_FuzzyDateInput | undefined,
    completedAt: $app.AL_FuzzyDateInput | undefined,
): void

Update entry progress

$anilist.updateEntryProgress(
    mediaId: number,
    progress: number,
    status: $app.AL_MediaListStatus | undefined,
): void

Update entry repeat

$anilist.updateEntryRepeat(mediaId: number, repeat: number): void

Delete entry

$anilist.deleteEntry(mediaListEntryId: number): void

Add media to collection

/**
* Add media to collection.
* 
* This will add the media to the collection with the status "PLANNING".
* 
* The anime/manga collection should be refreshed after adding the media.
*/
$anilist.addMediaToCollection(mediaIds: number[]): void

Get collections

/**
* Get the user's anime collection.
* This collection does not include lists with no status.
*/
$anilist.getAnimeCollection(bypassCache: boolean): $app.AL_AnimeCollection

/**
* Get the raw anime collection data.
* This collection includes lists with no status.
*/
$anilist.getRawAnimeCollection(bypassCache: boolean): $app.AL_AnimeCollection

/**
* Get the user's manga collection.
* This collection does not include lists with no status.
*/
$anilist.getMangaCollection(bypassCache: boolean): $app.AL_MangaCollection

/**
* Get the raw manga collection data.
* This collection includes lists with no status.
*/
$anilist.getRawMangaCollection(bypassCache: boolean): $app.AL_MangaCollection

/**
* Get anime collection with relations
*/
$anilist.getAnimeCollectionWithRelations(): $app.AL_AnimeCollectionWithRelations

Get anime/manga data

/**
* Get anime by ID
*/
$anilist.getAnime(id: number): $app.AL_BaseAnime

/**
* Get manga by ID
*/
$anilist.getManga(id: number): $app.AL_BaseManga

/**
* Get detailed anime info by ID
*/
$anilist.getAnimeDetails(id: number): $app.AL_AnimeDetailsById_Media

/**
* Get detailed manga info by ID
*/
$anilist.getMangaDetails(id: number): $app.AL_MangaDetailsById_Media

/**
* Get studio details
*/
$anilist.getStudioDetails(studioId: number): $app.AL_StudioDetails

Search / List

/**
 * List anime based on search criteria
 */
$anilist.listAnime(
    page: number | undefined,
    search: string | undefined,
    perPage: number | undefined,
    sort: $app.AL_MediaSort[] | undefined,
    status: $app.AL_MediaStatus[] | undefined,
    genres: string[] | undefined,
    averageScoreGreater: number | undefined,
    season: $app.AL_MediaSeason | undefined,
    seasonYear: number | undefined,
    format: $app.AL_MediaFormat | undefined,
    isAdult: boolean | undefined,
): $app.AL_ListAnime

/**
 * List manga based on search criteria
 */
$anilist.listManga(
    page: number | undefined,
    search: string | undefined,
    perPage: number | undefined,
    sort: $app.AL_MediaSort[] | undefined,
    status: $app.AL_MediaStatus[] | undefined,
    genres: string[] | undefined,
    averageScoreGreater: number | undefined,
    startDateGreater: string | undefined,
    startDateLesser: string | undefined,
    format: $app.AL_MediaFormat | undefined,
    countryOfOrigin: string | undefined,
    isAdult: boolean | undefined,
): $app.AL_ListManga

/**
 * List recent anime
 */
$anilist.listRecentAnime(
    page: number | undefined,
    perPage: number | undefined,
    airingAtGreater: number | undefined,
    airingAtLesser: number | undefined,
    notYetAired: boolean | undefined,
): $app.AL_ListRecentAnime

Custom GraphQL query

$anilist.customQuery<T = any>(body: Record<string, any>, token: string): T

Last updated