/// <summary>
        /// Get seasonal stats for the provided <see cref="UbisoftAccount"/>
        /// </summary>
        /// <param name="client">The <see cref="Dragon6Client"/> to use</param>
        /// <param name="account">The <see cref="UbisoftAccount"/> to get stats for</param>
        /// <param name="seasonId">The season id. Defaults to the current season</param>
        /// <param name="board">The leaderboard to get rankings for</param>
        /// <param name="region">The region to get stats for. Seasons after ~17 do not need to set this</param>
        /// <param name="token">Optional cancellation token</param>
        public static Task <SeasonalStats> GetSeasonalStatsAsync(this Dragon6Client client, UbisoftAccount account, int seasonId = -1, BoardType board = BoardType.Ranked, Region region = Region.EMEA, CancellationToken token = default)
        {
            var request = new SeasonalStatsRequest(account.Yield(), board, seasonId, region);

            return(client.PerformAsync <SeasonalStatsResponse>(request, token).ContinueWith(t => t.Result.For(account), TaskContinuationOptions.OnlyOnRanToCompletion));
        }
Example #2
0
 /// <summary>
 /// Gets the <see cref="LegacyWeaponStats"/> for the <see cref="UbisoftAccount"/> provided
 /// </summary>
 /// <param name="client">The <see cref="Dragon6Client"/> to use</param>
 /// <param name="account">The <see cref="UbisoftAccount"/> to get stats for</param>
 /// <param name="token">Optional cancellation token</param>
 /// <returns><see cref="IEnumerable{T}"/> of <see cref="LegacyWeaponStats"/> for the provided <see cref="UbisoftAccount"/></returns>
 public static Task <IEnumerable <LegacyWeaponStats> > GetLegacyWeaponStatsAsync(this Dragon6Client client, UbisoftAccount account, CancellationToken token = default)
 {
     return(GetLegacyWeaponStatsAsync(client, account.Yield(), token).ContinueWith(t => t.Result.For(account), TaskContinuationOptions.OnlyOnRanToCompletion));
 }
Example #3
0
 /// <summary>
 /// Creates a <see cref="UbisoftAccountActivityRequest"/> for a single <see cref="UbisoftAccount"/>
 /// </summary>
 public UbisoftAccountActivityRequest(UbisoftAccount profile)
     : this(profile.Yield())
 {
 }