getTvEpisodeGroups method

Future<EpisodeGroups> getTvEpisodeGroups({
  1. required int tvId,
})

Get TV episode groups

Get all of the episode groups that have been created for a TV show.

For more details on the API go here.

Throws FilmGyaanException on an error.

Implementation

Future<EpisodeGroups> getTvEpisodeGroups({
  required int tvId,
}) async {
  Ensure(tvId > 0).isTrue('Tv Id should be > 0');

  var params = TvEpisodeGroupsParams(
    tvId: tvId,
  );

  _logger.info('Getting tv episode groups for $tvId');

  return defaultFlow<TvEpisodeGroupsParams, EpisodeGroups>(
    core: this,
    params: params,
    serializer: (dynamic json) => EpisodeGroups.fromMap(
      json as Map<String, dynamic>,
    ),
  );
}