mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update GetBeatmapRequest
to use AddParameter
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.IO.Network;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
|
||||||
@ -21,6 +22,17 @@ namespace osu.Game.Online.API.Requests
|
|||||||
filename = (beatmapInfo as BeatmapInfo)?.Path ?? string.Empty;
|
filename = (beatmapInfo as BeatmapInfo)?.Path ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string Target => $@"beatmaps/lookup?id={beatmapInfo.OnlineID}&checksum={beatmapInfo.MD5Hash}&filename={System.Uri.EscapeUriString(filename)}";
|
protected override WebRequest CreateWebRequest()
|
||||||
|
{
|
||||||
|
var request = base.CreateWebRequest();
|
||||||
|
|
||||||
|
request.AddParameter(@"id", beatmapInfo.OnlineID.ToString());
|
||||||
|
request.AddParameter(@"checksum", beatmapInfo.MD5Hash);
|
||||||
|
request.AddParameter(@"filename", filename);
|
||||||
|
|
||||||
|
return request;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Target => @"beatmaps/lookup";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user