🧩
Seanime Extensions
🧩
Seanime Extensions
  • Seanime
    • Getting started
    • Core APIs
    • Changelog
  • Content Providers
    • Write, test, share
    • Anime torrent provider
    • Manga provider
    • Online streaming provider
  • Plugins
    • Introduction
    • Write, test, share
    • APIs
      • Helpers
      • Store
      • Storage
      • Database
      • AniList
      • System
        • Permissions
        • OS
        • Filepath
        • Commands
        • Buffers, I/O
        • MIME
    • UI
      • Basics
      • User Interface
        • Tray
        • Toast
        • Screen
        • Command Palette
        • Action
        • DOM
      • Anime/Library
        • Anime
        • Playback
        • Continuity
        • Auto Downloader
        • Auto Scanner
        • Filler Manager
        • External Player Link
      • Downloading
        • Downloader
        • Torrent Client
      • Other
        • Manga
        • Discord
        • MPV
    • Hooks
    • Example
  • Frequently asked
    • Feature requests
Powered by GitBook
On this page
  • Permission
  • Refresh collections
  • Update entry
  • Update entry progress
  • Update entry repeat
  • Delete entry
  • Add media to collection
  • Get collections
  • Get anime/manga data
  • Search / List
  • Custom GraphQL query
  1. Plugins
  2. APIs

AniList

Interact with the user's AniList account.

Difficulty: Easy

Permission

anilist permission is required.

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

PreviousDatabaseNextSystem

Last updated 1 month ago