Push notifications
This commit is contained in:
24
NostrStreamer/ApiModel/PushMessage.cs
Normal file
24
NostrStreamer/ApiModel/PushMessage.cs
Normal 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; }
|
||||
|
||||
}
|
18
NostrStreamer/ApiModel/PushSubscriptionRequest.cs
Normal file
18
NostrStreamer/ApiModel/PushSubscriptionRequest.cs
Normal 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!;
|
||||
}
|
Reference in New Issue
Block a user