mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Check wether a chart is populated; Fixes to graph's colour setting
This commit is contained in:
21
osu.Game/Online/API/Requests/GetChangelogChartRequest.cs
Normal file
21
osu.Game/Online/API/Requests/GetChangelogChartRequest.cs
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class GetChangelogChartRequest : APIRequest<APIChangelogChart>
|
||||
{
|
||||
private readonly string updateStream;
|
||||
|
||||
public GetChangelogChartRequest() => updateStream = null;
|
||||
|
||||
public GetChangelogChartRequest(string updateStreamName) => updateStream = updateStreamName;
|
||||
|
||||
protected override string Target => $@"changelog/{(!string.IsNullOrEmpty(updateStream) ?
|
||||
updateStream + "/" : "")}chart-config";
|
||||
protected override string Uri => $@"https://houtarouoreki.github.io/fake-api/{Target}"; // for testing
|
||||
}
|
||||
}
|
34
osu.Game/Online/API/Requests/Responses/APIChangelogChart.cs
Normal file
34
osu.Game/Online/API/Requests/Responses/APIChangelogChart.cs
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Lists;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
public class APIChangelogChart
|
||||
{
|
||||
[JsonProperty("build_history")]
|
||||
public List<BuildHistory> BuildHistory { get; set; }
|
||||
|
||||
[JsonProperty("order")]
|
||||
public List<string> Order { get; set; }
|
||||
|
||||
[JsonProperty("stream_name")]
|
||||
public string StreamName { get; set; }
|
||||
}
|
||||
|
||||
public class BuildHistory
|
||||
{
|
||||
[JsonProperty("created_at")]
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("user_count")]
|
||||
public long UserCount { get; set; }
|
||||
|
||||
[JsonProperty("label")]
|
||||
public string Label { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user