diff options
Diffstat (limited to 'bot/src/schemas/stream.cpp')
| -rw-r--r-- | bot/src/schemas/stream.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bot/src/schemas/stream.cpp b/bot/src/schemas/stream.cpp new file mode 100644 index 0000000..6ef10dc --- /dev/null +++ b/bot/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; + } + } +} |
