getUserFollowedMangaResponse method

Future<Response> getUserFollowedMangaResponse(
  1. String sessionToken, {
  2. int? offset,
  3. int? limit,
})
inherited

Endpoint used: GET /user/follows/manga

Directly get Cover art details of a manga with mangaIds and return a Map<String, String> containing values with manga IDs mapped to their cover art filenames. Get a http response of the all the Manga user follows, the sessionToken is the session token obtained using the login() function

Implementation

// User related functions

/// Get a http response of the all the Manga user follows,
/// the [sessionToken] is the session token obtained using the login() function
Future<http.Response> getUserFollowedMangaResponse(String sessionToken,
    {int? offset, int? limit}) async {
  final _offset = '&offset=${offset ?? 0}';
  final _limit = '&limit=${limit ?? 10}';
  final unencodedPath = '/user/follows/manga?$_offset$_limit';
  final uri = 'https://$AUTHORITY$unencodedPath';
  var response = await http.get(Uri.parse(uri), headers: {
    HttpHeaders.contentTypeHeader: 'application/json',
    HttpHeaders.authorizationHeader: 'Bearer $sessionToken'
  });
  return response;
}