Example #1
0
        private static void Run()
        {
            Console.Write("Enter search term: ");
            string query = Console.ReadLine();

            Console.Write("Which URL do you want to search: ");
            string urlToSearch = Console.ReadLine();

            if (!String.IsNullOrEmpty(urlToSearch))
            {
                GoogleSearchAPI searchAPI = new GoogleSearchAPI(query, urlToSearch);
                DisplayResults(searchAPI.QueryResults(), query);
                Console.WriteLine("Press any key to continue...");
                Console.ReadLine();
            }
        }
Example #2
0
 public SearchController(IOptions <GoogleSearchAPI> optionsAccessor)
 {
     googleSearchAPI = optionsAccessor.Value;
 }