예제 #1
0
        public void OnGet()
        {
            var results = _client.SearchForAllGames("Assassins Creed");
            var query   = from game in results
                          where game.OriginalReleaseDate != null
                          select game;

            Games = results.ToList();
        }
예제 #2
0
        public IActionResult ViewInventoryItems(string searchString)
        {
            // Get API key:
            string apikey    = config.GetConnectionString("GiantBombAPI");
            var    giantBomb = new GiantBombRestClient(apikey);

            if (!String.IsNullOrEmpty(searchString))
            {
                var results = giantBomb.SearchForAllGames(searchString);
                Log.Information("Successfully got inventory items");
                return(View(results));
            }
            return(View(new List <GiantBomb.Api.Model.Game>()));
        }