public void WhenIAccessTheLastPersonDetails() { var listFeature = _container.GetInstance <IPersonListFeature>(); var lastId = listFeature.Exec().Last().Id; var detailFeature = _container.GetInstance <IPersonDetailFeature>(); _personDetail = detailFeature.Exec(lastId); }
private Person GetPersonDetailsFromTmdb(int tmdbId) { string url = $"https://api.themoviedb.org/3/person/{tmdbId}?api_key={apiKey}&language=en-US"; using WebClient webClient = new WebClient(); string jsonData = string.Empty; jsonData = webClient.DownloadString(url); PersonDetailsResponse response = JsonConvert.DeserializeObject <PersonDetailsResponse>(jsonData); return(new Person { TmdbId = response.id, ImdbId = response.imdb_id, Gender = response.gender, Name = response.name, PosterUrl = response.profile_path }); }