summaryrefslogtreecommitdiff
path: root/src/schemas/stream.cpp
blob: 6ef10dc740c3b8642a68286ce2a2326626215caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
    }
  }
}