getWatchEpisodes method

Future<BuiltList<WatchEpisode>> getWatchEpisodes({
  1. bool popular = false,
})

Implementation

Future<BuiltList<WatchEpisode>> getWatchEpisodes(
    {bool popular = false}) async {
  var url = popular ? '/watch/episodes/popular' : '/watch/episodes';
  var response = await _getResponse(url);

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