mangadex_library library Null safety

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's permissions.
constructPageUrl(String baseUrl, String sessionToken, 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.
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, int? limit, int? offset}) Future<ChapterData>
gets limit number of chapters for the given mangaId or uuid Returns the manga data in a ChapterData class instance
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, int? limit, int? offset}) Future<Response>
Returns the http response of a list of chapters for mangaId
getCoverArt(String mangaId) Future<Cover>
returns an Cover class instance containing cover art details for a manga with given mangaId or uuid
getCoverArtResponse(String mangaId, [String? coverId, int limit = 10, int offset = 0]) Future<Response>
returns a https response with cover art details for a manga with given mangaId or uuid
getCoverArtUrl(String mangaId, {int? res}) Future<String>
Directly get Cover art details of a manga with mangaId and return a String containing a url to the cover page [...]
getCustomList(String listId) Future<SingleCustomListResponse>
Gets the data of the customList identified by it's listId or list uuid and returns a SingleCustomListResponsecontaining the data.
getCustomListResponse(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.
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
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
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>
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. [...]
markChapterRead(String sessionToken, String chapterId) Future<Result>
Mark a chapter identified by it's chapterId or uuid as READ
markChapterUnread(String sessionToken, String chapterId) Future<Result>
Mark a chapter identified by it's chapterId or uuid as UNREAD
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<AuthorSearchResult>
Search for an author by the author's name and return limit number of results (10 by default) in an AuthorSearchResult 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? query, 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<String, dynamic>? order}) Future<Response>
setMangaReadingStatus(String sessionToken, String mangaId, ReadingStatus? status) 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'
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.