2019-01-24 16:43:03 +08:00
|
|
|
|
// 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.
|
2018-06-08 11:21:12 +08:00
|
|
|
|
|
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
|
{
|
|
|
|
|
public class GetBeatmapRequest : APIRequest<APIBeatmap>
|
|
|
|
|
{
|
2021-10-02 23:55:29 +08:00
|
|
|
|
private readonly BeatmapInfo beatmapInfo;
|
2018-06-08 11:21:12 +08:00
|
|
|
|
|
2021-10-02 23:55:29 +08:00
|
|
|
|
public GetBeatmapRequest(BeatmapInfo beatmapInfo)
|
2018-06-08 11:21:12 +08:00
|
|
|
|
{
|
2021-10-02 23:55:29 +08:00
|
|
|
|
this.beatmapInfo = beatmapInfo;
|
2018-06-08 11:21:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-10-02 23:55:29 +08:00
|
|
|
|
protected override string Target => $@"beatmaps/lookup?id={beatmapInfo.OnlineBeatmapID}&checksum={beatmapInfo.MD5Hash}&filename={System.Uri.EscapeUriString(beatmapInfo.Path ?? string.Empty)}";
|
2018-06-08 11:21:12 +08:00
|
|
|
|
}
|
|
|
|
|
}
|