5.12.1 • Published 4 months ago

mangadex-full-api v5.12.1

Weekly downloads
219
License
MIT
Repository
github
Last release
4 months ago

MangaDex Full API

An unofficial MangaDex API built with the official JSON API.

Documentation

Version License Downloads

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

new Author(context)

There is no reason to directly create an author object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDescription
searchParametersAuthorParameterObject | StringAn 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

ParamTypeDescription
idStringMangadex id

Author.getByQuery(searchParameters) ⇒ Promise.<Author>

Performs a search for one author and returns that author

Kind: static method of Author

ParamTypeDescription
searchParametersAuthorParameterObject | StringAn 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

new Chapter(context)

There is no reason to directly create a chapter object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDefaultDescription
saverBooleanfalseUse data saver images?

chapter.changeReadMarker(read) ⇒ Promise.<Chapter>

Marks this chapter as either read or unread

Kind: instance method of Chapter

ParamTypeDefaultDescription
readBooleantrueTrue 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

ParamTypeDescription
searchParametersChapterParameterObject | StringAn 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

ParamTypeDescription
idStringMangadex id

Chapter.getByQuery(searchParameters) ⇒ Promise.<Chapter>

Performs a search for one chapter and returns that chapter

Kind: static method of Chapter

ParamTypeDescription
searchParametersChapterParameterObject | StringAn 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

ParamTypeDefaultDescription
idString
readBooleantrueTrue 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

new Cover(context)

There is no reason to directly create a cover art object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDescription
idStringMangadex 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

ParamType
searchParametersCoverParameterObject

Cover.getByQuery(searchParameters) ⇒ Promise.<Cover>

Performs a search for one manga and returns that manga

Kind: static method of Cover

ParamType
searchParametersCoverParameterObject

Cover.getMangaCovers(...manga) ⇒ Promise.<Array.<Cover>>

Get an array of manga's covers

Kind: static method of Cover

ParamType
...mangaString | Manga

Group

Represents a scanlation group https://api.mangadex.org/docs.html#tag/Group

Kind: global class

new Group(context)

There is no reason to directly create a group object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDescription
searchParametersGroupParameterObject | StringAn 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

ParamTypeDescription
idStringMangadex id

Group.getByQuery(searchParameters) ⇒ Promise.<Group>

Performs a search for one group and returns that group

Kind: static method of Group

ParamTypeDescription
searchParametersGroupParameterObject | StringAn 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

ParamTypeDefaultDescription
limitNumber100Amount of groups to return (0 to Infinity)
offsetNumber0How 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

new List(context)

There is no reason to directly create a custom list object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDescription
parameterObjectFeedParameterObjectInformation 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

ParamType
newNameString

list.changeVisibility(newVis) ⇒ Promise.<List>

Changes the visibility a custom list. Must be logged in

Kind: instance method of List

ParamTypeDescription
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

ParamType
newListArray.<Manga> | Array.<String>

list.addManga(manga) ⇒ Promise.<List>

Adds a manga to this list

Kind: instance method of List

ParamType
mangaManga | String

list.removeManga(manga) ⇒ Promise.<List>

Removes a manga from this list

Kind: instance method of List

ParamType
mangaManga | String

List.get(id) ⇒ Promise.<List>

Retrieves and returns a list by its id

Kind: static method of List

ParamTypeDescription
idStringMangadex id

List.create(name, manga, visibility) ⇒ Promise.<List>

Create a new custom list. Must be logged in

Kind: static method of List

ParamTypeDefault
nameString
mangaArray.<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

ParamType
idString

List.addManga(listId, manga) ⇒ Promise.<void>

Adds a manga to a custom list. Must be logged in

Kind: static method of List

ParamType
listIdString
mangaManga | String

List.removeManga(listId, manga) ⇒ Promise.<void>

Removes a manga from a custom list. Must be logged in

Kind: static method of List

ParamType
listIdString
mangaManga | 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

