-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor changes to prepare for package release
- Loading branch information
Showing
9 changed files
with
209 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,45 @@ | ||
namespace YTLiveChat.Contracts.Models | ||
{ | ||
/// <summary> | ||
/// Represents the Author of the message | ||
/// </summary> | ||
public class Author | ||
{ | ||
/// <summary> | ||
/// Public name of the Author | ||
/// </summary> | ||
public required string Name { get; set; } | ||
|
||
/// <summary> | ||
/// ImagePart containing the Authors Thumbnail | ||
/// </summary> | ||
public ImagePart? Thumbnail { get; set; } | ||
|
||
/// <summary> | ||
/// ChannelId if available | ||
/// </summary> | ||
public string? ChannelId { get; set; } | ||
|
||
/// <summary> | ||
/// Current Badge of the Author within the Live Channel | ||
/// </summary> | ||
public Badge? Badge { get; set; } | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Badges available on YouTube for Users | ||
/// </summary> | ||
public class Badge | ||
{ | ||
/// <summary> | ||
/// Text representation of the Badge | ||
/// </summary> | ||
public required string Label { get; set; } | ||
|
||
/// <summary> | ||
/// ImagePart containing the Badge Thumbnail | ||
/// </summary> | ||
public ImagePart? Thumbnail { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,53 @@ | ||
namespace YTLiveChat.Contracts.Models | ||
{ | ||
/// <summary> | ||
/// ChatItem containing the full object with any MessageParts and Author details | ||
/// </summary> | ||
public class ChatItem | ||
{ | ||
/// <summary> | ||
/// Unique Identifier | ||
/// </summary> | ||
public required string Id { get; set; } | ||
|
||
/// <summary> | ||
/// Author of the ChatItem | ||
/// </summary> | ||
public required Author Author { get; set; } | ||
|
||
/// <summary> | ||
/// Array of all message parts (Image, Text or Emoji variant) | ||
/// </summary> | ||
public required MessagePart[] Message { get; set; } | ||
|
||
/// <summary> | ||
/// Contains the Superchat if any was given | ||
/// </summary> | ||
public Superchat? Superchat { get; set; } | ||
|
||
/// <summary> | ||
/// Whether or not Author has a Membership on the current Live Channel | ||
/// </summary> | ||
public bool IsMembership { get; set; } | ||
|
||
/// <summary> | ||
/// Whether or not Author is Verified on YT | ||
/// </summary> | ||
public bool IsVerified { get; set; } | ||
|
||
/// <summary> | ||
/// Whether or not Author is Owner of the current Live Channel | ||
/// </summary> | ||
public bool IsOwner { get; set; } | ||
|
||
/// <summary> | ||
/// Whether or not Author is a Moderator of the current Live Channel | ||
/// </summary> | ||
public bool IsModerator { get; set; } | ||
|
||
/// <summary> | ||
/// Timestamp of the ChatItem creation | ||
/// </summary> | ||
public DateTime Timestamp { get; set; } = DateTime.Now; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,48 @@ | ||
namespace YTLiveChat.Contracts.Models | ||
{ | ||
/// <summary> | ||
/// Base class for individual message parts | ||
/// </summary> | ||
public abstract class MessagePart { } | ||
|
||
/// <summary> | ||
/// Image variant of a message part | ||
/// </summary> | ||
public class ImagePart : MessagePart | ||
{ | ||
/// <summary> | ||
/// URL of the image | ||
/// </summary> | ||
public required string Url { get; set; } | ||
/// <summary> | ||
/// Alt string of the image | ||
/// </summary> | ||
public string? Alt { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Emoji variant of a message part | ||
/// </summary> | ||
public class EmojiPart : ImagePart | ||
{ | ||
/// <summary> | ||
/// Text representation of the emoji | ||
/// </summary> | ||
public required string EmojiText { get; set; } | ||
/// <summary> | ||
/// Whether or not Emoji is a custom emoji of the channel | ||
/// </summary> | ||
public bool IsCustomEmoji { get; set; } | ||
}; | ||
|
||
/// <summary> | ||
/// Text variant of a message part | ||
/// </summary> | ||
public class TextPart : MessagePart | ||
{ | ||
/// <summary> | ||
/// Contained text of the message | ||
/// </summary> | ||
public required string Text { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
namespace YTLiveChat.Contracts.Models | ||
{ | ||
/// <summary> | ||
/// Represents a Superchat | ||
/// </summary> | ||
public class Superchat | ||
{ | ||
/// <summary> | ||
/// Amount of $ gifted | ||
/// </summary> | ||
public required string Amount { get; set; } | ||
|
||
/// <summary> | ||
/// Color of Superchat | ||
/// </summary> | ||
public required string Color { get; set; } | ||
|
||
/// <summary> | ||
/// If Superchat is a sticker, contains an ImagePart with said Sticker | ||
/// </summary> | ||
public ImagePart? Sticker { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Authors>Agash Thamo.</Authors> | ||
<Description>InnerTube API for YouTube LiveChat to get Live Chat messages without API restrictions. Mainly intended for use in application for the streamer.</Description> | ||
<PackageProjectUrl>https://github.com/Agash/YTLiveChat/wiki</PackageProjectUrl> | ||
<PackageTags>library, youtube, live-chat, yt, streamer</PackageTags> | ||
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<PackageId>Agash.YTLiveChat</PackageId> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<EnablePackageValidation>true</EnablePackageValidation> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" /> | ||
<PackageReference Include="MinVer" Version="5.0.0"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
<None Include="LICENSE.txt" Pack="true" PackagePath=""/> | ||
<None Include="README.md" Pack="true" PackagePath=""/> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"rollForward": "feature", | ||
"version": "8.0.204" | ||
} | ||
} |