summaryrefslogtreecommitdiff
path: root/src/schemas/stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/schemas/stream.cpp')
-rw-r--r--src/schemas/stream.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/schemas/stream.cpp b/src/schemas/stream.cpp
new file mode 100644
index 0000000..6ef10dc
--- /dev/null
+++ b/src/schemas/stream.cpp
@@ -0,0 +1,17 @@
+#include "stream.hpp"
+
+namespace bot::schemas {
+ EventType string_to_event_type(const std::string &type) {
+ if (type == "live") {
+ return EventType::LIVE;
+ } else if (type == "offline") {
+ return EventType::OFFLINE;
+ } else if (type == "title") {
+ return EventType::TITLE;
+ } else if (type == "game") {
+ return EventType::GAME;
+ } else {
+ return EventType::CUSTOM;
+ }
+ }
+}