mirror of
https://onedev.fprog.nl/DiscordClient
synced 2025-12-29 06:28:37 +01:00
Prepared data classes for user's profile.
This commit is contained in:
parent
f3e5e14af3
commit
6e7ee1c73d
24
DiscordClient/Data/Badge.cs
Normal file
24
DiscordClient/Data/Badge.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordClient.Data
|
||||
{
|
||||
public class Badge
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[JsonPropertyName("icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonPropertyName("link")]
|
||||
public Uri Link { get; set; }
|
||||
}
|
||||
}
|
||||
29
DiscordClient/Data/FullProfile.cs
Normal file
29
DiscordClient/Data/FullProfile.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordClient.Data
|
||||
{
|
||||
public class FullProfile
|
||||
{
|
||||
[JsonPropertyName("user")]
|
||||
public User User { get; set; }
|
||||
|
||||
[JsonPropertyName("profile_themes_experiment_bucket")]
|
||||
public long ProfileThemesExperimentBucket { get; set; }
|
||||
|
||||
[JsonPropertyName("user_profile")]
|
||||
public UserProfile UserProfile { get; set; }
|
||||
|
||||
[JsonPropertyName("badges")]
|
||||
public Badge[] Badges { get; set; }
|
||||
|
||||
[JsonPropertyName("mutual_guilds")]
|
||||
public MutualGuild[] MutualGuilds { get; set; }
|
||||
|
||||
[JsonPropertyName("legacy_username")]
|
||||
public string LegacyUsername { get; set; }
|
||||
}
|
||||
}
|
||||
17
DiscordClient/Data/MutualGuild.cs
Normal file
17
DiscordClient/Data/MutualGuild.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordClient.Data
|
||||
{
|
||||
public class MutualGuild
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("nick")]
|
||||
public string Nick { get; set; }
|
||||
}
|
||||
}
|
||||
35
DiscordClient/Data/User.cs
Normal file
35
DiscordClient/Data/User.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordClient.Data
|
||||
{
|
||||
public class User
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("username")]
|
||||
public string? Username { get; set; }
|
||||
|
||||
[JsonPropertyName("global_name")]
|
||||
public string? GlobalName { get; set; }
|
||||
|
||||
[JsonPropertyName("avatar")]
|
||||
public string Avatar { get; set; }
|
||||
|
||||
[JsonPropertyName("discriminator")]
|
||||
public string? Discriminator { get; set; }
|
||||
|
||||
[JsonPropertyName("public_flags")]
|
||||
public long PublicFlags { get; set; }
|
||||
|
||||
[JsonPropertyName("flags")]
|
||||
public long Flags { get; set; }
|
||||
|
||||
[JsonPropertyName("bio")]
|
||||
public string Bio { get; set; }
|
||||
}
|
||||
}
|
||||
17
DiscordClient/Data/UserProfile.cs
Normal file
17
DiscordClient/Data/UserProfile.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordClient.Data
|
||||
{
|
||||
public class UserProfile
|
||||
{
|
||||
[JsonPropertyName("bio")]
|
||||
public string Bio { get; set; }
|
||||
|
||||
[JsonPropertyName("pronouns")]
|
||||
public string Pronouns { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue