internal async Task <UpcomingMovieModel> GetAsync(uint page = 1) { if (page < PageMin || page > PageMax) { throw new ArgumentException($"[page] must be an integer between {PageMin.ToString()} and {PageMax.ToString()}.", "page"); } var queryCollection = new Dictionary <string, object> { { "page", page } }; var model = await BaseGetAsync(ServicePath, queryCollection); return(model); }
internal async Task <SearchMovieModel> GetAsync(string query, uint page = 1) { if (string.IsNullOrWhiteSpace(query)) { throw new ArgumentException("query"); } if (page < PageMin || page > PageMax) { throw new ArgumentException($"[page] must be an integer between {PageMin.ToString()} and {PageMax.ToString()}.", "page"); } var queryCollection = new Dictionary <string, object> { { "query", query.Trim() } , { "page", page } }; var model = await BaseGetAsync(ServicePath, queryCollection); return(model); }