1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 16:03:21 +08:00

Rename APIScoreInfo to APIScore

This commit is contained in:
Dean Herbert 2021-12-10 16:01:41 +09:00
parent dbb08f7d46
commit bff02bedbf
11 changed files with 27 additions and 27 deletions

View File

@ -164,7 +164,7 @@ namespace osu.Game.Tests.Visual.Gameplay
private ScoreInfo getScoreInfo(bool replayAvailable) private ScoreInfo getScoreInfo(bool replayAvailable)
{ {
return new APIScoreInfo return new APIScore
{ {
OnlineID = 2553163309, OnlineID = 2553163309,
RulesetID = 0, RulesetID = 0,

View File

@ -47,9 +47,9 @@ namespace osu.Game.Tests.Visual.Online
var allScores = new APIScoresCollection var allScores = new APIScoresCollection
{ {
Scores = new List<APIScoreInfo> Scores = new List<APIScore>
{ {
new APIScoreInfo new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -74,7 +74,7 @@ namespace osu.Game.Tests.Visual.Online
TotalScore = 1234567890, TotalScore = 1234567890,
Accuracy = 1, Accuracy = 1,
}, },
new APIScoreInfo new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -98,7 +98,7 @@ namespace osu.Game.Tests.Visual.Online
TotalScore = 1234789, TotalScore = 1234789,
Accuracy = 0.9997, Accuracy = 0.9997,
}, },
new APIScoreInfo new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -121,7 +121,7 @@ namespace osu.Game.Tests.Visual.Online
TotalScore = 12345678, TotalScore = 12345678,
Accuracy = 0.9854, Accuracy = 0.9854,
}, },
new APIScoreInfo new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -143,7 +143,7 @@ namespace osu.Game.Tests.Visual.Online
TotalScore = 1234567, TotalScore = 1234567,
Accuracy = 0.8765, Accuracy = 0.8765,
}, },
new APIScoreInfo new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -166,7 +166,7 @@ namespace osu.Game.Tests.Visual.Online
var myBestScore = new APIScoreWithPosition var myBestScore = new APIScoreWithPosition
{ {
Score = new APIScoreInfo Score = new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -189,7 +189,7 @@ namespace osu.Game.Tests.Visual.Online
var myBestScoreWithNullPosition = new APIScoreWithPosition var myBestScoreWithNullPosition = new APIScoreWithPosition
{ {
Score = new APIScoreInfo Score = new APIScore
{ {
User = new APIUser User = new APIUser
{ {
@ -212,9 +212,9 @@ namespace osu.Game.Tests.Visual.Online
var oneScore = new APIScoresCollection var oneScore = new APIScoresCollection
{ {
Scores = new List<APIScoreInfo> Scores = new List<APIScore>
{ {
new APIScoreInfo new APIScore
{ {
User = new APIUser User = new APIUser
{ {

View File

@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Online
{ {
public TestSceneUserProfileScores() public TestSceneUserProfileScores()
{ {
var firstScore = new APIScoreInfo var firstScore = new APIScore
{ {
PP = 1047.21, PP = 1047.21,
Rank = ScoreRank.SH, Rank = ScoreRank.SH,
@ -42,7 +42,7 @@ namespace osu.Game.Tests.Visual.Online
Accuracy = 0.9813 Accuracy = 0.9813
}; };
var secondScore = new APIScoreInfo var secondScore = new APIScore
{ {
PP = 134.32, PP = 134.32,
Rank = ScoreRank.A, Rank = ScoreRank.A,
@ -64,7 +64,7 @@ namespace osu.Game.Tests.Visual.Online
Accuracy = 0.998546 Accuracy = 0.998546
}; };
var thirdScore = new APIScoreInfo var thirdScore = new APIScore
{ {
PP = 96.83, PP = 96.83,
Rank = ScoreRank.S, Rank = ScoreRank.S,
@ -81,7 +81,7 @@ namespace osu.Game.Tests.Visual.Online
Accuracy = 0.9726 Accuracy = 0.9726
}; };
var noPPScore = new APIScoreInfo var noPPScore = new APIScore
{ {
Rank = ScoreRank.B, Rank = ScoreRank.B,
Beatmap = new APIBeatmap Beatmap = new APIBeatmap

View File

@ -8,7 +8,7 @@ using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests namespace osu.Game.Online.API.Requests
{ {
public class GetUserScoresRequest : PaginatedAPIRequest<List<APIScoreInfo>> public class GetUserScoresRequest : PaginatedAPIRequest<List<APIScore>>
{ {
private readonly long userId; private readonly long userId;
private readonly ScoreType type; private readonly ScoreType type;

View File

@ -16,7 +16,7 @@ using osu.Game.Scoring.Legacy;
namespace osu.Game.Online.API.Requests.Responses namespace osu.Game.Online.API.Requests.Responses
{ {
public class APIScoreInfo : IScoreInfo public class APIScore : IScoreInfo
{ {
[JsonProperty(@"score")] [JsonProperty(@"score")]
public long TotalScore { get; set; } public long TotalScore { get; set; }

View File

@ -14,7 +14,7 @@ namespace osu.Game.Online.API.Requests.Responses
public int? Position; public int? Position;
[JsonProperty(@"score")] [JsonProperty(@"score")]
public APIScoreInfo Score; public APIScore Score;
public ScoreInfo CreateScoreInfo(RulesetStore rulesets, BeatmapInfo beatmap = null) public ScoreInfo CreateScoreInfo(RulesetStore rulesets, BeatmapInfo beatmap = null)
{ {

View File

@ -9,7 +9,7 @@ namespace osu.Game.Online.API.Requests.Responses
public class APIScoresCollection public class APIScoresCollection
{ {
[JsonProperty(@"scores")] [JsonProperty(@"scores")]
public List<APIScoreInfo> Scores; public List<APIScore> Scores;
[JsonProperty(@"userScore")] [JsonProperty(@"userScore")]
public APIScoreWithPosition UserScore; public APIScoreWithPosition UserScore;

View File

@ -16,7 +16,7 @@ namespace osu.Game.Online.Solo
{ {
/// <summary> /// <summary>
/// A class specifically for sending scores to the API during score submission. /// A class specifically for sending scores to the API during score submission.
/// This is used instead of <see cref="APIScoreInfo"/> due to marginally different serialisation naming requirements. /// This is used instead of <see cref="APIScore"/> due to marginally different serialisation naming requirements.
/// </summary> /// </summary>
[Serializable] [Serializable]
public class SubmittableScore public class SubmittableScore

View File

@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
private const float performance_background_shear = 0.45f; private const float performance_background_shear = 0.45f;
protected readonly APIScoreInfo Score; protected readonly APIScore Score;
[Resolved] [Resolved]
private OsuColour colours { get; set; } private OsuColour colours { get; set; }
@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
[Resolved] [Resolved]
private OverlayColourProvider colourProvider { get; set; } private OverlayColourProvider colourProvider { get; set; }
public DrawableProfileScore(APIScoreInfo score) public DrawableProfileScore(APIScore score)
{ {
Score = score; Score = score;

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
{ {
private readonly double weight; private readonly double weight;
public DrawableProfileWeightedScore(APIScoreInfo score, double weight) public DrawableProfileWeightedScore(APIScore score, double weight)
: base(score) : base(score)
{ {
this.weight = weight; this.weight = weight;

View File

@ -15,7 +15,7 @@ using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
namespace osu.Game.Overlays.Profile.Sections.Ranks namespace osu.Game.Overlays.Profile.Sections.Ranks
{ {
public class PaginatedScoreContainer : PaginatedProfileSubsection<APIScoreInfo> public class PaginatedScoreContainer : PaginatedProfileSubsection<APIScore>
{ {
private readonly ScoreType type; private readonly ScoreType type;
@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
} }
} }
protected override void OnItemsReceived(List<APIScoreInfo> items) protected override void OnItemsReceived(List<APIScore> items)
{ {
if (VisiblePages == 0) if (VisiblePages == 0)
drawableItemIndex = 0; drawableItemIndex = 0;
@ -59,12 +59,12 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
base.OnItemsReceived(items); base.OnItemsReceived(items);
} }
protected override APIRequest<List<APIScoreInfo>> CreateRequest() => protected override APIRequest<List<APIScore>> CreateRequest() =>
new GetUserScoresRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage); new GetUserScoresRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
private int drawableItemIndex; private int drawableItemIndex;
protected override Drawable CreateDrawableItem(APIScoreInfo model) protected override Drawable CreateDrawableItem(APIScore model)
{ {
switch (type) switch (type)
{ {