ParamTypeDescription
idStringMangadex id of the list
parameterObjectFeedParameterObjectInformation on which chapters to be returned

Manga

Represents a manga object https://api.mangadex.org/docs.html#tag/Manga

Kind: global class

new Manga(context)

There is no reason to directly create a manga object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDescription
parameterObjectFeedParameterObject | NumberEither 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

ParamType
listList | 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

ParamTypeDefault
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

ParamTypeDefaultDescription
followBooleantrueTrue 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

ParamTypeDescription
searchParametersMangaParameterObject | StringAn 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

ParamTypeDescription
idStringMangadex id

Manga.getByQuery(searchParameters) ⇒ Promise.<Manga>

Performs a search for one manga and returns that manga

Kind: static method of Manga

ParamTypeDescription
searchParametersMangaParameterObject | StringAn 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

ParamTypeDescription
idString
parameterObjectFeedParameterObject | NumberEither 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

ParamTypeDefaultDescription
limitNumber100Amount of manga to return (0 to Infinity)
offsetNumber0How 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

ParamType
indentityString

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

ParamType
idString

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

ParamTypeDefault
idString
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

ParamTypeDescription
parameterObjectFeedParameterObject | NumberEither 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

ParamTypeDefaultDescription
idString
followBooleantrueTrue to follow, false to unfollow

Manga.getReadChapters(...ids) ⇒ Promise.<Array.<Chapter>>

Retrieves the read chapters for multiple manga

Kind: static method of Manga

ParamType
...idsString

Manga.getCovers(...id) ⇒ Promise.<Array.<Cover>>

Returns all covers for a manga

Kind: static method of Manga

ParamTypeDescription
...idString | MangaManga id(s)

User

Represents an user https://api.mangadex.org/docs.html#tag/User

Kind: global class

new User(context)

There is no reason to directly create a user object. Use static methods, ie 'get()'.

ParamTypeDescription
contextObject | StringEither 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

ParamTypeDescription
idStringMangadex id

User.getFollowedUsers(limit, offset) ⇒ Promise.<Array.<User>>

Returns all users followed by the logged in user

Kind: static method of User

ParamTypeDefaultDescription
limitNumber100Amount of users to return (0 to Infinity)
offsetNumber0How 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>

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

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

new APIRequestError(reason, code, ...params)

ParamTypeDefaultDescription
reasonString | ObjectUnknown Request ErrorAn error message or response from the API
codeNumber0
...paramsany

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>

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

ParamTypeDescription
type'group' | 'manga' | 'chapter' | 'tag'Type of id
...idsNumber | Array.<Number>Array of ids to convert

setGlobalLocale(newLocale)

Sets the global locaization for LocalizedStrings. Uses 2-letter Mangadex region codes.

Kind: global function

ParamType
newLocaleString

login(username, password, cacheLocation) ⇒ Promise.<void>

Required for authorization https://api.mangadex.org/docs.html#operation/post-auth-login

Kind: global function

ParamTypeDescription
usernameString
passwordString
cacheLocationStringFile location to store the persistent token (Warning: saved in plaintext)

Documentation created with jsdoc2md

6.0.0-beta.0

4 months ago

5.12.1

2 years ago

5.11.1

2 years ago

5.11.0

2 years ago

5.8.0

2 years ago

5.10.0

2 years ago

5.9.0

2 years ago

5.7.0

3 years ago

5.6.1

3 years ago

5.6.0

3 years ago

5.5.1

3 years ago

5.5.0

3 years ago

5.4.0

3 years ago

5.3.0

3 years ago

5.2.0

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

5.0.0-rc1

3 years ago

4.4.0

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.10.0

4 years ago

3.9.0

4 years ago

3.8.0

4 years ago

3.7.0

4 years ago

3.6.2

4 years ago

3.6.1

4 years ago

3.6.0

4 years ago

3.5.0

4 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

1.0.2

5 years ago