getCoverArt method

Future<Cover> getCoverArt(
  1. List<String> mangaIds, {
  2. List<String>? coverIds,
  3. List<String>? uploaders,
  4. List<String>? locales,
  5. Map<CoverOrders, OrderDirections>? order,
  6. int? limit,
  7. int? offset,
})
inherited

Endpoint used: GET /cover

returns an Cover class instance containing cover art details for a manga with given mangaIds or uuid

Implementation

Future<Cover> getCoverArt(
  List<String> mangaIds, {
  List<String>? coverIds,
  List<String>? uploaders,
  List<String>? locales,
  Map<CoverOrders, OrderDirections>? order,
  int? limit,
  int? offset,
}) async {
  var response = await getCoverArtResponse(
      mangaIds, coverIds, uploaders, locales, order, limit, offset);
  try {
    return Cover.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}