getTvRecommendations method

Future<TvRecommendations> getTvRecommendations({
  1. required int tvId,
})

Get TV recommendations

Get the list of TV show recommendations for this item.

For more details on the API go here.

Throws FilmGyaanException on an error.

Implementation

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

  var params = TvRecommendationsParams(
    tvId: tvId,
  );

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

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