Exemplo n.º 1
0
        public IActionResult GetPlayerAchievements(string userid, string appid)
        {
            WebClient webClient = new WebClient();
            string    reqUrl    = SteamUrlBuilders.BuildGetPlayerAchievementsForGameRequestUrl(SteamEnums.Methods.GetPlayerAchievements, userid, appid, _apiKeys.SteamApiKey, steamBaseUrl);
            GetPlayerAchievementsResponse jsonResponse =
                JsonConvert.DeserializeObject <GetPlayerAchievementsResponse>(webClient.DownloadString(reqUrl));

            return(Ok(jsonResponse));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetPlayerAchievementsForGameAsync(string steamId, string appId)
        {
            GetPlayerAchievementsResponse response = await _steamClient.GetPlayerAchievementsAsync(steamId, appId);

            return(Ok(response));
        }