static void Main(string[] args) { try { ///Search about Bill Gates ///NB: This should be done asynchronously... SearchResult result = BingSearchHelper.Query("Bill Gates", new BingQueryParameters( apiKey: "", count: 10, offset: 0, mkt: "en-us", safeSearch: "Moderate") ).Result; ///Get a link to the first image of the search result. Console.WriteLine(result.Images.Value[0].ThumbnailUrl); Console.WriteLine("Done!!!!!!"); } catch (Exception e) { Console.WriteLine(e.Message + "\n" + e.StackTrace); } Console.ReadKey(); }
public void ShouldSearchWeb() { SearchResult result = BingSearchHelper.Query(query, new BingQueryParameters( apiKey: reamera, count: 10, offset: 0, mkt: "en-us", safeSearch: "Moderate")).Result; Assert.That(result, Is.Not.Null); }