Files
zap-stream-api/NostrStreamer/ApiModel/Account.cs
Kieran 3cabc7ac16
All checks were successful
continuous-integration/drone/push Build is passing
feat: restore default stream details
2025-05-30 12:42:41 +01:00

66 lines
1.4 KiB
C#

using Newtonsoft.Json;
namespace NostrStreamer.ApiModel;
public class Account
{
[JsonProperty("endpoints")]
public List<AccountEndpoint> Endpoints { get; init; } = new();
[JsonProperty("balance")]
public long Balance { get; init; }
[JsonProperty("tos")]
public AccountTos Tos { get; init; } = null!;
[JsonProperty("forwards")]
public List<ForwardDest> Forwards { get; init; } = new();
[JsonProperty("details")]
public PatchEvent? Details { get; init; }
}
public class AccountEndpoint
{
[JsonProperty("name")]
public string Name { get; init; } = null!;
[JsonProperty("url")]
public string Url { get; init; } = null!;
[JsonProperty("key")]
public string Key { get; init; } = null!;
[JsonProperty("cost")]
public EndpointCost Cost { get; init; } = null!;
[JsonProperty("capabilities")]
public List<string> Capabilities { get; init; } = new();
}
public class EndpointCost
{
[JsonProperty("rate")]
public double Rate { get; init; }
[JsonProperty("unit")]
public string Unit { get; init; } = null!;
}
public class AccountTos
{
[JsonProperty("accepted")]
public bool Accepted { get; init; }
[JsonProperty("link")]
public Uri Link { get; init; } = null!;
}
public class ForwardDest
{
[JsonProperty("id")]
public Guid Id { get;init; }
[JsonProperty("name")]
public string Name { get; init; } = null!;
}