1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 11:37:52 +08:00
osu-lazer/osu.Game/Online/API/Requests/Responses/APINewsPost.cs

58 lines
1.4 KiB
C#
Raw Normal View History

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.
using Newtonsoft.Json;
using System;
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; }
private string author;
2020-07-07 04:53:27 +08:00
[JsonProperty("author")]
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; }
private string title;
2020-07-07 04:53:27 +08:00
[JsonProperty("title")]
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")]
public string Preview
{
get => preview;
set => preview = WebUtility.HtmlDecode(value);
}
2020-07-06 10:31:34 +08:00
}
}