Exemplo n.º 1
0
        /// <summary>
        /// Function to get the top rated movies
        /// </summary>
        /// <param name="page">The number of page that was requested</param>
        /// <returns></returns>
        public async Task GetTopRatedMovies(int page)
        {
            this.Displayables.Clear();
            var service        = new MovieServices();
            var topRatedMovies = await service.GetTopRatedMoviesAsync(page);

            foreach (var item in topRatedMovies.movies)
            {
                item.poster_path = "https://image.tmdb.org/t/p/w500" + item.poster_path;
                this.Displayables.Add(new TvSeriesOrMovieDisplaySmall(true, item.poster_path, item.Title, item.id));
            }
            this.TopRatedPagesCount = topRatedMovies.total_pages;
        }