Fixed 7tv & Twitch reconnection. Added adbreak, follow, subscription handlers for Twitch. Added multi-chat support. Added support to unsubscribe from Twitch event subs.
This commit is contained in:
15
Twitch/Socket/Messages/ChannelAdBreakMessage.cs
Normal file
15
Twitch/Socket/Messages/ChannelAdBreakMessage.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
{
|
||||
public class ChannelAdBreakMessage
|
||||
{
|
||||
public string DurationSeconds { get; set; }
|
||||
public DateTime StartedAt { get; set; }
|
||||
public string IsAutomatic { get; set; }
|
||||
public string BroadcasterUserId { get; set; }
|
||||
public string BroadcasterUserLogin { get; set; }
|
||||
public string BroadcasterUserName { get; set; }
|
||||
public string RequesterUserId { get; set; }
|
||||
public string RequesterUserLogin { get; set; }
|
||||
public string RequesterUserName { get; set; }
|
||||
}
|
||||
}
|
13
Twitch/Socket/Messages/ChannelFollowMessage.cs
Normal file
13
Twitch/Socket/Messages/ChannelFollowMessage.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
{
|
||||
public class ChannelFollowMessage
|
||||
{
|
||||
public string BroadcasterUserId { get; set; }
|
||||
public string BroadcasterUserLogin { get; set; }
|
||||
public string BroadcasterUserName { get; set; }
|
||||
public string UserId { get; set; }
|
||||
public string UserLogin { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public DateTime FollowedAt { get; set; }
|
||||
}
|
||||
}
|
10
Twitch/Socket/Messages/ChannelResubscriptionMessage.cs
Normal file
10
Twitch/Socket/Messages/ChannelResubscriptionMessage.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
{
|
||||
public class ChannelResubscriptionMessage : ChannelSubscriptionData
|
||||
{
|
||||
public TwitchChatMessageInfo Message { get; set; }
|
||||
public int CumulativeMonths { get; set; }
|
||||
public int StreakMonths { get; set; }
|
||||
public int DurationMonths { get; set; }
|
||||
}
|
||||
}
|
9
Twitch/Socket/Messages/ChannelSubscriptionGiftMessage.cs
Normal file
9
Twitch/Socket/Messages/ChannelSubscriptionGiftMessage.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
{
|
||||
public class ChannelSubscriptionGiftMessage : ChannelSubscriptionData
|
||||
{
|
||||
public int Total { get; set; }
|
||||
public int? CumulativeTotal { get; set; }
|
||||
public bool IsAnonymous { get; set; }
|
||||
}
|
||||
}
|
@ -1,17 +1,18 @@
|
||||
namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
{
|
||||
public class ChannelSubscriptionMessage
|
||||
public class ChannelSubscriptionData
|
||||
{
|
||||
public string UserId { get; set; }
|
||||
public string UserLogin { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string BroadcasterUserId { get; set; }
|
||||
public string BroadcasterUserLogin { get; set; }
|
||||
public string BroadcasterUserName { get; set; }
|
||||
public string ChatterUserId { get; set; }
|
||||
public string ChatterUserLogin { get; set; }
|
||||
public string ChatterUserName { get; set; }
|
||||
public string Tier { get; set; }
|
||||
public TwitchChatMessageInfo Message { get; set; }
|
||||
public int CumulativeMonths { get; set; }
|
||||
public int StreakMonths { get; set; }
|
||||
public int DurationMonths { get; set; }
|
||||
}
|
||||
|
||||
public class ChannelSubscriptionMessage : ChannelSubscriptionData
|
||||
{
|
||||
public bool IsGifted { get; set; }
|
||||
}
|
||||
}
|
@ -6,5 +6,10 @@ namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
public int Total { get; set; }
|
||||
public int TotalCost { get; set; }
|
||||
public int MaxTotalCost { get; set; }
|
||||
public EventResponsePagination? Pagination { get; set; }
|
||||
}
|
||||
|
||||
public class EventResponsePagination {
|
||||
public string Cursor { get; set; }
|
||||
}
|
||||
}
|
@ -11,7 +11,8 @@ namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? Cost { get; set; }
|
||||
|
||||
public EventSubscriptionMessage() {
|
||||
public EventSubscriptionMessage()
|
||||
{
|
||||
Type = string.Empty;
|
||||
Version = string.Empty;
|
||||
Condition = new Dictionary<string, string>();
|
||||
@ -45,7 +46,8 @@ namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? SessionId { get; }
|
||||
|
||||
public EventSubTransport() {
|
||||
public EventSubTransport()
|
||||
{
|
||||
Method = string.Empty;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,6 @@ namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
public string Id { get; set; }
|
||||
public string Status { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public object Event { get; set; }
|
||||
public object? Event { get; set; }
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ namespace TwitchChatTTS.Twitch.Socket.Messages
|
||||
public string Id { get; set; }
|
||||
public string Status { get; set; }
|
||||
public DateTime ConnectedAt { get; set; }
|
||||
public int KeepaliveTimeoutSeconds { get; set; }
|
||||
public int? KeepaliveTimeoutSeconds { get; set; }
|
||||
public string? ReconnectUrl { get; set; }
|
||||
public string? RecoveryUrl { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user