getMangaForum method

Future<BuiltList<Forum>> getMangaForum(
  1. int id, {
  2. ForumType? type,
})

Implementation

Future<BuiltList<Forum>> getMangaForum(int id, {ForumType? type}) async {
  var url = '/manga/$id/forum';
  if (type != null) url += '?filter=${type.name}';
  var response = await _getResponse(url);

  final topics = response['data'] ?? [];
  return BuiltList(topics.map((i) => Forum.fromJson(i)));
}