private static void GetTrending() { string key = DateTime.Today.ToString() + "_Trending"; var giphyRecords = GetFromCache(key); if (giphyRecords == null) { var response = GiphyInfo.GetTrending(); giphyRecords = response.GiphyRecords; AddToCache(key, giphyRecords); } PrintResults(giphyRecords); }
private static void GetBySearchTerm() { Console.WriteLine(Environment.NewLine + "Please enter a search term"); string searchTerm = Console.ReadLine(); string key = searchTerm + "_searchTerm"; var giphyRecords = GetFromCache(key); if (giphyRecords == null) { var response = GiphyInfo.GetBySearch(searchTerm); giphyRecords = response.GiphyRecords; AddToCache(key, giphyRecords); } PrintResults(giphyRecords); }