mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Split out web response classes into own files
This commit is contained in:
@ -25,99 +25,21 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("update_stream")]
|
||||
public UpdateStream UpdateStream { get; set; }
|
||||
public APIUpdateStream UpdateStream { get; set; }
|
||||
|
||||
[JsonProperty("changelog_entries")]
|
||||
public List<ChangelogEntry> ChangelogEntries { get; set; }
|
||||
public List<APIChangelogEntry> ChangelogEntries { get; set; }
|
||||
|
||||
[JsonProperty("versions")]
|
||||
public Versions Versions { get; set; }
|
||||
}
|
||||
public VersionNativation Versions { get; set; }
|
||||
|
||||
public class Versions
|
||||
{
|
||||
[JsonProperty("next")]
|
||||
public APIChangelogBuild Next { get; set; }
|
||||
public class VersionNativation
|
||||
{
|
||||
[JsonProperty("next")]
|
||||
public APIChangelogBuild Next { get; set; }
|
||||
|
||||
[JsonProperty("previous")]
|
||||
public APIChangelogBuild Previous { get; set; }
|
||||
}
|
||||
|
||||
public class ChangelogEntry
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("repository")]
|
||||
public string Repository { get; set; }
|
||||
|
||||
[JsonProperty("github_pull_request_id")]
|
||||
public long? GithubPullRequestId { get; set; }
|
||||
|
||||
[JsonProperty("github_url")]
|
||||
public string GithubUrl { get; set; }
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("category")]
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonProperty("message_html")]
|
||||
public string MessageHtml { get; set; }
|
||||
|
||||
[JsonProperty("major")]
|
||||
public bool? Major { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public DateTimeOffset? CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("github_user")]
|
||||
public GithubUser GithubUser { get; set; }
|
||||
}
|
||||
|
||||
public class GithubUser
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[JsonProperty("github_url")]
|
||||
public string GithubUrl { get; set; }
|
||||
|
||||
[JsonProperty("osu_username")]
|
||||
public string OsuUsername { get; set; }
|
||||
|
||||
[JsonProperty("user_id")]
|
||||
public long? UserId { get; set; }
|
||||
|
||||
[JsonProperty("user_url")]
|
||||
public string UserUrl { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateStream
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[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; }
|
||||
[JsonProperty("previous")]
|
||||
public APIChangelogBuild Previous { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
47
osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs
Normal file
47
osu.Game/Online/API/Requests/Responses/APIChangelogEntry.cs
Normal file
@ -0,0 +1,47 @@
|
||||
// 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;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
public class APIChangelogEntry
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("repository")]
|
||||
public string Repository { get; set; }
|
||||
|
||||
[JsonProperty("github_pull_request_id")]
|
||||
public long? GithubPullRequestId { get; set; }
|
||||
|
||||
[JsonProperty("github_url")]
|
||||
public string GithubUrl { get; set; }
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("category")]
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonProperty("message_html")]
|
||||
public string MessageHtml { get; set; }
|
||||
|
||||
[JsonProperty("major")]
|
||||
public bool? Major { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public DateTimeOffset? CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("github_user")]
|
||||
public APIChangelogUser GithubUser { get; set; }
|
||||
}
|
||||
}
|
@ -9,6 +9,6 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
public List<APIChangelogBuild> Builds;
|
||||
|
||||
public List<UpdateStream> Streams;
|
||||
public List<APIUpdateStream> Streams;
|
||||
}
|
||||
}
|
||||
|
28
osu.Game/Online/API/Requests/Responses/APIChangelogUser.cs
Normal file
28
osu.Game/Online/API/Requests/Responses/APIChangelogUser.cs
Normal file
@ -0,0 +1,28 @@
|
||||
// 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 Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
public class APIChangelogUser
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
[JsonProperty("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[JsonProperty("github_url")]
|
||||
public string GithubUrl { get; set; }
|
||||
|
||||
[JsonProperty("osu_username")]
|
||||
public string OsuUsername { get; set; }
|
||||
|
||||
[JsonProperty("user_id")]
|
||||
public long? UserId { get; set; }
|
||||
|
||||
[JsonProperty("user_url")]
|
||||
public string UserUrl { get; set; }
|
||||
}
|
||||
}
|
25
osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs
Normal file
25
osu.Game/Online/API/Requests/Responses/APIUpdateStream.cs
Normal file
@ -0,0 +1,25 @@
|
||||
// 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 Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
public class APIUpdateStream
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[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; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user