getPopularPeople method
Get popular people.
Get a list of the current popular people on TMDB. This list updates daily.
page
: Specify which page to query.
For more details on the API go here.
Throws FilmGyaanException on an error.
Implementation
Future<PeopleList> getPopularPeople({
int page = 1,
}) async {
Ensure(page >= 1).isTrue('Page should\'nt be less than 1');
Ensure(page <= 1000).isTrue('Page should\'nt be more than 1000');
var params = PopularPersonParams(
page: page,
);
_logger.info('Getting popular people for page $page');
return defaultFlow<PopularPersonParams, PeopleList>(
core: this,
params: params,
serializer: (dynamic json) => PeopleList.fromMap(
json as Map<String, dynamic>,
),
);
}