示例#1
0
        /// <summary>
        /// Get a replay from a username and map id
        /// </summary>
        /// <param name="client">The <see cref="OrbitClient"/> to use</param>
        /// <param name="scoreId">The id of the score</param>
        /// <returns>Container for the Base64 encoded replay. This is not the .osr file, but just the input data (key/mouse)</returns>
        public static Task <OsuLegacyReplayContent> GetBeatmapReplay <T>(this T client, ulong scoreId) where T : ApiClient, ILegacyOrbitClient
        {
            var request = new OsuLegacyReplayRequest
            {
                ScoreId = scoreId
            };

            return(client.PerformAsync <OsuLegacyReplayContent>(request));
        }
示例#2
0
        /// <summary>
        /// Get a replay from a username and map id
        /// </summary>
        /// <param name="client">The <see cref="OrbitClient"/> to use</param>
        /// <param name="mapId">The id of the map the user played</param>
        /// <param name="identifier">The username or id of the player</param>
        /// <param name="isUsername">Optional switch to tell the server the <see cref="identifier"/> is a username</param>
        /// <param name="mode">The game mode the map was played in</param>
        /// <param name="mods">The mods the map was played with</param>
        /// <returns>Container for the Base64 encoded replay. This is not the .osr file, but just the input data (key/mouse)</returns>
        public static Task <OsuLegacyReplayContent> GetBeatmapReplay <T>(this T client, uint mapId, string identifier, GameMode mode, LegacyMods?mods = null, bool?isUsername = null)
            where T : ApiClient, ILegacyOrbitClient
        {
            var request = new OsuLegacyReplayRequest
            {
                BeatmapId            = mapId,
                UserIdentifier       = identifier,
                IsIdentifierUsername = isUsername,
                Mods = mods,
                Mode = mode
            };

            return(client.PerformAsync <OsuLegacyReplayContent>(request));
        }