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:
110
ThreeXplWsClient/Events/EventModels.cs
Normal file
110
ThreeXplWsClient/Events/EventModels.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ThreeXplWsClient.Events;
|
||||
|
||||
public class BaseThreeXplPacketModel
|
||||
{
|
||||
[JsonPropertyName("connect")]
|
||||
public ThreeXplConnectDataModel? Connect { get; set; }
|
||||
[JsonPropertyName("id")]
|
||||
public int? Id { get; set; }
|
||||
[JsonPropertyName("error")]
|
||||
public ThreeXplErrorModel? Error { get; set; }
|
||||
[JsonPropertyName("subscribe")]
|
||||
public ThreeXplSubscribeModel? Subscribe { get; set; }
|
||||
[JsonPropertyName("push")]
|
||||
public ThreeXplPushModel? Push { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ThreeXplDataModel
|
||||
{
|
||||
[JsonPropertyName("blockchain")]
|
||||
public string? Blockchain { get; set; }
|
||||
[JsonPropertyName("module")]
|
||||
public string? Module { get; set; }
|
||||
[JsonPropertyName("block")]
|
||||
public int? Block { get; set; }
|
||||
[JsonPropertyName("transaction")]
|
||||
public string? Transaction { get; set; }
|
||||
[JsonPropertyName("sort_key")]
|
||||
public int? SortKey { get; set; }
|
||||
[JsonPropertyName("time")]
|
||||
public DateTimeOffset? Time { get; set; }
|
||||
[JsonPropertyName("currency")]
|
||||
public string? Currency { get; set; }
|
||||
[JsonPropertyName("effect")]
|
||||
public string? Effect { get; set; }
|
||||
[JsonPropertyName("failed")]
|
||||
public bool? Failed { get; set; }
|
||||
[JsonPropertyName("extra")]
|
||||
public object? Extra { get; set; }
|
||||
[JsonPropertyName("extra_indexed")]
|
||||
public object? ExtraIndexed { get; set; }
|
||||
[JsonPropertyName("address")]
|
||||
public string? Address { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplContextModel
|
||||
{
|
||||
// "time":"0.21778600 1718465848"
|
||||
[JsonPropertyName("time")]
|
||||
public string? Time { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplConnectDataModel
|
||||
{
|
||||
[JsonPropertyName("client")]
|
||||
public string? Client { get; set; }
|
||||
[JsonPropertyName("version")]
|
||||
public string? Version { get; set; }
|
||||
[JsonPropertyName("ping")]
|
||||
public int? Ping { get; set; }
|
||||
[JsonPropertyName("pong")]
|
||||
public bool? Pong { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplErrorModel
|
||||
{
|
||||
[JsonPropertyName("code")]
|
||||
public int? Code { get; set; }
|
||||
[JsonPropertyName("Message")]
|
||||
public string? Message { get; set; }
|
||||
[JsonPropertyName("temporary")]
|
||||
public bool? Temporary { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplSubscribeModel
|
||||
{
|
||||
[JsonPropertyName("recoverable")]
|
||||
public bool? Recoverable { get; set; }
|
||||
[JsonPropertyName("epoch")]
|
||||
public string? Epoch { get; set; }
|
||||
[JsonPropertyName("positioned")]
|
||||
public bool? Positioned { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplPushModel
|
||||
{
|
||||
[JsonPropertyName("channel")]
|
||||
public required string Channel { get; set; }
|
||||
[JsonPropertyName("pub")]
|
||||
public required ThreeXplPushPubModel Pub { get; set; }
|
||||
[JsonPropertyName("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ThreeXplPushPubModel
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public required ThreeXplPushDataModel Data { get; set; }
|
||||
}
|
||||
|
||||
public class ThreeXplPushDataModel
|
||||
{
|
||||
[JsonPropertyName("data")]
|
||||
public required List<ThreeXplDataModel> Data { get; set; }
|
||||
[JsonPropertyName("context")]
|
||||
public required ThreeXplContextModel Context { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user