constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Anime.GetByID(11).then((data)=>{// Your Code HERE :D}).catch((err)=>{// Handle err here D:});
Anime.Get
Parameters
Parameter
Type
Description
filters
AnimeFilters
Filters you want to apply [At least 1] - more info
page
number
The page number of the paginated results
per_page
number
Number of results you want per page
Currently the following filters and their types are:
Filter
Type
Description
title
string
A case-insensitive pattern filter on the list based on the titles field values.
anilist_id
number
A filter on the list based on the anilist_id field value.
mal_id
number
A filter on the list based on the mal_id field value.
A filter on the list based on the status field value.
year
number
A filter on the list based on the season_year field value.
season
number
A filter on the list based on the season_period field value.
genres
string[]
A case-sensitive pattern filter on the list based on the genres field values.
nsfw
boolean
A filter on the list which excludes Anime classified as Not Safe For Work.
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Anime.Get({genres: ["Action","Adventure","Comedy"],formats: [ANIAPI.ENUMS.AnimeFormat.TV,ANIAPI.ENUMS.AnimeFormat.MOVIE],// 0 is for TV, 2 is for Movie,status: [ANIAPI.ENUMS.AnimeStatus.FINISHED,ANIAPI.ENUMS.AnimeStatus.RELEASING]// 0 is for Finished, 1 is for Releasing},1,100).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
Anime.Random
Parameters
Parameter
Type
Description
count
number
N/A
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Anime.Random(10).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Episode.GetByID(485).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
Episode.Get
Parameters
Parameter
Type
Description
filters
EpisodeFilters
Filters you want to apply [At least 1] - more info
page
number
The page number of the paginated results
per_page
number
Number of results you want per page
Currently the following filters and their types are:
Filter
Type
Description
anime_id
number
A filter on the list based on the anime_id field value.
number
number
a filter on the list based on the episode number
source
string
a filter on the list based on the publisher of the anime episode
locale
string
a filter on the list based on the language of the episode
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Episode.Get({anime_id: 11,source: "dreamsub",locale: "it",},1,100).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Song.GetByID(11).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
Song.Get
Parameters
Parameter
Type
Description
filters
SongFilters
Filters you want to apply [At least 1] - more info
page
number
The page number of the paginated results
per_page
number
Number of results you want per page
Currently the following filters and their types are:
Filter
Type
Description
anime_id
number
A filter on the list based on the anime_id field value.
title
string
A case-insensitive pattern filter on the list based on the title field value.
artist
string
A case-insensitive pattern filter on the list based on the artist field value.
year
number
A filter on the list based on the year field value.
A filter on the list based on the type field value.
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Song.Get({anime_id: 4,season: [ANIAPI.ENUMS.AnimeSeasonPeriod.WINTER,ANIAPI.ENUMS.AnimeSeasonPeriod.SPRING],// 0 Is for Winter, 1 is for Springtype: [ANIAPI.ENUMS.AnimeSongType.OPENING,ANIAPI.ENUMS.AnimeSongType.ENDING]// 0 is for Opening, 1 is for Ending}).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
Song.Random
Parameters
Parameter
Type
Description
count
number
N/A
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Song.Random(10).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
Resource.GetLastAvailableResourceVersion
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Resource.GetLastAvailableResourceVersion().then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
Resource.Get
Parameters
Parameter
Type
Description
version
string
a string which identifies the latest available Resources' version.
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.Resource.Get("1.0",ANIAPI.ENUMS.AnimeResourceType.GENRES).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:});
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.User.GetByID(134).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
User.Get
Parameters
Parameter
Type
Description
filters
UserFilters
Filters you want to apply [At least 1] - more info
page
number
The page number of the paginated results
per_page
number
Number of results you want per page
Currently the following filters and their types are:
Filter
Type
Description
username
number
A case-insensitive pattern filter on the list based on the username field value.
email
string
A case-sensitive filter on the list based on the email field value.
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.User.Get({username: "SomebodyRandom",email: "real@email.com"},1,100).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
The User's AniList account external token. This value becomes required when you provide the anilist_id field.
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.User.Update(134,{gender: aniapi.ENUMS.UserGender.MALE}).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
User.Delete
Parameters
Parameter
Type
Description
id
string
The User's id to delete
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.User.Delete(134).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
UserStory.GetByID
Parameters
Parameter
Type
Description
id
string
The User_Story's id to fetch
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.UserStory.GetByID(1).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
UserStory.Get
Parameters
Parameter
Type
Description
filters
UserStoryFilters
Filters you want to apply [At least 1] - more info
page
number
The page number of the paginated results
per_page
number
Number of results you want per page
Currently the following filters and their types are:
Filter
Type
Description
anime_id
number
A filter on the list based on the anime_id field value.
user_id
number
A filter on the list based on the user_id field value.
status
UserStoryStatus
A filter on the list based on the status field value.
synced
boolean
A filter on the list based on the synced field value. synced field indicates if an UserStory has been synchronized with User's linked trackers.
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.UserStory.Get({status: aniapi.ENUMS.UserStoryStatus.COMPLETED,synced: true}).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
UserStory.Create
Parameters
Parameter
Type
Description
input
UserStoryChanges
The User_Story's object to create
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.UserStory.Create({user_id: 134,anime_id: 11,status: aniapi.ENUMS.UserStoryStatus.COMPLETED,current_episode: 24,}).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
UserStory.Update
Parameters
Parameter
Type
Description
changes
UserStoryChanges
The User_Story's object to update
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.UserStory.Update({id: 1,anime_id: 11,status: aniapi.ENUMS.UserStoryStatus.COMPLETED,current_episode: 24,}).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})
UserStory.Delete
Parameters
Parameter
Type
Description
id
string
The User_Story's id to delete
Usage
constANIAPI=require("@mattplays/aniapi");constAPI=newANIAPI.API("DUMMY_JWT");API.UserStory.Delete(1).then((data)=>{// Your Code Here :D}).catch((err)=>{// Handle error Here D:})