mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
YouTube PubSub
This commit is contained in:
41
KfChatDotNetBot/Models/YouTubeApiModels.cs
Normal file
41
KfChatDotNetBot/Models/YouTubeApiModels.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace KfChatDotNetBot.Models;
|
||||
|
||||
public class YouTubeApiModels
|
||||
{
|
||||
public class ContentDetailsRoot
|
||||
{
|
||||
[JsonPropertyName("kind")]
|
||||
public required string Kind { get; set; }
|
||||
[JsonPropertyName("items")]
|
||||
public required List<ItemModel> Items { get; set; }
|
||||
}
|
||||
|
||||
public class SnippetModel
|
||||
{
|
||||
[JsonPropertyName("publishedAt")]
|
||||
public required DateTime PublishedAt { get; set; }
|
||||
[JsonPropertyName("channelId")]
|
||||
public required string ChannelId { get; set; }
|
||||
[JsonPropertyName("title")]
|
||||
public required string Title { get; set; }
|
||||
[JsonPropertyName("description")]
|
||||
public required string Description { get; set; }
|
||||
[JsonPropertyName("channelTitle")]
|
||||
public required string ChannelTitle { get; set; }
|
||||
// "none", "live", "upcoming"
|
||||
[JsonPropertyName("liveBroadcastContent")]
|
||||
public required string LiveBroadcastContent { get; set; }
|
||||
}
|
||||
|
||||
public class ItemModel
|
||||
{
|
||||
[JsonPropertyName("kind")]
|
||||
public required string Kind { get; set; }
|
||||
[JsonPropertyName("id")]
|
||||
public required string Id { get; set; }
|
||||
[JsonPropertyName("snippet")]
|
||||
public required SnippetModel Snippet { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user