/// <summary> /// Returns true if there is another page of results and assigns /// the next page of SearchResults to the specified nextResults /// </summary> /// <param name="results"></param> /// <param name="nextResults"></param> /// <returns></returns> public static bool NextPage(SearchResults results, out SearchResults nextResults) { AmazonProductAdvertisingClient client = new AmazonProductAdvertisingClient(); string itemPage = results.Info.Request.ItemPage; string totalPagesS = results.Info.Items.TotalPages; int currentPage = Convert.ToInt32(itemPage); currentPage = currentPage == 0 ? 1 : currentPage; int totalPages = Convert.ToInt32(totalPagesS); int nextPage = currentPage + 1; results.Info.Request.ItemPage = nextPage.ToString(); if (nextPage > 10) { nextResults = results; return(false); } else { nextResults = client.Search(results.Info.Request); return(nextPage <= totalPages); } }
public static SearchResults Search(string keywords, SearchIndex index = SearchIndex.VideoGames, int pageNumber = 1) { AmazonProductAdvertisingClient client = new AmazonProductAdvertisingClient(); return(client.KeywordSearch(keywords, index, pageNumber)); }
public static LookupResults Lookup(params string[] asins) { AmazonProductAdvertisingClient client = new AmazonProductAdvertisingClient(); return(client.Lookup(asins)); }