2020-07-06 10:31:34 +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.
|
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2020-07-06 10:31:34 +08:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System;
|
2020-07-07 05:11:35 +08:00
|
|
|
|
using System.Net;
|
2020-07-06 10:31:34 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests.Responses
|
|
|
|
|
{
|
2020-07-06 12:28:44 +08:00
|
|
|
|
public class APINewsPost
|
2020-07-06 10:31:34 +08:00
|
|
|
|
{
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("id")]
|
2020-07-06 10:31:34 +08:00
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
2020-07-07 05:11:35 +08:00
|
|
|
|
private string author;
|
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("author")]
|
2020-07-07 05:11:35 +08:00
|
|
|
|
public string Author
|
|
|
|
|
{
|
|
|
|
|
get => author;
|
|
|
|
|
set => author = WebUtility.HtmlDecode(value);
|
|
|
|
|
}
|
2020-07-06 10:31:34 +08:00
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("edit_url")]
|
2020-07-06 10:31:34 +08:00
|
|
|
|
public string EditUrl { get; set; }
|
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("first_image")]
|
2020-07-06 10:31:34 +08:00
|
|
|
|
public string FirstImage { get; set; }
|
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("published_at")]
|
2020-07-07 04:55:20 +08:00
|
|
|
|
public DateTimeOffset PublishedAt { get; set; }
|
2020-07-06 10:31:34 +08:00
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("updated_at")]
|
2020-07-07 04:55:20 +08:00
|
|
|
|
public DateTimeOffset UpdatedAt { get; set; }
|
2020-07-06 10:31:34 +08:00
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("slug")]
|
2020-07-06 10:31:34 +08:00
|
|
|
|
public string Slug { get; set; }
|
|
|
|
|
|
2020-07-07 05:11:35 +08:00
|
|
|
|
private string title;
|
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("title")]
|
2020-07-07 05:11:35 +08:00
|
|
|
|
public string Title
|
|
|
|
|
{
|
|
|
|
|
get => title;
|
|
|
|
|
set => title = WebUtility.HtmlDecode(value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string preview;
|
2020-07-06 10:31:34 +08:00
|
|
|
|
|
2020-07-07 04:53:27 +08:00
|
|
|
|
[JsonProperty("preview")]
|
2020-07-07 05:11:35 +08:00
|
|
|
|
public string Preview
|
|
|
|
|
{
|
|
|
|
|
get => preview;
|
|
|
|
|
set => preview = WebUtility.HtmlDecode(value);
|
|
|
|
|
}
|
2020-07-06 10:31:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|