Push notifications

This commit is contained in:
2023-12-18 12:19:09 +00:00
parent d087850f69
commit 053d34cde7
19 changed files with 1175 additions and 4 deletions

View File

@ -0,0 +1,24 @@
using Newtonsoft.Json;
namespace NostrStreamer.ApiModel;
public enum PushMessageType
{
StreamStarted = 1
}
public class PushMessage
{
[JsonProperty("type")]
public PushMessageType Type { get; init; }
[JsonProperty("pubkey")]
public string Pubkey { get; init; } = null!;
[JsonProperty("name")]
public string? Name { get; init; }
[JsonProperty("avatar")]
public string? Avatar { get; init; }
}

View File

@ -0,0 +1,18 @@
using Newtonsoft.Json;
namespace NostrStreamer.ApiModel;
public class PushSubscriptionRequest
{
[JsonProperty("endpoint")]
public string Endpoint { get; init; } = null!;
[JsonProperty("auth")]
public string Auth { get; init; } = null!;
[JsonProperty("key")]
public string Key { get; init; } = null!;
[JsonProperty("scope")]
public string Scope { get; init; } = null!;
}