mangadex-full-api v5.12.1
MangaDex Full API
An unofficial MangaDex API built with the official JSON API.
npm install mangadex-full-api
Download v5 Pre-release:
npm install mangadex-full-api@next
Examples
const MFA = require('mangadex-full-api');
MFA.login('username', 'password123', './bin/.md_cache').then(() => {
MFA.Manga.search({
title: 'isekai',
limit: Infinity // API Max is 100 per request, but this function accepts more
}).then(results => {
console.log(`There are ${results.length} manga with 'isekai' in the title:`);
results.forEach((elem, i) => console.log(`[${i + 1}] ${elem.title}`));
}).catch(console.error);
}).catch(console.error);
const MFA = require('mangadex-full-api');
MFA.login('username', 'password123', './bin/.md_cache').then(async () => {
// Get a manga:
let manga = await MFA.Manga.getByQuery('Ancient Magus Bride');
// Get the manga's chapters:
let chapters = await manga.getFeed({ translatedLanguage: ['en'] });
let chapter = chapters[0];
// Get the chapter's pages:
let pages = await chapter.getReadablePages();
// Get who uploaded the chapter:
let uploader = await chapter.uploader.resolve();
// Get the names of the groups who scanlated the chapter:
let groupNames = [];
for (let i of chapter.groups) {
let group = await i.resolve();
groupNames.push(group.name);
}
console.log(`Manga "${manga.title}" has a chapter titled "${chapter.title}" that was uploaded by ${uploader.username} and scanlated by ${groupNames.join('and')}.`);
console.log(`Here is the first page: ${pages[0]}`);
}).catch(console.error);
Classes
Functions
Author
Represents an author or artist https://api.mangadex.org/docs.html#tag/Author
Kind: global class
- Author
- new Author(context)
- instance
- .id : String
- .name : String
- .imageUrl : String
- .biography : Array.<String>
- .createdAt : Date
- .updatedAt : Date
- .manga : Array.<Relationship>
- static
- .search([searchParameters]) ⇒ Promise.<Array.<Author>>
- .get(id) ⇒ Promise.<Author>
- .getByQuery([searchParameters]) ⇒ Promise.<Author>
new Author(context)
There is no reason to directly create an author object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
author.id : String
Mangadex id for this object
Kind: instance property of Author
author.name : String
Name of this author/artist
Kind: instance property of Author
author.imageUrl : String
Image URL for this author/artist
Kind: instance property of Author
author.biography : Array.<String>
Author/Artist biography
Kind: instance property of Author
author.createdAt : Date
The date of this author/artist page creation
Kind: instance property of Author
author.updatedAt : Date
The date the author/artist was last updated
Kind: instance property of Author
author.manga : Array.<Relationship>
Relationships to manga this author/artist has been attributed to
Kind: instance property of Author
Author.search(searchParameters) ⇒ Promise.<Array.<Author>>
Peforms a search and returns an array of a authors/artists. https://api.mangadex.org/docs.html#operation/get-author
Kind: static method of Author
Param | Type | Description |
---|---|---|
searchParameters | AuthorParameterObject | String | An object of offical search parameters, or a string representing the name |
Author.get(id) ⇒ Promise.<Author>
Retrieves and returns a author by its id
Kind: static method of Author
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
Author.getByQuery(searchParameters) ⇒ Promise.<Author>
Performs a search for one author and returns that author
Kind: static method of Author
Param | Type | Description |
---|---|---|
searchParameters | AuthorParameterObject | String | An object of offical search parameters, or a string representing the name |
Chapter
Represents a chapter with readable pages https://api.mangadex.org/docs.html#tag/Chapter
Kind: global class
- Chapter
- new Chapter(context)
- instance
- .id : String
- .volume : Number
- .chapter : Number
- .title : String
- .translatedLanguage : String
- .hash : String
- .createdAt : Date
- .updatedAt : Date
- .publishAt : Date
- .pageNames : String
- .saverPageNames : String
- .groups : Array.<Relationship>
- .manga : Relationship
- .uploader : Relationship
- .getReadablePages([saver]) ⇒ Promise.<Array.<String>>
- .changeReadMarker([read]) ⇒ Promise.<Chapter>
- static
- .search([searchParameters]) ⇒ Promise.<Array.<Chapter>>
- .get(id) ⇒ Promise.<Chapter>
- .getByQuery([searchParameters]) ⇒ Promise.<Chapter>
- .changeReadMarker(id, [read]) ⇒ Promise.<void>
new Chapter(context)
There is no reason to directly create a chapter object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
chapter.id : String
Mangadex id for this object
Kind: instance property of Chapter
chapter.volume : Number
Number this chapter's volume
Kind: instance property of Chapter
chapter.chapter : Number
Number of this chapter
Kind: instance property of Chapter
chapter.title : String
Title of this chapter
Kind: instance property of Chapter
chapter.translatedLanguage : String
Translated language code (2 Letters)
Kind: instance property of Chapter
chapter.hash : String
Hash id of this chapter
Kind: instance property of Chapter
chapter.createdAt : Date
The date of this chapter's creation
Kind: instance property of Chapter
chapter.updatedAt : Date
The date this chapter was last updated
Kind: instance property of Chapter
chapter.publishAt : Date
The date this chapter was published
Kind: instance property of Chapter
chapter.pageNames : String
Dont Use. This is an array of partial URLs. Use 'getReadablePages()' to retrieve full urls.
Kind: instance property of Chapter
chapter.saverPageNames : String
Dont Use. This is an array of partial URLs. Use 'getReadablePages()' to retrieve full urls.
Kind: instance property of Chapter
chapter.groups : Array.<Relationship>
Relationships to scanlation groups that are attributed to this chapter
Kind: instance property of Chapter
chapter.manga : Relationship
Relationships to the manga this chapter belongs to
Kind: instance property of Chapter
chapter.uploader : Relationship
Relationships to the user who uploaded this chapter
Kind: instance property of Chapter
chapter.getReadablePages(saver) ⇒ Promise.<Array.<String>>
Retrieves URLs for actual images from Mangadex @ Home. This only gives URLs, so it does not report the status of the server to Mangadex @ Home. Therefore applications that download image data pleaese report failures as stated here: https://api.mangadex.org/docs.html#section/Reading-a-chapter-using-the-API/Report
Kind: instance method of Chapter
Param | Type | Default | Description |
---|---|---|---|
saver | Boolean | false | Use data saver images? |
chapter.changeReadMarker(read) ⇒ Promise.<Chapter>
Marks this chapter as either read or unread
Kind: instance method of Chapter
Param | Type | Default | Description |
---|---|---|---|
read | Boolean | true | True to mark as read, false to mark unread |
Chapter.search(searchParameters) ⇒ Promise.<Array.<Chapter>>
Peforms a search and returns an array of chapters. https://api.mangadex.org/docs.html#operation/get-chapter
Kind: static method of Chapter
Param | Type | Description |
---|---|---|
searchParameters | ChapterParameterObject | String | An object of offical search parameters, or a string representing the title |
Chapter.get(id) ⇒ Promise.<Chapter>
Retrieves and returns a chapter by its id
Kind: static method of Chapter
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
Chapter.getByQuery(searchParameters) ⇒ Promise.<Chapter>
Performs a search for one chapter and returns that chapter
Kind: static method of Chapter
Param | Type | Description |
---|---|---|
searchParameters | ChapterParameterObject | String | An object of offical search parameters, or a string representing the title |
Chapter.changeReadMarker(id, read) ⇒ Promise.<void>
Marks a chapter as either read or unread
Kind: static method of Chapter
Param | Type | Default | Description |
---|---|---|---|
id | String | ||
read | Boolean | true | True to mark as read, false to mark unread |
Cover
Represents the cover art of a manga volume https://api.mangadex.org/docs.html#tag/Cover
Kind: global class
- Cover
- new Cover(context)
- instance
- .id : String
- .volume : Number
- .description : String
- .createdAt : Date
- .updatedAt : Date
- .manga : Relationship
- .uploader : Relationship
- .imageSource : String
- .image512 : String
- .image256 : String
- static
- .get(id) ⇒ Promise.<Cover>
- .search([searchParameters]) ⇒ Promise.<Array.<Cover>>
- .getByQuery([searchParameters]) ⇒ Promise.<Cover>
- .getMangaCovers(...manga) ⇒ Promise.<Array.<Cover>>
new Cover(context)
There is no reason to directly create a cover art object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
cover.id : String
Mangadex id for this object
Kind: instance property of Cover
cover.volume : Number
Manga volume this is a cover for
Kind: instance property of Cover
cover.description : String
Description of this cover
Kind: instance property of Cover
cover.createdAt : Date
The date of the cover's creation
Kind: instance property of Cover
cover.updatedAt : Date
The date the cover was last updated
Kind: instance property of Cover
cover.manga : Relationship
Manga this is a cover for
Kind: instance property of Cover
cover.uploader : Relationship
The user who uploaded this cover
Kind: instance property of Cover
cover.imageSource : String
URL to the source image of the cover
Kind: instance property of Cover
cover.image512 : String
URL to the 512px image of the cover
Kind: instance property of Cover
cover.image256 : String
URL to the 256px image of the cover
Kind: instance property of Cover
Cover.get(id) ⇒ Promise.<Cover>
Retrieves and returns a cover by its id
Kind: static method of Cover
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
Cover.search(searchParameters) ⇒ Promise.<Array.<Cover>>
Peforms a search and returns an array of covers. https://api.mangadex.org/docs.html#operation/get-cover
Kind: static method of Cover
Param | Type |
---|---|
searchParameters | CoverParameterObject |
Cover.getByQuery(searchParameters) ⇒ Promise.<Cover>
Performs a search for one manga and returns that manga
Kind: static method of Cover
Param | Type |
---|---|
searchParameters | CoverParameterObject |
Cover.getMangaCovers(...manga) ⇒ Promise.<Array.<Cover>>
Get an array of manga's covers
Kind: static method of Cover
Param | Type |
---|---|
...manga | String | Manga |
Group
Represents a scanlation group https://api.mangadex.org/docs.html#tag/Group
Kind: global class
- Group
- new Group(context)
- instance
- .id : String
- .name : String
- .createdAt : Date
- .updatedAt : Date
- .chapters : Array.<Relationship>
- .leaderName : User
- .leader : Relationship
- .memberNames : Array.<User>
- .members : Array.<Relationship>
- static
- .search([searchParameters]) ⇒ Promise.<Array.<Group>>
- .get(id) ⇒ Promise.<Group>
- .getByQuery([searchParameters]) ⇒ Promise.<Group>
- .getFollowedGroups([limit], [offset]) ⇒ Promise.<Array.<Group>>
new Group(context)
There is no reason to directly create a group object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
group.id : String
Mangadex id for this object
Kind: instance property of Group
group.name : String
Name of this group
Kind: instance property of Group
group.createdAt : Date
The date of this group's creation
Kind: instance property of Group
group.updatedAt : Date
The date the group was last updated
Kind: instance property of Group
group.chapters : Array.<Relationship>
Relationships to chapters attributed to this group
Kind: instance property of Group
group.leaderName : User
Username of the group's leader. Resolve the leader relationship to retrieve other data
Kind: instance property of Group
group.leader : Relationship
Relationship to this group's leader
Kind: instance property of Group
group.memberNames : Array.<User>
Username of the group's member. Resolve the members' relationships to retrieve other data
Kind: instance property of Group
group.members : Array.<Relationship>
Relationships to each group's members
Kind: instance property of Group
Group.search(searchParameters) ⇒ Promise.<Array.<Group>>
Peforms a search and returns an array of groups. https://api.mangadex.org/docs.html#operation/get-search-group
Kind: static method of Group
Param | Type | Description |
---|---|---|
searchParameters | GroupParameterObject | String | An object of offical search parameters, or a string representing the name |
Group.get(id) ⇒ Promise.<Group>
Retrieves and returns a group by its id
Kind: static method of Group
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
Group.getByQuery(searchParameters) ⇒ Promise.<Group>
Performs a search for one group and returns that group
Kind: static method of Group
Param | Type | Description |
---|---|---|
searchParameters | GroupParameterObject | String | An object of offical search parameters, or a string representing the name |
Group.getFollowedGroups(limit, offset) ⇒ Promise.<Array.<Group>>
Returns all groups followed by the logged in user
Kind: static method of Group
Param | Type | Default | Description |
---|---|---|---|
limit | Number | 100 | Amount of groups to return (0 to Infinity) |
offset | Number | 0 | How many groups to skip before returning |
List
Represents a custom, user-created list of manga https://api.mangadex.org/docs.html#tag/CustomList
Kind: global class
- List
- new List(context)
- instance
- .id : String
- .name : String
- .version : String
- .visibility : 'public' | 'private'
- .manga : Array.<Relationship>
- .owner : Relationship
- .ownerName : String
- .public : Boolean
- .getFeed([parameterObject]) ⇒ Promise.<Array.<Chapter>>
- .delete() ⇒ Promise.<void>
- .rename(newName) ⇒ Promise.<List>
- .changeVisibility([newVis]) ⇒ Promise.<List>
- .updateMangaList(newList) ⇒ Promise.<List>
- .addManga(manga) ⇒ Promise.<List>
- .removeManga(manga) ⇒ Promise.<List>
- static
- .get(id) ⇒ Promise.<List>
- .create(name, manga, [visibility]) ⇒ Promise.<List>
- .delete(id) ⇒ Promise.<void>
- .addManga(listId, manga) ⇒ Promise.<void>
- .removeManga(listId, manga) ⇒ Promise.<void>
- .getFeed(id, parameterObject) ⇒ Promise.<Array.<Chapter>>
new List(context)
There is no reason to directly create a custom list object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
list.id : String
Mangadex id for this object
Kind: instance property of List
list.name : String
Name of this custom list
Kind: instance property of List
list.version : String
Version of this custom list
Kind: instance property of List
list.visibility : 'public' | 'private'
String form of this list's visibility
Kind: instance property of List
list.manga : Array.<Relationship>
Relationships to all of the manga in this custom list
Kind: instance property of List
list.owner : Relationship
Relationship to this list's owner
Kind: instance property of List
list.ownerName : String
Name of this list's owner. Resolve this owner relationship object for other user info
Kind: instance property of List
list.public : Boolean
Is this list public?
Kind: instance property of List
list.getFeed(parameterObject) ⇒ Promise.<Array.<Chapter>>
Returns a list of the most recent chapters from the manga in a list https://api.mangadex.org/docs.html#operation/get-list-id-feed
Kind: instance method of List
Param | Type | Description |
---|---|---|
parameterObject | FeedParameterObject | Information on which chapters to be returned |
list.delete() ⇒ Promise.<void>
Delete a custom list. Must be logged in
Kind: instance method of List
list.rename(newName) ⇒ Promise.<List>
Renames a custom list. Must be logged in
Kind: instance method of List
Param | Type |
---|---|
newName | String |
list.changeVisibility(newVis) ⇒ Promise.<List>
Changes the visibility a custom list. Must be logged in
Kind: instance method of List
Param | Type | Description |
---|---|---|
newVis | 'public' | 'private' | Leave blank to toggle |
list.updateMangaList(newList) ⇒ Promise.<List>
Changes the manga in a custom list. Must be logged in
Kind: instance method of List
Param | Type |
---|---|
newList | Array.<Manga> | Array.<String> |
list.addManga(manga) ⇒ Promise.<List>
Adds a manga to this list
Kind: instance method of List
Param | Type |
---|---|
manga | Manga | String |
list.removeManga(manga) ⇒ Promise.<List>
Removes a manga from this list
Kind: instance method of List
Param | Type |
---|---|
manga | Manga | String |
List.get(id) ⇒ Promise.<List>
Retrieves and returns a list by its id
Kind: static method of List
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
List.create(name, manga, visibility) ⇒ Promise.<List>
Create a new custom list. Must be logged in
Kind: static method of List
Param | Type | Default |
---|---|---|
name | String | |
manga | Array.<Manga> | Array.<String> | |
visibility | 'public' | 'private' | 'private' |
List.delete(id) ⇒ Promise.<void>
Deletes a custom list. Must be logged in
Kind: static method of List
Param | Type |
---|---|
id | String |
List.addManga(listId, manga) ⇒ Promise.<void>
Adds a manga to a custom list. Must be logged in
Kind: static method of List
Param | Type |
---|---|
listId | String |
manga | Manga | String |
List.removeManga(listId, manga) ⇒ Promise.<void>
Removes a manga from a custom list. Must be logged in
Kind: static method of List
Param | Type |
---|---|
listId | String |
manga | Manga | String |
List.getFeed(id, parameterObject) ⇒ Promise.<Array.<Chapter>>
Returns a list of the most recent chapters from the manga in a list
Kind: static method of List
Param | Type | Description |
---|---|---|
id | String | Mangadex id of the list |
parameterObject | FeedParameterObject | Information on which chapters to be returned |
Manga
Represents a manga object https://api.mangadex.org/docs.html#tag/Manga
Kind: global class
- Manga
- new Manga(context)
- instance
- .id : String
- .localizedTitle : LocalizedString
- .localizedAltTitles : Array.<LocalizedString>
- .localizedDescription : LocalizedString
- .isLocked : Boolean
- .links : Links
- .originalLanguage : String
- .lastVolume : Number
- .lastChapter : String
- .publicationDemographic : 'shounen' | 'shoujo' | 'josei' | 'seinen'
- .status : 'ongoing' | 'completed' | 'hiatus' | 'cancelled'
- .year : Number
- .contentRating : 'safe' | 'suggestive' | 'erotica' | 'pornographic'
- .createdAt : Date
- .updatedAt : Date
- .authors : Array.<Relationship>
- .artists : Array.<Relationship>
- .mainCover : Relationship
- .tags : Array.<Tag>
- .title : String
- .altTitles : Array.<String>
- .description : String
- .getCovers() ⇒ Promise.<Array.<Cover>>
- .getFeed([parameterObject]) ⇒ Promise.<Array.<Chapter>>
- .addToList(list) ⇒ Promise.<void>
- .getReadingStatus() ⇒ Promise.<('reading'|'on_hold'|'plan_to_read'|'dropped'|'re_reading'|'completed')>
- .setReadingStatus([status]) ⇒ Promise.<void>
- .changeFollowship([follow]) ⇒ Promise.<Manga>
- .getReadChapters() ⇒ Promise.<Array.<Chapter>>
- static
- .search([searchParameters]) ⇒ Promise.<Array.<Manga>>
- .get(id) ⇒ Promise.<Manga>
- .getByQuery([searchParameters]) ⇒ Promise.<Manga>
- .getFeed(id, [parameterObject]) ⇒ Promise.<Array.<Chapter>>
- .getRandom() ⇒ Promise.<Manga>
- .getFollowedManga([limit], [offset]) ⇒ Promise.<Array.<Manga>>
- .getTag(indentity) ⇒ Promise.<Tag>
- .getAllTags() ⇒ Promise.<Array.<Tag>>
- .getReadingStatus(id) ⇒ Promise.<('reading'|'on_hold'|'plan_to_read'|'dropped'|'re_reading'|'completed')>
- .setReadingStatus(id, [status]) ⇒ Promise.<void>
- .getFollowedFeed([parameterObject]) ⇒ Promise.<Array.<Chapter>>
- .changeFollowship(id, [follow]) ⇒ Promise.<void>
- .getReadChapters(...ids) ⇒ Promise.<Array.<Chapter>>
- .getCovers(...id) ⇒ Promise.<Array.<Cover>>
new Manga(context)
There is no reason to directly create a manga object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
manga.id : String
Mangadex id for this object
Kind: instance property of Manga
manga.localizedTitle : LocalizedString
Main title with different localization options
Kind: instance property of Manga
manga.localizedAltTitles : Array.<LocalizedString>
Alt titles with different localization options
Kind: instance property of Manga
manga.localizedDescription : LocalizedString
Description with different localization options
Kind: instance property of Manga
manga.isLocked : Boolean
Is this Manga locked?
Kind: instance property of Manga
manga.links : Links
Link object representing links to other websites about this manga https://api.mangadex.org/docs.html#section/Static-data/Manga-links-data
Kind: instance property of Manga
manga.originalLanguage : String
2-letter code for the original language of this manga
Kind: instance property of Manga
manga.lastVolume : Number
Number this manga's last volume
Kind: instance property of Manga
manga.lastChapter : String
Name of this manga's last chapter
Kind: instance property of Manga
manga.publicationDemographic : 'shounen' | 'shoujo' | 'josei' | 'seinen'
Publication demographic of this manga https://api.mangadex.org/docs.html#section/Static-data/Manga-publication-demographic
Kind: instance property of Manga
manga.status : 'ongoing' | 'completed' | 'hiatus' | 'cancelled'
Publication/Scanlation status of this manga
Kind: instance property of Manga
manga.year : Number
Year of this manga's publication
Kind: instance property of Manga
manga.contentRating : 'safe' | 'suggestive' | 'erotica' | 'pornographic'
The content rating of this manga
Kind: instance property of Manga
manga.createdAt : Date
The date of this manga's page creation
Kind: instance property of Manga
manga.updatedAt : Date
The date the manga was last updated
Kind: instance property of Manga
manga.authors : Array.<Relationship>
Relationships to authors attributed to this manga
Kind: instance property of Manga
manga.artists : Array.<Relationship>
Relationships to artists attributed to this manga
Kind: instance property of Manga
manga.mainCover : Relationship
Relationships to this manga's main cover. Use 'getCovers' to retrive other covers
Kind: instance property of Manga
manga.tags : Array.<Tag>
Array of tags for this manga
Kind: instance property of Manga
manga.title : String
Main title string based on global locale
Kind: instance property of Manga
manga.altTitles : Array.<String>
Alt titles array based on global locale
Kind: instance property of Manga
manga.description : String
Description string based on global locale
Kind: instance property of Manga
manga.getCovers() ⇒ Promise.<Array.<Cover>>
Returns all covers for this manga
Kind: instance method of Manga
manga.getFeed(parameterObject) ⇒ Promise.<Array.<Chapter>>
Returns a feed of the most recent chapters of this manga
Kind: instance method of Manga
Param | Type | Description |
---|---|---|
parameterObject | FeedParameterObject | Number | Either a parameter object or a number representing the limit |
manga.addToList(list) ⇒ Promise.<void>
Adds this manga to a list
Kind: instance method of Manga
Param | Type |
---|---|
list | List | String |
manga.getReadingStatus() ⇒ Promise.<('reading'|'on_hold'|'plan_to_read'|'dropped'|'re_reading'|'completed')>
Retrieves the logged in user's reading status for this manga. If there is no status, null is returned
Kind: instance method of Manga
manga.setReadingStatus(status) ⇒ Promise.<void>
Sets the logged in user's reading status for this manga. Call without arguments to clear the reading status
Kind: instance method of Manga
Param | Type | Default |
---|---|---|
status | 'reading' | 'on_hold' | 'plan_to_read' | 'dropped' | 're_reading' | 'completed' |
manga.changeFollowship(follow) ⇒ Promise.<Manga>
Makes the logged in user either follow or unfollow this manga
Kind: instance method of Manga
Param | Type | Default | Description |
---|---|---|---|
follow | Boolean | true | True to follow, false to unfollow |
manga.getReadChapters() ⇒ Promise.<Array.<Chapter>>
Returns an array of every chapter that has been marked as read for this manga
Kind: instance method of Manga
Manga.search(searchParameters) ⇒ Promise.<Array.<Manga>>
Peforms a search and returns an array of manga. https://api.mangadex.org/docs.html#operation/get-search-manga
Kind: static method of Manga
Param | Type | Description |
---|---|---|
searchParameters | MangaParameterObject | String | An object of offical search parameters, or a string representing the title |
Manga.get(id) ⇒ Promise.<Manga>
Retrieves and returns a manga by its id
Kind: static method of Manga
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
Manga.getByQuery(searchParameters) ⇒ Promise.<Manga>
Performs a search for one manga and returns that manga
Kind: static method of Manga
Param | Type | Description |
---|---|---|
searchParameters | MangaParameterObject | String | An object of offical search parameters, or a string representing the title |
Manga.getFeed(id, parameterObject) ⇒ Promise.<Array.<Chapter>>
Returns a feed of the most recent chapters of this manga
Kind: static method of Manga
Param | Type | Description |
---|---|---|
id | String | |
parameterObject | FeedParameterObject | Number | Either a parameter object or a number representing the limit |
Manga.getRandom() ⇒ Promise.<Manga>
Returns one random manga
Kind: static method of Manga
Manga.getFollowedManga(limit, offset) ⇒ Promise.<Array.<Manga>>
Returns all manga followed by the logged in user
Kind: static method of Manga
Param | Type | Default | Description |
---|---|---|---|
limit | Number | 100 | Amount of manga to return (0 to Infinity) |
offset | Number | 0 | How many manga to skip before returning |
Manga.getTag(indentity) ⇒ Promise.<Tag>
Retrieves a tag object based on its id or name ('Oneshot', 'Thriller,' etc). The result of every available tag is cached, so subsequent tag requests will have no delay https://api.mangadex.org/docs.html#operation/get-manga-tag
Kind: static method of Manga
Param | Type |
---|---|
indentity | String |
Manga.getAllTags() ⇒ Promise.<Array.<Tag>>
Returns an array of every tag available on Mangadex right now. The result is cached, so subsequent tag requests will have no delay https://api.mangadex.org/docs.html#operation/get-manga-tag
Kind: static method of Manga
Manga.getReadingStatus(id) ⇒ Promise.<('reading'|'on_hold'|'plan_to_read'|'dropped'|'re_reading'|'completed')>
Retrieves the logged in user's reading status for a manga. If there is no status, null is returned
Kind: static method of Manga
Param | Type |
---|---|
id | String |
Manga.setReadingStatus(id, status) ⇒ Promise.<void>
Sets the logged in user's reading status for this manga. Call without arguments to clear the reading status
Kind: static method of Manga
Param | Type | Default |
---|---|---|
id | String | |
status | 'reading' | 'on_hold' | 'plan_to_read' | 'dropped' | 're_reading' | 'completed' |
Manga.getFollowedFeed(parameterObject) ⇒ Promise.<Array.<Chapter>>
Gets the combined feed of every manga followed by the logged in user
Kind: static method of Manga
Param | Type | Description |
---|---|---|
parameterObject | FeedParameterObject | Number | Either a parameter object or a number representing the limit |
Manga.changeFollowship(id, follow) ⇒ Promise.<void>
Makes the logged in user either follow or unfollow a manga
Kind: static method of Manga
Param | Type | Default | Description |
---|---|---|---|
id | String | ||
follow | Boolean | true | True to follow, false to unfollow |
Manga.getReadChapters(...ids) ⇒ Promise.<Array.<Chapter>>
Retrieves the read chapters for multiple manga
Kind: static method of Manga
Param | Type |
---|---|
...ids | String |
Manga.getCovers(...id) ⇒ Promise.<Array.<Cover>>
Returns all covers for a manga
Kind: static method of Manga
Param | Type | Description |
---|---|---|
...id | String | Manga | Manga id(s) |
User
Represents an user https://api.mangadex.org/docs.html#tag/User
Kind: global class
- User
- new User(context)
- instance
- .id : String
- .username : String
- .chapters : Array.<Relationship>
- static
- .get(id) ⇒ Promise.<User>
- .getFollowedUsers([limit], [offset]) ⇒ Promise.<Array.<User>>
- .getLoggedInUser() ⇒ Promise.<User>
new User(context)
There is no reason to directly create a user object. Use static methods, ie 'get()'.
Param | Type | Description |
---|---|---|
context | Object | String | Either an API response or Mangadex id |
user.id : String
Mangadex id for this object
Kind: instance property of User
user.username : String
Username of this user
Kind: instance property of User
user.chapters : Array.<Relationship>
Relationships to chapters attributed to this user
Kind: instance property of User
User.get(id) ⇒ Promise.<User>
Retrieves and returns a user by its id
Kind: static method of User
Param | Type | Description |
---|---|---|
id | String | Mangadex id |
User.getFollowedUsers(limit, offset) ⇒ Promise.<Array.<User>>
Returns all users followed by the logged in user
Kind: static method of User
Param | Type | Default | Description |
---|---|---|---|
limit | Number | 100 | Amount of users to return (0 to Infinity) |
offset | Number | 0 | How many users to skip before returning |
User.getLoggedInUser() ⇒ Promise.<User>
Returns the logged in user as a user object
Kind: static method of User
Links
Represents the links that represent manga on different websites https://api.mangadex.org/docs.html#section/Static-data/Manga-links-data
Kind: global class
links.al : String
Anilist (https://anilist.co) link to manga
Kind: instance property of Links
links.ap : String
AnimePlanet (https://anime-planet.com) link to manga
Kind: instance property of Links
links.bw : String
Bookwalker (https://bookwalker.jp/) link to manga
Kind: instance property of Links
links.mu : String
Mangaupdates (https://mangaupdates.com) link to manga
Kind: instance property of Links
links.nu : String
Novelupdates (https://novelupdates.com) link to manga
Kind: instance property of Links
links.mal : String
MyAnimeList (https://myanimelist.net) link to manga
Kind: instance property of Links
links.kt : String
Kitsu (https://kitsu.io) link to manga
Kind: instance property of Links
links.amz : String
Amazon (https://amazon.com) link to manga
Kind: instance property of Links
links.ebj : String
EBookJapan (https://ebookjapan.yahoo.co.jp) link to manga
Kind: instance property of Links
links.raw : String
Link to manga raws
Kind: instance property of Links
links.engtl : String
Link to offical english manga translation
Kind: instance property of Links
links.cdj : String
CDJapan (https://www.cdjapan.co.jp/) link to manga
Kind: instance property of Links
links.availableLinks : Array.<String>
All of the links that have valid values
Kind: instance property of Links
LocalizedString
Represents a string, but in different languages. Generates properties for each language available (ie you can index with language codes through localizedString'en' or localizedString.jp)
Kind: global class
- LocalizedString
- .availableLocales : Array.<String>
- .localString ⇒ String
localizedString.availableLocales : Array.<String>
Array with all locales with values in this object
Kind: instance property of LocalizedString
localizedString.localString ⇒ String
String from global locale setting (setGlobalLocale)
Kind: instance property of LocalizedString
Relationship
Represents a relationship from one Mangadex object to another such as a manga, author, etc via its id.
Kind: global class
- Relationship
- .id : String
- .type : String
- .resolve() ⇒ Promise.<(Manga|Author|Chapter|User|Group|List|Cover)>
relationship.id : String
Id of the object this is a relationship to
Kind: instance property of Relationship
relationship.type : String
The type of the object this is a relationship to
Kind: instance property of Relationship
relationship.resolve() ⇒ Promise.<(Manga|Author|Chapter|User|Group|List|Cover)>
This function must be called to return the proper and complete object representation of this relationship. Essentially, it calls and returns Manga.get(), Author.get(), Cover.get(), etc.
Kind: instance method of Relationship
APIRequestError
This error respresents when the API responds with an error or invalid response. In other words, this error represents 400 and 500 status code responses.
Kind: global class
- APIRequestError
- new APIRequestError(reason, code, ...params)
- .OTHER : Number
- .AUTHORIZATION : Number
- .INVALID_REQUEST : Number
- .INVALID_RESPONSE : Number
- .code : Number
- .name : String
- .message : String
new APIRequestError(reason, code, ...params)
Param | Type | Default | Description |
---|---|---|---|
reason | String | Object | Unknown Request Error | An error message or response from the API |
code | Number | 0 | |
...params | any |
apiRequestError.OTHER : Number
Kind: instance property of APIRequestError
apiRequestError.AUTHORIZATION : Number
Kind: instance property of APIRequestError
apiRequestError.INVALID_REQUEST : Number
Kind: instance property of APIRequestError
apiRequestError.INVALID_RESPONSE : Number
Kind: instance property of APIRequestError
apiRequestError.code : Number
What type of error is this? AUTHORIZATION, INVALID_RESPONSE, etc.
Kind: instance property of APIRequestError
apiRequestError.name : String
Kind: instance property of APIRequestError
apiRequestError.message : String
Kind: instance property of APIRequestError
Tag
Represents a manga tag
Kind: global class
- Tag
- .cache : Array.<Tag>
- .id : String
- .localizedName : LocalizedString
- .localizedDescription : LocalizedString
- .group : String
- .name : String
- .description : String
tag.cache : Array.<Tag>
A cached response from https://api.mangadex.org/manga/tag
Kind: instance property of Tag
tag.id : String
Mangadex id of this tag
Kind: instance property of Tag
tag.localizedName : LocalizedString
Name with different localization options
Kind: instance property of Tag
tag.localizedDescription : LocalizedString
Description with different localization options
Kind: instance property of Tag
tag.group : String
What type of tag group this tag belongs to
Kind: instance property of Tag
tag.name : String
Name string based on global locale
Kind: instance property of Tag
tag.description : String
Description string based on global locale
Kind: instance property of Tag
convertLegacyId(type, ...ids) ⇒ Promise.<Array.<String>>
Converts old (pre v5, numeric ids) Mangadex ids to v5 ids. Any invalid legacy ids will be skipped by Mangadex when remapping, so call this function for each individual id if this is an issue.
Kind: global function
Param | Type | Description |
---|---|---|
type | 'group' | 'manga' | 'chapter' | 'tag' | Type of id |
...ids | Number | Array.<Number> | Array of ids to convert |
setGlobalLocale(newLocale)
Sets the global locaization for LocalizedStrings. Uses 2-letter Mangadex region codes.
Kind: global function
Param | Type |
---|---|
newLocale | String |
login(username, password, cacheLocation) ⇒ Promise.<void>
Required for authorization https://api.mangadex.org/docs.html#operation/post-auth-login
Kind: global function
Param | Type | Description |
---|---|---|
username | String | |
password | String | |
cacheLocation | String | File location to store the persistent token (Warning: saved in plaintext) |
Documentation created with jsdoc2md
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago