1.0.2
Class Used to Interact with API
(String)
jwt token from Anilist API
Retriees the list specified by the parameters
(any)
(Object)
{
id: Int,
'listType': 'ANIME', 'MANGA',
'status': CURRENT, PLANNING, COMPLETED, DROPPED, PAUSED, REPEATING,
}
Name | Description |
---|---|
vars.id Number
|
Integer id of user |
vars.listType String
|
Type of list - 'ANIME', 'MANGA' |
vars.status String
|
CURRENT, PLANNING, COMPLETED, DROPPED, PAUSED, REPEATING, |
Promise
:
MediaListCollection.lists
[0]
.entries
entries
const vars = {
id: 1,
listType: 'ANIME',
status: 'CURRENT'
};
const token = '<Your_TOKEN>';
const anilist = new Anilist(token);
anilist.getUserListForUser(vars)
.then((result) => console.log(result));
update anime for the current logged in user
(any)
(Object)
{
id: Number,
mediaId: Number,
status: CURRENT, PLANNING, COMPLETED, DROPPED, PAUSED, REPEATING,
score: Float,
progress: Number
}
Name | Description |
---|---|
vars.id Number
|
Integer id of entry in list |
vars.mediaId Number
|
Integer id of media |
vars.score Number
|
float value |
vars.progress Number
|
The current episode |
vars.status String
|
CURRENT, PLANNING, COMPLETED, DROPPED, PAUSED, REPEATING, |
Promise
:
SaveMediaListEntry
updateEntry
// if the entry for this media id is already there this will update it
const vars = { mediaId: 100240, status: 'CURRENT', progress: 1 }
const token = '<Your_TOKEN>';
const anilist = new Anilist(token);
anilist.updateAnime(vars)
.then((result) => console.log(result));
add anime to current logged in user
(any)
(Object)
{
id: Number,
mediaId: Number,
status: CURRENT, PLANNING, COMPLETED, DROPPED, PAUSED, REPEATING,
score: Float,
progress: Number
}
Name | Description |
---|---|
vars.mediaId Number
|
Integer id of media |
vars.score Number
|
float value |
vars.progress Number
|
The current episode |
vars.status String
|
CURRENT, PLANNING, COMPLETED, DROPPED, PAUSED, REPEATING, |
Promise
:
SaveMediaListEntry
updateEntry
const vars = { mediaId: 100240, status: 'CURRENT', progress: 1 }
const token = '<Your_TOKEN>';
const anilist = new Anilist(token);
anilist.addAnime(vars)
.then((result) => console.log(result));
remove anime from the user list
(Number)
The id of the media list entry to delete
Promise
:
deleted: {Boolean}
const id = 104012; // needs to be the list id
const token = '<Your_TOKEN>';
const anilist = new Anilist(token);
anilist.removeAnime(id)
.then((result) => console.log(result));
The media object
Type: Object
The user List media Object
Type: Object
The user List media Object created/updated
Type: Object