getTvReviews method

Future<ReviewsList> getTvReviews({
  1. required int tvId,
})

Get TV reviews

Get the reviews for a TV show.

For more details on the API go here.

Throws FilmGyaanException on an error.

Implementation

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

  var params = TvReviewsParams(
    tvId: tvId,
  );

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

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