Beispiel #1
0
        public async Task <IDictionary <string, Rank> > GetRanksAsync(IEnumerable <string> profileIds, ERegion region, EPlatform platform, int season = -1)
        {
            var ranksRequest = new RanksRequest
            {
                UbiAppId   = _settings.UbiAppId,
                Ticket     = _ticket,
                SessionId  = _sessionId,
                BoardId    = "pvp_ranked",
                Profileids = profileIds,
                Platform   = platform,
                Region     = region,
                SeasonId   = season
            };

            var ranksResponse = await _apiManager.GetRanksResponseAsync(ranksRequest);

            return(ranksResponse.RankContracts.ToDictionary(r => r.Key, r => ApiMapper.GetMappedRank(r.Value)));
        }