mirror of
https://onedev.fprog.nl/DiscordClient
synced 2025-12-28 13:28:37 +01:00
Added proper JsonPropertyNames.
This commit is contained in:
parent
57d4cbf98a
commit
ef94c1b3c9
|
|
@ -1,3 +1,22 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DiscordClient.Data;
|
||||
|
||||
public class ChannelMessagesResponse { }
|
||||
[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Skip)]
|
||||
public class ChannelMessagesResponse
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
[JsonPropertyName("content")]
|
||||
public string Content { get; set; }
|
||||
|
||||
[JsonPropertyName("channel_id")]
|
||||
public string ChannelId { get; set; }
|
||||
|
||||
[JsonPropertyName("author")]
|
||||
public MessageAuthor Author { get; set; }
|
||||
}
|
||||
|
|
|
|||
15
DiscordClient/Data/MessageAuthor.cs
Normal file
15
DiscordClient/Data/MessageAuthor.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DiscordClient.Data;
|
||||
|
||||
public class MessageAuthor
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; }
|
||||
|
||||
[JsonPropertyName("global_name")]
|
||||
public string GlobalName { get; set; }
|
||||
}
|
||||
Loading…
Reference in a new issue