mangadex_library library

A simple library to facilitate easier access to the mangadex REST API (https://api.mangadex.org) for flutter and dart apps

mangadex_library is in no way officially affiliated or recommended by mangadex.

Properties

authority String
final

Functions

addMangaToCustomList(String sessionToken, String mangaId, String listId) Future<Result>
Adds a manga identified by it's mangaId / UUID to a custom list identified by it's listId if the user identified by the sessionToken has the permission to do so and returns a Result class instance containing info on whether the request was successful.
addMangaToCustomListResponse(String sessionToken, String mangaId, String listId) Future<Response>
Adds a manga identified by it's mangaId / UUID to a custom list identified by it's listId if the user identified by the sessionToken has the permission to do so and returns a http response.
checkIfUserFollowsGroup(String sessionToken, String groupId) Future<bool>
Simply check if the user identified by the current session sessionToken follows a Group with groupId or uuid and return a http response
checkIfUserFollowsGroupResponse(String sessionToken, String groupId) Future<Response>
Simply check if the user identified by the current session sessionToken follows a Group with groupId or uuid and return a http response
checkIfUserFollowsManga(String sessionToken, String mangaId) Future<bool>
Simply check if the user identified by the current session sessionToken follows a manga with mangaId or uuid and return a boolean
checkIfUserFollowsMangaResponse(String sessionToken, String mangaId) Future<Response>
Simply check if the user identified by the current session sessionToken follows a manga with mangaId or uuid and return a http response
checkIfUserFollowsUser(String sessionToken, String userId) Future<bool>
Simply check if the user identified by the current session sessionToken follows a User with userId or uuid and return a bool
checkIfUserFollowsUserResponse(String sessionToken, String userId) Future<Response>
Returns a http response of whether the user identified by the current session sessionToken follows a User with userId or uuid and return a http response
checkToken(String sessionToken) Future<AuthenticationCheck>
Returns an AuthenticationCheck class instance with data on whether the sessionToken is authenticated and the user's permissions.
checkTokenResponse(String sessionToken) Future<Response>
Returns an http response with data on whether the sessionToken is authenticated and the user has permissions.
constructPageUrl(String baseUrl, bool dataSaver, String chapterHash, String filename) String
Uses baseUrl, sessionToken, chapterHash and filename and returns a String containing the full constructed address to the page base url can be obtained from the getBaseUrl function, the token using the login() function chapterHash and filename can both be obtained via getChapterDataByChapterId
createCustomList(String sessionToken, String listName, Visibility visibility, List<String> mangaIds, int version) Future<SingleCustomListResponse>
Creates a custom list with the name listName and sets visibility to either Visibility.private or Visibility.public and adds all mangas IDs / UUIDs in the mangaIds list and returns a SingleCustomListResponse class instance containing data of the list created.
createCustomListResponse(String sessionToken, String listName, Visibility visibility, List<String> mangaIds, int version) Future<Response>
Creates a custom list with the name listName and sets visibility to either Visibility.private or Visibility.public and adds all mangas IDs / UUIDs in the mangaIds list and returns a http response containing data of the list created.
createScanlationGroup({required String name, required String website, required String ircServer, required String ircChannel, required String discord, required String contactEmail, required String description, required String twitter, required String mangaUpdates, required bool inactive, required String publishDelay, required String sessionToken}) Future<Scanlation>
Creates a Scanlation Group managed by the user identified by it's sessionToken or UUID and returns an http response containing the group's information after being created.
createScanlationGroupResponse(String name, String website, String ircServer, String ircChannel, String discord, String contactEmail, String description, String twitter, String mangaUpdates, bool inactive, String publishDelay, String sessionToken) Future<Response>
Creates a Scanlation Group managed by the user identified by it's sessionToken or UUID and returns an http response containing the group's information after being created.
deleteCustomList(String sessionToken, String listId) Future<Result>
Deletes a list identified by it's listId only if the user identified by the sessionToken is eligible to do so and retuns a Result instance containing info on whether the request was successful.
deleteCustomListResponse(String sessionToken, String listId) Future<Response>
Deletes a list identified by it's listId only if the user identified by the sessionToken is eligible to do so and retuns a http response.
followCustomList(String sessionToken, String listId) Future<Result>
Makes the user identified by the sessionToken follow a custom list identified by it's listId and returns a Result class instance containing info on whether the request was successful.
followCustomListResponse(String sessionToken, String listId) Future<Response>
Makes the user identified by the sessionToken follow a custom list identified by it's listId and returns a http response.
followManga(String sessionToken, String mangaId, {ReadingStatus? readingStatus}) Future<Result>
Follow a manga identified by mangaId and optionally set a reading status for it.
getAllMangaReadingStatusResponse(String sessionToken, String? status) Future<Response>
Returns a http response containing all reading statuses of all manga followed by the user identified by the sessionToken The sessionToken can be obtained using the login() function.
getAllReadChapters(String sessionToken, String mangaId) Future<ReadChapters>
Returns a ReadChapters class instance containing details of all read chapters of a manga
getAllReadChaptersForAListOfManga(String sessionToken, List<String> mangaIds) Future<Response>
Returns a http response with details of all read chapters in the list of given mangaIds or uuids, please note it returns a http response since the response is not always of the same schema.
getAllUserMangaReadingStatus(String sessionToken, {ReadingStatus? readingStatus}) Future<AllMangaReadingStatus>
Returns a AllMangaReadingStatus class instance containing all reading statuses of all manga followed by the user identified by the sessionToken The sessionToken can be obtained using the login() function.
getAuthorById(String authorId) Future<AuthorInfo>
Get details of an author identified by the author's authorId or UUID nad return the data in an AuthorInfo class instance.
getAuthorByIdResponse(String authorId) Future<Response>
Get details of an author identified by the author's authorId or UUID nad return the data as an http response.
getBaseUrl(String chapterId) Future<BaseUrl>
gets base URL of a chapter with the given chapterId or uuid Returns the Base Url data in a BaseUrl class instance
getBaseUrlResponse(String chapterId) Future<Response>
Returns a http response of Base URL for chapterId or uuid
getChapterDataByChapterId(String chapterId) Future<SingleChapterData>
gets details of a manga with the given chapterId or uuid Returns the manga data in a SingleChapterData class instance
getChapterFilenames(String chapterId, bool isDataSaverMode) Future<List<String>>
Gets the chapter filenames just using the chapterId of a chapter. returns a List of String containing all the file names of a chapter.
getChapters(String mangaId, {List<String>? ids, String? title, List<String>? groups, String? uploader, String? volume, String? chapter, List<LanguageCodes>? translatedLanguage, List<LanguageCodes>? originalLanguage, List<LanguageCodes>? excludedOriginalLanguage, List<ContentRating>? contentRating, String? createdAtSince, String? updatedAtSince, String? publishedAtSince, String? includes, Map<ChapterOrders, OrderDirections>? orders, int? limit, int? offset}) Future<ChapterData>
gets limit number of chapters and their data for the given mangaId or uuid, mangas can be filtered by their groups, uploader, volume, or chapter.
getChaptersResponse(String mangaId, {List<String>? ids, String? title, List<String>? groups, String? uploader, String? volume, String? chapter, List<LanguageCodes>? translatedLanguage, List<LanguageCodes>? originalLanguage, List<LanguageCodes>? excludedOriginalLanguage, List<ContentRating>? contentRating, String? createdAtSince, String? updatedAtSince, String? publishedAtSince, String? includes, Map<ChapterOrders, OrderDirections>? orders, int? limit, int? offset}) Future<Response>
Returns the http response of a list of chapters for mangaId
getCoverArt(List<String> mangaIds, {List<String>? coverIds, List<String>? uploaders, List<String>? locales, Map<CoverOrders, OrderDirections>? order, int? limit, int? offset}) Future<Cover>
returns an Cover class instance containing cover art details for a manga with given mangaIds or uuid
getCoverArtResponse(List<String> mangaIds, [List<String>? coverIds, List<String>? uploaders, List<String>? locales, Map<CoverOrders, OrderDirections>? orders, int? limit, int? offset]) Future<Response>
returns a https response with cover art details for a manga with given mangaIds or uuid, it can also take multiple coverIds and get their details at once, cover arts can also be filtered by a list of uploaders and locales
getLoggedInUserCustomLists(String sessionToken, int? limit, int? offset) Future<SingleCustomListResponse>
Gets the limit number of custom lists from offset in the list of Custom Lists of the user identified by the sessionToken and returns a SingleCustomListResponse class instance containing all the lists and their data.
getLoggedInUserCustomListsResponse(String sessionToken, int? limit, int? offset) Future<Response>
Gets the limit number of custom lists from offset in the list of Custom Lists of the user identified by the sessionToken and returns a http response containing the data.
getLoggedUserDetails(String sessionToken) Future<UserDetails>
Gets the account details of the user and returns the data in a UserDetails class instance
getLoggedUserDetailsResponse(String sessionToken) Future<Response>
Returns a http response of the user details associated with the sessionToken
getMangaAggregate(String mangaId, {List<String>? groupIds, List<LanguageCodes>? translatedLanguages}) Future<Aggregate>
Gets response of manga chapter and volume info of a manga identified by it's mangaId, which can be filtered by groupIds and translatedLanguages
getMangaAggregateResponse(String mangaId, {List<String>? groupIds, List<LanguageCodes>? translatedLanguages}) Future<Response>
Gets response of manga chapter and volume info of a manga identified by it's mangaId, which can be filtered by groupIds and translatedLanguages
getMangaDataByMangaId(String mangaId) Future<SingleMangaData>
gets details of a manga with the given mangaId or uuid Returns the manga data in a SingleMangaData class instance
getMangaReadingStatus(String sessionToken, String mangaId) Future<MangaReadingStatus>
Returns a MangaReadingStatus class instance containing the reading status of a particular manga identified by mangaId or uuid
getRefreshResponse(String refreshToken) Future<Response>
Takes in a refreshToken token and returns a http response of a new refresh token
getScanlationGroup({int? limit, int? offset, List<String>? ids, String? name, LanguageCodes? focussedLanguage, List<String>? includes, Map<ScanlationOrders, OrderDirections>? order}) Future<ScanlationsResult>
Search for a scanlation group with the name and returns limit number of results from offset which may focus on the given focussedLanguage and returns a ScanlationsResult class instance that contains all the information.
getScanlationGroupById(String groupId) Future<Scanlation>
Returns an Scanlation class instance containing info of a Scanlation Group identified by it's groupId or UUID
getScanlationGroupByIdResponse(String groupId) Future<Response>
Returns an http response containing info of a Scanlation Group identified by it's groupId or UUID
getScanlationGroupResponse({int? limit = 10, int? offset, List<String>? ids, String? name, LanguageCodes? focussedLanguage, List<String>? includes, Map<ScanlationOrders, OrderDirections>? order}) Future<Response>
Search for a scanlation group with the name and returns limit number of results from offset which may focus on the given focussedLanguage and returns a http response.
getSingleCustomList(String listId) Future<SingleCustomListResponse>
Gets the data of the customList identified by it's listId or list uuid and returns a SingleCustomListResponsecontaining the data.
getSingleCustomListResponse(String listId) Future<Response>
Gets the data of the custom list identified by it's listId or list uuid and returns a http response containing the data.
getUserCustomLists(String userId, int? limit, int? offset) Future<SingleCustomListResponse>
Get's limit number of PUBLIC custom lists of a user identified by it's userId counting from list offset and returns a SingleCustomListResponse class instance containing the details of the lists.
getUserCustomListsResponse(String userId, int? limit, int? offset) Future<Response>
Get's limit number of PUBLIC custom lists of a user identified by it's userId counting from list offset and returns a http response.
getUserFeed(String sessionToken) Future<UserFeed>
Gets the current User Feed for the user identified by sessionToken and returns the data in a UserFeed class instance.
getUserFeedResponse(String sessionToken) Future<Response>
Returns a http response containing the user feed for the user identified by the sessionToken.
getUserFollowedGroups(String sessionToken, int? offset, int? limit) Future<UserFollowedGroups>
Returns a UserFollowedGroups class instance with details of the all the Groups that the user follows, the sessionToken is the session token obtained using the login() function
getUserFollowedGroupsResponse(String sessionToken, {int? offset, int? limit}) Future<Response>
Returns a http response with details of the all the Groups that the user follows, the sessionToken is the session token obtained using the login() function
getUserFollowedManga(String sessionToken, {int? offset, int? limit}) Future<UserFollowedManga>
Returns a UserFollowedManga class instance of all the Manga the user follows, the sessionToken is the session token obtained using the login() function
getUserFollowedMangaResponse(String sessionToken, {int? offset, int? limit}) Future<Response>
Directly get Cover art details of a manga with mangaIds and return a Map<String, String> containing values with manga IDs mapped to their cover art filenames. Get a http response of the all the Manga user follows, the sessionToken is the session token obtained using the login() function
getUserFollowedUsers(String sessionToken, {int? offset, int? limit}) Future<UserFollowedUsers>
Returns a UserFollowedUsers class instance with details of the all the Users that the user follows, the sessionToken is the session token obtained using the login() function
getUserFollowedUsersResponse(String sessionToken, {int? offset, int? limit}) Future<Response>
Returns a http response of the all the Users that the user follows, the sessionToken is the session token obtained using thelogin function
login(String username, String password) Future<Login>
Returns the a Login class instance with a JWT session and refresh token for username.
loginResponse(String username, String password) Future<Response>
Returns the a http request of a JWT token for username.
logout(String sessionToken) Future<Result>
logoutResponse(String sessionToken) Future<Response>
markChapterRead(String sessionToken, String chapterId) Future<Result>
Mark a chapter identified by it's chapterId or uuid as READ

DEPRECATION WARNING: The end point POST /chapter/{id}/read is deprecated as is to be removed by 02-10-2022
Which makes this function deprecated and on schedule to be removed as well.
markChapterReadOrUnRead(String mangaId, String sessionToken, {List<String>? chapterIdsRead, List<String>? chapterIdsUnread}) Future<Result>
Marks a chapter of a manga identified by it's mangaId as read or unread for user identified by their sessionToken.
markChapterUnread(String sessionToken, String chapterId) Future<Result>
Mark a chapter identified by it's chapterId or uuid as UNREAD

DEPRECATION WARNING: The end point DELETE /chapter/{id}/read is deprecated as is to be removed by 2-10-2022
Which makes this function deprecated and on schedule to be removed as well.
markMultipleChaptersRead(String sessionToken, String mangaId, List<String> chapterIds) Future<Result>
Marks multiple chapters in the list of chapterIds or uuids as READ
markMultipleChaptersUnread(String sessionToken, String mangaId, List<String> chapterIds) Future<Result>
Marks multiple chapters in the list of chapterIds or uuids as UNREAD
refresh(String refreshToken) Future<Login>
Takes in a refresh token and returns a Login class instance containing the new token
removeMangaFromCustomList(String sessionToken, String mangaId, String listId) Future<Result>
Removes a manga identified by it's mangaId / UUID to a custom list identified by it's listId if the user identified by the sessionToken has the permission to do so and returns a Result class instance containing info on whether the request was successful.
removeMangaFromCustomListResponse(String sessionToken, String mangaId, String listId) Future<Response>
Removes a manga identified by it's mangaId / UUID to a custom list identified by it's listId if the user identified by the sessionToken has the permission to do so and returns a http response.
removeMangaReadingStatus(String sessionToken, String mangaId) Future<Result>
Set the reading status for a certain manga If no reading status is supplied to it, the reading status is set as 'reading'
reportImageStatus(String pageUrl, bool success, bool cached, int bytes, int duration) Future<void>
Report the mangadex at-home servers if a chapter page/image is unretrieveable
Gets manga search results takes in optional parameters to filter out content and returns the query data in a Search class instance
searchAuthor(String? name, int? limit, int? offset, List<String>? ids, List<String>? includes) Future<AuthorSearchResults>
Search for an author by the author's name and return limit number of results (10 by default) in an AuthorSearchResults class instance.
searchAuthorResponse(String? name, int? limit, int? offset, List<String>? ids, List<String>? includes) Future<Response>
Search for an author by the author's name and return limit number of results (10 by default) in a http response.
searchResponse({String? title, int? limit, int? offset, List<String>? authors, List<String>? artists, int? year, List<String>? includedTags, TagsMode? includedTagsMode, List<String>? excludedTags, TagsMode? excludedTagsMode, List<MangaStatus>? status, List<LanguageCodes>? originalLanguage, List<LanguageCodes>? excludedOriginalLanguages, List<LanguageCodes>? availableTranslatedLanguage, List<PublicDemographic>? publicationDemographic, List<String>? ids, List<ContentRating>? contentRating, String? createdAtSince, String? updatedAtSince, List<String>? includes, String? group, Map<SearchOrders, OrderDirections>? orders, bool? hasAvailableChapters}) Future<Response>
setMangaReadingStatus(String sessionToken, String mangaId, ReadingStatus? status) Future<Result>
Set the reading status for a certain manga to status If no reading status is supplied to it, the reading status is set as 'reading'
unfollowCustomList(String sessionToken, String listId) Future<Result>
Makes the user identified by the sessionToken unfollow a custom list identified by it's listId and returns a Result class instance containing info on whether the request was successful.
unfollowCustomListResponse(String sessionToken, String listId) Future<Response>
Makes the user identified by the sessionToken unfollow a custom list identified by it's listId and returns a http response.
unfollowManga(String sessionToken, String mangaId) Future<Result>
Unfollow a manga identified by mangaId or uuid
updateCustomList(String sessionToken, String listId, String listName, Visibility visibility, List<String> mangaIds, int version) Future<SingleCustomListResponse>
Updates an existing custom list identified by its listId or UUID only if the user identified by the sessionToken has permission to update the list and returns the updated data in a SingleCustomListResponse class instance.
updateCustomListResponse(String sessionToken, String listId, String listName, Visibility visibility, List<String> mangaIds, int version) Future<Response>
Updates an existing custom list identified by its listId or UUID only if the user identified by the sessionToken has permission to update the list and returns the updated data in a http response.