getMangaReadingStatus method
Endpoint used: GET /manga/{id}/status
Returns a MangaReadingStatus
class instance containing the reading status
of a particular manga identified by mangaId
or uuid
Implementation
Future<MangaReadingStatus> getMangaReadingStatus(
String sessionToken, String mangaId) async {
var unencodedPath = '/manga/$mangaId/status';
final uri = 'https://$AUTHORITY$unencodedPath';
var response = await http.get(Uri.parse(uri), headers: {
HttpHeaders.contentTypeHeader: 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $sessionToken'
});
try {
return MangaReadingStatus.fromJson(jsonDecode(response.body));
} on Exception {
throw MangadexServerException(jsonDecode(response.body));
}
}