getAllUserMangaReadingStatus method

Future<AllMangaReadingStatus> getAllUserMangaReadingStatus(
  1. String sessionToken, {
  2. ReadingStatus? readingStatus,
})
inherited

Endpoint used: GET /manga/status

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.

Implementation

Future<AllMangaReadingStatus> getAllUserMangaReadingStatus(
    String sessionToken,
    {ReadingStatus? readingStatus}) async {
  String? status;
  if (readingStatus != null) {
    status = EnumUtils.parseStatusFromEnum(readingStatus);
  }
  var response = await getAllMangaReadingStatusResponse(sessionToken, status);
  try {
    return AllMangaReadingStatus.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}