2017-03-15 16:50:52 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
2017-03-15 13:06:05 +08:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using osu.Framework.IO.Network;
|
|
|
|
|
using osu.Game.Database;
|
2017-04-18 15:05:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2017-03-15 13:06:05 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
|
|
|
{
|
|
|
|
|
public class GetScoresRequest : APIRequest<GetScoresResponse>
|
|
|
|
|
{
|
|
|
|
|
private readonly BeatmapInfo beatmap;
|
|
|
|
|
|
|
|
|
|
public GetScoresRequest(BeatmapInfo beatmap)
|
|
|
|
|
{
|
|
|
|
|
this.beatmap = beatmap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override WebRequest CreateWebRequest()
|
|
|
|
|
{
|
|
|
|
|
var req = base.CreateWebRequest();
|
2017-04-19 15:02:18 +08:00
|
|
|
|
//req.AddParameter(@"c", beatmap.Hash);
|
|
|
|
|
//req.AddParameter(@"f", beatmap.Path);
|
2017-03-15 13:06:05 +08:00
|
|
|
|
return req;
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-19 15:02:18 +08:00
|
|
|
|
protected override string Target => $@"beatmaps/{beatmap.OnlineBeatmapID}/scores";
|
2017-03-15 13:06:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class GetScoresResponse
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty(@"scores")]
|
|
|
|
|
public IEnumerable<Score> Scores;
|
|
|
|
|
}
|
|
|
|
|
}
|