private Movie GetMovieInfo(string movieId) { string url = string.Format(MovieInfoUrl, movieId); string movieInfo = new WebClient().DownloadString(url); JObject m = JObject.Parse(movieInfo); Movie movie = new Movie { Title = m["title"].ToString(), MpaaRating = m["mpaa_rating"].ToString(), ReleaseDate = DateTime.Parse(m["release_dates"]["theater"].ToString()), Genres = (from x in m["genres"] select new Genre { Title = x.Value<string>() }).ToList(), AudienceRating = long.Parse(m["ratings"]["audience_score"].ToString()), Synopsis = m["synopsis"].ToString(), ClipsUrl = m["links"]["clips"].ToString(), ImageUrl = m["posters"]["thumbnail"].ToString() }; movie.People = (from x in m["abridged_cast"] select new Person { PersonType = PersonType.Actor, FullName = x["name"].ToString() }).ToList(); movie.People = movie.People.Concat((from x in m["abridged_directors"] select new Person { PersonType = PersonType.Director, FullName = x["name"].ToString() }).ToList()).ToList(); return movie; }
public void Maintain(Movie t) { throw new System.NotImplementedException(); }