Ejemplo n.º 1
0
        public List <Game> NewGamesFromSteam()
        {
            var steam         = new Steam(_db.GetAll().steamKey, _db.GetAll().steamId);
            var allSteamGames = Steam.GetFromSteam().Result.response.games;
            var newGames      = new System.Collections.Generic.List <Game>();

            foreach (var newGame in allSteamGames)
            {
                if (games.Exists(g => g.SteamApID == newGame.appid) == false)
                {
                    newGames.Add(new Game
                    {
                        Name    = newGame.name,
                        LogoURL = "http://media.steampowered.com/steamcommunity/public/images/apps/" + newGame.appid + "/" + newGame.img_logo_url + ".jpg",
                        SteamOriginalImageURL = newGame.img_logo_url + ".jpg",
                        Store      = "Steam",
                        System     = "PC",
                        Disabled   = false,
                        BuyDate    = null,
                        Price      = null,
                        PlayedTime = newGame.playtime_forever,
                        Purchased  = true,
                        SteamApID  = newGame.appid
                    });
                }
            }
            return(newGames);
        }
Ejemplo n.º 2
0
        public IActionResult Edit()
        {
            var config = _db.GetAll();

            return(View(config));
        }