mangadex-full-api - v6.2.0
    Preparing search index...

    Class Manga

    This class represents a specific manga series. There are many static methods for requesting manga from MangaDex.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    altTitles: LocalizedString[]

    List of alternate titles with different localization options

    artists: Relationship<Author>[]

    List of relationships to artists attributed to this manga

    authors: Relationship<Author>[]

    List of relationships to authors attributed to this manga

    availableTranslatedLanguages: string[]

    List of language codes that this manga has translated chapters for

    chapterNumbersResetOnNewVolume: boolean

    Does the chapter count reset whenever a new volume is added?

    contentRating: "safe" | "suggestive" | "erotica" | "pornographic"

    The content rating of this manga

    createdAt: Date

    Date the manga was added to the site

    creator: Relationship<User> | null

    The user that created this manga, if known.

    description: LocalizedString

    Description with different localization options

    id: string

    The MangaDex UUID of this manga

    isLocked: boolean

    Is this manga locked?

    lastChapter: string | null

    This manga's last chapter based on the default feed order

    lastVolume: string | null

    This manga's last volume based on the default feed order

    latestUploadedChapter: Relationship<Chapter> | null

    Relationship to the latest chapter. Null if there is no latest chapter.

    links: Links

    Link object representing links to other websites about this manga

    mainCover: Relationship<Cover>

    A relationship to the current main cover of this series

    originalLanguage: string

    2 (or more) letter code for the original language of this manga

    publicationDemographic: "shounen" | "shoujo" | "josei" | "seinen" | null

    Publication demographic of this manga

    relatedManga: RelatedManga

    An object containing all other manga entries related to this one. This includes spin-offs, colorization, etc.

    state: "rejected" | "draft" | "submitted" | "published"

    Status of this manga as a manga submission

    status: "completed" | "ongoing" | "cancelled" | "hiatus"

    Publication/Scanlation status of this manga

    tags: Tag[]

    List of this manga's genre tags

    The manga's main title with different localization options

    updatedAt: Date

    Date the manga was last updated

    version: number

    The version of this manga (incremented by updating manga data)

    year: number | null

    Year of this manga's publication

    Accessors

    Methods

    • Creates a relation (eg sequel/prequel, monochrome/colored, spin-off, etc) between this manga and another

      Parameters

      • targetId: string

        The target manga for the relation (eg the sequel, spin-off, etc)

      • relationType:
            | "monochrome"
            | "main_story"
            | "adapted_from"
            | "based_on"
            | "prequel"
            | "side_story"
            | "doujinshi"
            | "same_franchise"
            | "shared_universe"
            | "sequel"
            | "spin_off"
            | "alternate_story"
            | "alternate_version"
            | "preserialization"
            | "colored"
            | "serialization"

      Returns Promise<void>

    • Makes the user follow or unfollow this manga

      Parameters

      • follow: boolean = true

      Returns Promise<void>

    • Returns an abridged list of chapter ids for this manga separated by their volumes

      Parameters

      • Optionalgroups: string[] | Group[]
      • Optionallanguages: string[]

      Returns Promise<
          Required<
              {
                  [key: string]: Required<
                      {
                          chapters: Record<
                              string,
                              { chapter?: string; count?: number; id?: string; others?: string[] },
                          >;
                          count: number;
                          volume: string;
                      },
                  >;
              },
          >,
      >

    • Gets the reading status (eg completed, reading, dropped, etc) for this manga for the currently authenticated user

      Returns Promise<
          | "completed"
          | "reading"
          | "on_hold"
          | "plan_to_read"
          | "dropped"
          | "re_reading",
      >

    • Gets the statistics about this manga including its rating distribution, comment count, and follow count

      Returns Promise<
          Required<
              {
                  comments: StatisticsDetailsCommentsSchema;
                  follows: number;
                  rating: Required<{ average: number | null; bayesian: number }>;
              },
          >,
      >

    • Returns the rating that the currently authenticated user gave to this manga on a scale of 1-10, or returns null if there is no rating.

      Returns Promise<number | null>

    • Makes the currently authenticated user give this manga a rating between 1-10 (inclusive).

      Parameters

      • rating: number

      Returns Promise<void>

    • Removes the currently authenticated user's rating for this manga

      Returns Promise<void>

    • Removes a relation from this manga by the relation's id

      Parameters

      • relationId: string

      Returns Promise<void>

    • Sets this manga's reading status (eg completed, reading, dropped, etc) for the currently authenticated user. If the status is null, the current reading status will be removed.

      Parameters

      • status:
            | "completed"
            | "reading"
            | "on_hold"
            | "plan_to_read"
            | "dropped"
            | "re_reading"
            | null

      Returns Promise<void>

    • Marks lists of chapters read or unread for this manga

      Parameters

      • chapters: { read?: (string | Chapter)[]; unread?: (string | Chapter)[] }
      • updateHistory: boolean = false

      Returns Promise<never[] | undefined>

    • Creates a relation between two manga (eg sequel/prequel, monochrome/colored, spin-off, etc)

      Parameters

      • id: string

        The origin manga

      • targetId: string

        The target manga for the relation (eg the sequel, spin-off, etc)

      • relationType:
            | "monochrome"
            | "main_story"
            | "adapted_from"
            | "based_on"
            | "prequel"
            | "side_story"
            | "doujinshi"
            | "same_franchise"
            | "shared_universe"
            | "sequel"
            | "spin_off"
            | "alternate_story"
            | "alternate_version"
            | "preserialization"
            | "colored"
            | "serialization"

      Returns Promise<void>

    • Makes the logged in user follow or unfollow a manga

      Parameters

      • id: string
      • follow: boolean = true

      Returns Promise<void>

    • Converts legacy pre-V5 MangaDex ids to modern UUIDs. Returns a record with legacy ids as the keys and new ids as the values.

      Parameters

      • type: "group" | "manga" | "chapter" | "tag"
      • ids: number[]

      Returns Promise<Record<number, string>>

    • Deletes a manga by its id

      Parameters

      • id: string

      Returns Promise<void>

    • Returns an abridged list of chapter ids for a manga separated by their volumes

      Parameters

      • id: string
      • Optionalgroups: string[] | Group[]
      • Optionallanguages: string[]

      Returns Promise<
          Required<
              {
                  [key: string]: Required<
                      {
                          chapters: Record<
                              string,
                              { chapter?: string; count?: number; id?: string; others?: string[] },
                          >;
                          count: number;
                          volume: string;
                      },
                  >;
              },
          >,
      >

    • Get every reading status (eg completed, reading, dropped, etc) for every manga marked by the currently authenticated user.

      Parameters

      • Optionalfilter: "completed" | "reading" | "on_hold" | "plan_to_read" | "dropped" | "re_reading"

        If specified, only manga with this status will be returned

      Returns Promise<
          Record<
              string,
              | "completed"
              | "reading"
              | "on_hold"
              | "plan_to_read"
              | "dropped"
              | "re_reading",
          >,
      >

    • Returns an array of read chapters for a list of manga. The response is a record with the manga ids as the keys and chapter arrays as the values.

      Parameters

      Returns Promise<Record<string, Chapter[]>>

    • Gets the reading status (eg completed, reading, dropped, etc) for a manga for the currently authenticated user

      Parameters

      • id: string

      Returns Promise<
          | "completed"
          | "reading"
          | "on_hold"
          | "plan_to_read"
          | "dropped"
          | "re_reading",
      >

    • Gets the statistics about manga including their rating distribution, comment count, and follow count

      Parameters

      Returns Promise<
          Record<
              string,
              Required<
                  {
                      comments: StatisticsDetailsCommentsSchema;
                      follows: number;
                      rating: Required<{ average: number | null; bayesian: number }>;
                  },
              >,
          >,
      >

    • Returns a record of all ratings given by the currently authenticated user. The object is indexed by the manga ids and each value contains the numerical rating and when that rating was given. If a manga has no rating, 'null' is used as the value.

      Parameters

      Returns Promise<Record<string, { createdAt: Date; rating: number } | null>>

    • Makes the currently authenticated user give a manga a rating between 1-10 (inclusive).

      Parameters

      • mangaId: string
      • rating: number

      Returns Promise<void>

    • Removes the currently authenticated user's rating for a manga

      Parameters

      • mangaId: string

      Returns Promise<void>

    • Removes a relation from a manga by the relation's id

      Parameters

      • mangaId: string
      • relationId: string

      Returns Promise<void>

    • Sets a manga's reading status (eg completed, reading, dropped, etc) for the currently authenticated user. If the status is null, the current reading status will be removed.

      Parameters

      • id: string
      • status:
            | "completed"
            | "reading"
            | "on_hold"
            | "plan_to_read"
            | "dropped"
            | "re_reading"
            | null

      Returns Promise<void>

    • Marks lists of chapters read or unread for a single manga

      Parameters

      • manga: string
      • chapters: { read?: (string | Chapter)[]; unread?: (string | Chapter)[] }
      • updateHistory: boolean = false

      Returns Promise<never[] | undefined>