/// <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 <Achievement> GetAchievements(string steamUserId, int gameId)
        {
            if (steamUserId == null)
            {
                throw new ArgumentNullException("steamUserId");
            }

            return(_service.GetAchievements(steamUserId, gameId).ToList());
        }
Ejemplo n.º 2
0
        /// <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");
            }

            return _achievementManager.GetAchievements(steamUserId, gameId).ToSimpleAchievementList();
        }
Ejemplo n.º 3
0
        /// <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 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");
            }

            return((from achievement in _achievementManager.GetAchievements(steamUserId, gameId)
                    select new SimpleAchievement
            {
                ImageUrl = achievement.ImageUrl,
                Name = achievement.Name,
                Description = achievement.Description
            }).ToList());
        }
Ejemplo n.º 5
0
 public IActionResult GetAchievements()
 {
     return(Ok(_achievementManager.GetAchievements()));
 }