Cleaned code up. Added OBS & 7tv ws support. Added dependency injection. App loads from yml file.

This commit is contained in:
Tom
2024-03-12 18:05:27 +00:00
parent 9cd6725570
commit b5cc6b5706
66 changed files with 1795 additions and 456 deletions

View File

@ -0,0 +1,10 @@
namespace TwitchChatTTS.OBS.Socket.Data
{
[Serializable]
public class EventMessage
{
public string eventType { get; set; }
public int eventIntent { get; set; }
public Dictionary<string, object> eventData { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace TwitchChatTTS.OBS.Socket.Data
{
[Serializable]
public class HelloMessage
{
public string obsWebSocketVersion { get; set; }
public int rpcVersion { get; set; }
public AuthenticationMessage authentication { get; set; }
}
public class AuthenticationMessage {
public string challenge { get; set; }
public string salt { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace TwitchChatTTS.OBS.Socket.Data
{
[Serializable]
public class IdentifiedMessage
{
public int negotiatedRpcVersion { get; set; }
}
}

View File

@ -0,0 +1,16 @@
namespace TwitchChatTTS.OBS.Socket.Data
{
[Serializable]
public class IdentifyMessage
{
public int rpcVersion { get; set; }
public string? authentication { get; set; }
public int eventSubscriptions { get; set; }
public IdentifyMessage(int version, string auth, int subscriptions) {
rpcVersion = version;
authentication = auth;
eventSubscriptions = subscriptions;
}
}
}

View File

@ -0,0 +1,16 @@
namespace TwitchChatTTS.OBS.Socket.Data
{
[Serializable]
public class RequestMessage
{
public string requestType { get; set; }
public string requestId { get; set; }
public Dictionary<string, object> requestData { get; set; }
public RequestMessage(string type, string id, Dictionary<string, object> data) {
requestType = type;
requestId = id;
requestData = data;
}
}
}

View File

@ -0,0 +1,11 @@
namespace TwitchChatTTS.OBS.Socket.Data
{
[Serializable]
public class RequestResponseMessage
{
public string requestType { get; set; }
public string requestId { get; set; }
public object requestStatus { get; set; }
public Dictionary<string, object> responseData { get; set; }
}
}