getMangaAggregate method

Future<Aggregate> getMangaAggregate(
  1. String mangaId, {
  2. List<String>? groupIds,
  3. List<LanguageCodes>? translatedLanguages,
})
inherited

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

Gets response of manga chapter and volume info of a manga identified by it's mangaId, which can be filtered by groupIds and translatedLanguages

Implementation

Future<Aggregate> getMangaAggregate(String mangaId,
    {List<String>? groupIds,
    List<LanguageCodes>? translatedLanguages}) async {
  var response = await getMangaAggregateResponse(
    mangaId,
    groupIds: groupIds,
    translatedLanguages: translatedLanguages,
  );
  try {
    return Aggregate.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}