예제 #1
0
        private static void DisplayUpcomingMovies()
        {
            string apiKey = ConfigurationManager.AppSettings["ApiKey"];

            //A Tomato is the main object that will allow you to access RottenTomatoes information.
            //Be sure to provide it with your API key in String format.
            var tomato = new Tomato(apiKey);

            //The movies are automatically ordered according to their gross at the box-office.
            //Unfortunately the JSON API doesn't offer the gross (money earned) only their relative position
            //on the charts.
            var movies = tomato.FindUpcomingMoviesList();

            foreach (var movie in movies)
            {
                Console.WriteLine(movie.Title);
            }
        }
예제 #2
0
        private static void DisplayUpcomingMovies()
        {
            string apiKey = ConfigurationManager.AppSettings["ApiKey"];

            //A Tomato is the main object that will allow you to access RottenTomatoes information.
            //Be sure to provide it with your API key in String format.
            var tomato = new Tomato(apiKey);

            //The movies are automatically ordered according to their gross at the box-office.
            //Unfortunately the JSON API doesn't offer the gross (money earned) only their relative position
            //on the charts.
            var movies = tomato.FindUpcomingMoviesList();

            foreach (var movie in movies)
            {
                Console.WriteLine(movie.Title);
            }
        }