getMangaDataByMangaId method
Endpoint used: GET /manga/{id}
gets details of a manga with the given mangaId
or uuid
Returns the manga data in a SingleMangaData
class instance
Implementation
Future<SingleMangaData> getMangaDataByMangaId(String mangaId) async {
var unencodedPath = '/manga/$mangaId';
var response = await http.get(Uri.http(AUTHORITY, unencodedPath));
try {
return SingleMangaData.fromJson(jsonDecode(response.body));
} on Exception {
throw MangadexServerException(jsonDecode(response.body));
}
}