/// <summary> /// Creates an extended person result model from an external result model. /// </summary> /// <param name="source">The source.</param> /// <returns>Extended person result model</returns> public ExtendedPersonResultModel Create(ExtendedPersonResult source) { return(new ExtendedPersonResultModel { Aliases = source.AlsoKnownAs, Biography = source.Biography, Birthday = source.Birthday, Deathday = source.Deathday, HomePage = source.HomePage, Id = source.Id, ImdbId = source.ImdbId, Name = source.Name, PlaceOfBirth = source.PlaceOfBirth, ProfileImageUrl = FormalizeImagePath(source.ProfilePath, ImageTypes.Profile, ImageSizes.Small), ProfileImageUrlOriginal = FormalizeImagePath(source.ProfilePath, ImageTypes.Profile, ImageSizes.Original), Images = source.Images.Profiles.Select(x => Create(x, ImageSizes.Small)), CastCredits = source.Credits.Cast.Select(x => Create(x)), CrewCredits = source.Credits.Crew.Select(x => Create(x)) }); }
/// <summary> /// Initialises a new instance of the <see cref="PersonModel"/> class. /// </summary> /// <param name="personDetails">The person details.</param> public PersonModel(ExtendedPersonResult personDetails) { _personDetails = personDetails; }