Ejemplo n.º 1
0
        public static MovieEntity TitleIdParse(JObject jObject)
        {
            MovieEntity movie = new MovieEntity();

            movie.Id    = (string)jObject["id"];
            movie.Title = (string)jObject["title"];

            return(movie);
        }
Ejemplo n.º 2
0
        public static MovieEntity SnapParse(JObject jObject)
        {
            MovieEntity movie = TitleIdParse(jObject);

            movie.ImageUrl  = (string)((JObject)jObject["images"] ?? new JObject())["large"];
            movie.Score     = (float)((JObject)jObject["rating"] ?? new JObject())["average"];
            movie.SourceUrl = (string)jObject["alt"];

            return(movie);
        }