checkIfUserFollowsManga method
Endpoint used: GET /user/follows/manga/{id}
Simply check if the user identified by the current session sessionToken
follows a manga with mangaId
or uuid and return a boolean
Implementation
Future<bool> checkIfUserFollowsManga(
String sessionToken, String mangaId) async {
var response = await checkIfUserFollowsMangaResponse(sessionToken, mangaId);
if (response.statusCode == 200) {
return true;
} else if (response.statusCode == 404) {
return false;
} else {
throw MangadexServerException(jsonDecode(response.body));
}
}