mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
3xpl websocket client in case anyone wanted one. Don't bother using it though, their websocket service is a piece of shit that's totally broken which I only found out after wasting a day on it.
This commit is contained in:
17
ThreeXplWsClient/Models/JwtResponseModels.cs
Normal file
17
ThreeXplWsClient/Models/JwtResponseModels.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ThreeXplWsClient.Models;
|
||||
|
||||
public class GetWebsocketTokenModel
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public required string Data { get; set; }
|
||||
[JsonPropertyName("context")]
|
||||
public GetWebSocketTokenContextModel? Context { get; set; }
|
||||
}
|
||||
|
||||
public class GetWebSocketTokenContextModel
|
||||
{
|
||||
[JsonPropertyName("code")]
|
||||
public int? Code { get; set; }
|
||||
}
|
||||
31
ThreeXplWsClient/Models/RequestModels.cs
Normal file
31
ThreeXplWsClient/Models/RequestModels.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ThreeXplWsClient.Models;
|
||||
|
||||
public class ConnectRequestModel
|
||||
{
|
||||
[JsonPropertyName("connect")]
|
||||
public required ConnectRequestTokenModel Connect { get; set; }
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; } = 1;
|
||||
}
|
||||
|
||||
public class ConnectRequestTokenModel
|
||||
{
|
||||
[JsonPropertyName("token")]
|
||||
public required string Token { get; set; }
|
||||
}
|
||||
|
||||
public class SubscribeRequestModel
|
||||
{
|
||||
[JsonPropertyName("subscribe")]
|
||||
public required SubscribeRequestChannelModel Subscribe { get; set; }
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; } = 2;
|
||||
}
|
||||
|
||||
public class SubscribeRequestChannelModel
|
||||
{
|
||||
[JsonPropertyName("channel")]
|
||||
public required string Channel { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user