/// <summary> /// Gets the games. /// </summary> /// <returns>All <see cref="Game"/>s.</returns> public List<SimpleGame> GetGames(string steamUserId) { if (steamUserId == null) { throw new ArgumentNullException("steamUserId"); } return _communityService.GetGames(steamUserId).ToSimpleGameList(); }
/// <summary> /// Gets the achievements. /// </summary> /// <param name="steamUserId">The steam user id.</param> /// <param name="gameId">The game id.</param> /// <returns> /// All <see cref="Achievement"/>s for the given user and game. /// </returns> public List <SimpleAchievement> GetAchievements(string steamUserId, int gameId) { if (steamUserId == null) { throw new ArgumentNullException("steamUserId"); } IEnumerable <Game> games = _communityService.GetGames(steamUserId).Where(game => game.Id == gameId); return(_achievementManager.GetAchievements(steamUserId, gameId).ToSimpleAchievementList(games)); }
/// <summary> /// Gets the games. /// </summary> /// <returns>All <see cref="Game"/>s.</returns> public List <SimpleGame> GetGames(string steamUserId) { return((from game in _communityService.GetGames(steamUserId) select new SimpleGame { Id = game.Id, Name = game.Name, ImageUrl = game.ImageUrl.ToString(), StatsUrl = game.StatsUrl.ToString(), StoreUrl = game.StoreUrl.ToString() }).ToList()); }