diff --git a/SteamWebAPI2/Interfaces/SteamUser.cs b/SteamWebAPI2/Interfaces/SteamUser.cs index 7f7fb09..e72705c 100644 --- a/SteamWebAPI2/Interfaces/SteamUser.cs +++ b/SteamWebAPI2/Interfaces/SteamUser.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; using System.Threading.Tasks; namespace SteamWebAPI2.Interfaces @@ -29,6 +30,20 @@ public async Task GetPlayerSummaryAsync(long steamId) } } + public async Task> GetPlayerSummaryAsync(IEnumerable steamIds) + { + string steamIdsCsv = string.Join(",", steamIds.Select(l => l.ToString())); + List parameters = new List(); + AddToParametersIfHasValue(steamIdsCsv, "steamids", parameters); + var playerSummary = await CallMethodAsync("GetPlayerSummaries", 2, parameters); + + if (playerSummary.Result.Players.Count > 0) + { + return playerSummary.Result.Players; + } + return null; + } + public async Task> GetFriendsListAsync(long steamId, string relationship = "") { List parameters = new List(); diff --git a/SteamWebAPI2/SteamWebAPI2.csproj b/SteamWebAPI2/SteamWebAPI2.csproj index 379df56..289473f 100644 --- a/SteamWebAPI2/SteamWebAPI2.csproj +++ b/SteamWebAPI2/SteamWebAPI2.csproj @@ -9,8 +9,9 @@ Properties SteamWebAPI2 SteamWebAPI2 - v4.6 + v4.5 512 + true