Initial pass to make work with real API

This commit is contained in:
Dean Herbert
2019-05-13 16:24:32 +09:00
parent 31b72f168d
commit 219c590b8a
10 changed files with 44 additions and 33 deletions

View File

@ -17,6 +17,5 @@ namespace osu.Game.Online.API.Requests
}
protected override string Target => $@"changelog/{name}/{version}";
protected override string Uri => $@"https://houtarouoreki.github.io/fake-api/{Target}"; // for testing
}
}

View File

@ -21,7 +21,5 @@ namespace osu.Game.Online.API.Requests
protected override string Target => $@"changelog/{(!string.IsNullOrEmpty(updateStream) ?
updateStream + "/" : "")}chart-config";
protected override string Uri => $@"https://houtarouoreki.github.io/fake-api/{Target}"; // for testing
}
}

View File

@ -1,14 +1,9 @@
// 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.
using osu.Game.Online.API.Requests.Responses;
using System.Collections.Generic;
namespace osu.Game.Online.API.Requests
{
public class GetChangelogLatestBuildsRequest : APIRequest<List<APIChangelogBuild>>
public class GetChangelogLatestBuildsRequest : GetChangelogRequest
{
protected override string Target => @"changelog/latest-builds";
protected override string Uri => $@"https://houtarouoreki.github.io/fake-api/{Target}"; // for testing
}
}

View File

@ -5,9 +5,8 @@ using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetChangelogRequest : APIRequest<APIChangelogBuild[]>
public class GetChangelogRequest : APIRequest<APIChangelogIndex>
{
protected override string Target => @"changelog";
protected override string Uri => $@"https://houtarouoreki.github.io/fake-api/{Target}/index"; // for testing
}
}

View File

@ -21,9 +21,6 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("users")]
public long Users { get; set; }
[JsonProperty("is_featured")]
public bool IsFeatured { get; set; }
[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
@ -114,7 +111,13 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("is_featured")]
public bool IsFeatured { get; set; }
[JsonProperty("display_name")]
public string DisplayName { get; set; }
[JsonProperty("latest_build")]
public APIChangelogBuild LatestBuild { get; set; }
}
}

View File

@ -0,0 +1,14 @@
// 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.
using System.Collections.Generic;
namespace osu.Game.Online.API.Requests.Responses
{
public class APIChangelogIndex
{
public List<APIChangelogBuild> Builds;
public List<UpdateStream> Streams;
}
}