public async Task GetSoloLeaderboardTest() { var leaderboardId = new SoloLeaderboardId { SeasonId = await DiabloApi.Season.GetActiveSeasonIdAsync(), CharacterId = CharacterKind.Wizard, IsHardcore = false }; var leaderboard = await DiabloApi.Season.GetSoloLeaderboard(AuthenticationScope, leaderboardId); Assert.IsNotEmpty(leaderboard.Ranks); }
public async Task <SoloLeaderboard> GetSoloLeaderboard(IAuthenticationScope authenticationScope, SoloLeaderboardId leaderboardId) { var mapper = new SoloLeaderboardMapper(leaderboardId); var leaderboardSlug = leaderboardId.ToSlug(); var seasonIndex = (int)leaderboardId.SeasonId; using (var client = CreateClient(authenticationScope)) { var seasonLeaderboardDetail = await client.GetSeasonLeaderboardAsync(seasonIndex, leaderboardSlug); return(mapper.Map(seasonLeaderboardDetail)); } }
public SoloLeaderboardMapper(SoloLeaderboardId leaderboardId) { _leaderboardId = leaderboardId; }