2019-05-12 23:36:05 +08:00
|
|
|
|
// 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.
|
|
|
|
|
|
2018-07-20 01:07:24 +08:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests.Responses
|
|
|
|
|
{
|
2019-05-21 12:34:35 +08:00
|
|
|
|
public class APIChangelogBuild : IEquatable<APIChangelogBuild>
|
2018-07-20 01:07:24 +08:00
|
|
|
|
{
|
|
|
|
|
[JsonProperty("id")]
|
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("version")]
|
|
|
|
|
public string Version { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("display_version")]
|
|
|
|
|
public string DisplayVersion { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("users")]
|
|
|
|
|
public long Users { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("created_at")]
|
2018-07-21 09:19:30 +08:00
|
|
|
|
public DateTimeOffset CreatedAt { get; set; }
|
2018-07-20 01:07:24 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty("update_stream")]
|
2019-05-13 16:24:33 +08:00
|
|
|
|
public APIUpdateStream UpdateStream { get; set; }
|
2018-07-20 01:07:24 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty("changelog_entries")]
|
2019-05-13 16:24:33 +08:00
|
|
|
|
public List<APIChangelogEntry> ChangelogEntries { get; set; }
|
2018-07-20 17:20:01 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty("versions")]
|
2019-06-17 15:32:38 +08:00
|
|
|
|
public VersionNavigation Versions { get; set; }
|
2019-05-13 15:24:32 +08:00
|
|
|
|
|
2019-07-04 15:16:17 +08:00
|
|
|
|
public string Url => $"https://osu.ppy.sh/home/changelog/{UpdateStream.Name}/{Version}";
|
2019-07-04 14:47:06 +08:00
|
|
|
|
|
2019-06-17 15:32:38 +08:00
|
|
|
|
public class VersionNavigation
|
2019-05-13 16:24:33 +08:00
|
|
|
|
{
|
|
|
|
|
[JsonProperty("next")]
|
|
|
|
|
public APIChangelogBuild Next { get; set; }
|
2019-05-13 15:24:32 +08:00
|
|
|
|
|
2019-05-13 16:24:33 +08:00
|
|
|
|
[JsonProperty("previous")]
|
|
|
|
|
public APIChangelogBuild Previous { get; set; }
|
|
|
|
|
}
|
2019-05-21 11:52:50 +08:00
|
|
|
|
|
2019-05-21 13:02:34 +08:00
|
|
|
|
public bool Equals(APIChangelogBuild other) => Id == other?.Id;
|
2019-05-21 12:34:35 +08:00
|
|
|
|
|
2019-05-21 11:52:50 +08:00
|
|
|
|
public override string ToString() => $"{UpdateStream.DisplayName} {DisplayVersion}";
|
2018-07-20 01:07:24 +08:00
|
|
|
|
}
|
|
|
|
|
}
|