public async Task <Dictionary <Guid, RankStats> > GetRanksAsync(Platform platform, Region region, Season season, params Guid[] userIds) { RankResponse response = await RankRequests.GetRank(this, platform, region, season, userIds); return(response.Players.ToDictionary(kv => Guid.Parse(kv.Key), kv => new RankStats { Abandons = kv.Value.Abandons, Losses = kv.Value.Losses, Mmr = kv.Value.Mmr, Rank = kv.Value.Rank, SeasonId = kv.Value.Season, Wins = kv.Value.Wins, MaxMmr = kv.Value.MaxMmr, MaxRank = kv.Value.MaxRank, Region = FormatUtility.RegionFromString(kv.Value.Region) ?? throw new FormatException("Unknown region format") }));
private static Region GetRegion(string regionId) { return(FormatUtility.RegionFromString(regionId) ?? throw new NotImplementedException()); }