getPersonImages method

Future<PeopleImages> getPersonImages({
  1. required int personId,
})

Get Images

Get the images for a person.

For more details on the API go here.

Throws FilmGyaanException on an error.

Implementation

Future<PeopleImages> getPersonImages({
  required int personId,
}) async {
  Ensure(personId > 0).isTrue('Person Id should be > 0');

  var params = PeopleImagesParams(
    personId: personId,
  );

  _logger.info('Getting external ids for $personId person');

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