unfollowManga method

Future<Result> unfollowManga(
  1. String sessionToken,
  2. String mangaId
)
inherited

Endpoint used: DELETE /manga/{id}/aggregate

Unfollow a manga identified by mangaId or uuid

Implementation

Future<Result> unfollowManga(String sessionToken, String mangaId) async {
  var unencodedPath = '/manga/$mangaId/follow';
  final uri = 'https://$AUTHORITY$unencodedPath';
  var response = await http.delete(Uri.parse(uri), headers: {
    HttpHeaders.contentTypeHeader: 'application/json',
    HttpHeaders.authorizationHeader: 'Bearer $sessionToken'
  });
  try {
    return Result.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}