chat: add initial GuildsController
This commit is contained in:
		
							parent
							
								
									7b4cbd4fb7
								
							
						
					
					
						commit
						727f2f6ba2
					
				
					 23 changed files with 248 additions and 38 deletions
				
			
		
							
								
								
									
										8
									
								
								Foxchat.Core/Models/Channels.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Foxchat.Core/Models/Channels.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
namespace Foxchat.Core.Models;
 | 
			
		||||
 | 
			
		||||
public static class Channels
 | 
			
		||||
{
 | 
			
		||||
    public record Channel(string Id, string GuildId, string Name, string? Topic);
 | 
			
		||||
 | 
			
		||||
    public record PartialChannel(string Id, string Name);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										14
									
								
								Foxchat.Core/Models/Guilds.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Foxchat.Core/Models/Guilds.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
using Newtonsoft.Json;
 | 
			
		||||
 | 
			
		||||
namespace Foxchat.Core.Models;
 | 
			
		||||
 | 
			
		||||
public static class Guilds
 | 
			
		||||
{
 | 
			
		||||
    public record Guild(
 | 
			
		||||
        string Id,
 | 
			
		||||
        string Name,
 | 
			
		||||
        IEnumerable<string> OwnerIds,
 | 
			
		||||
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
 | 
			
		||||
        IEnumerable<Channels.PartialChannel>? Channels
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
namespace Foxchat.Core.Models.Http;
 | 
			
		||||
 | 
			
		||||
public static class Apps
 | 
			
		||||
public static class AppsApi
 | 
			
		||||
{
 | 
			
		||||
    public record CreateRequest(string Name, string[] Scopes, string[] RedirectUris);
 | 
			
		||||
    public record CreateResponse(Ulid Id, string ClientId, string ClientSecret, string Name, string[] Scopes, string[] RedirectUris);
 | 
			
		||||
							
								
								
									
										6
									
								
								Foxchat.Core/Models/Http/GuildsApi.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Foxchat.Core/Models/Http/GuildsApi.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
namespace Foxchat.Core.Models.Http;
 | 
			
		||||
 | 
			
		||||
public static class GuildsApi
 | 
			
		||||
{
 | 
			
		||||
    public record CreateGuildRequest(string Name);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								Foxchat.Core/Models/Users.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Foxchat.Core/Models/Users.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
namespace Foxchat.Core.Models;
 | 
			
		||||
 | 
			
		||||
public static class Users
 | 
			
		||||
{
 | 
			
		||||
    public record User(string Id, string Username, string Instance, string? AvatarUrl);
 | 
			
		||||
 | 
			
		||||
    public record PartialUser(string Id, string Username, string Instance);
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue