diff options
| author | moderndevslulw <moderndevslulw@alright.party> | 2025-04-04 01:12:56 +0500 |
|---|---|---|
| committer | moderndevslulw <moderndevslulw@alright.party> | 2025-04-04 01:12:56 +0500 |
| commit | b19cee38da6bcdbaa8cd3a4115c0f24e7dadc9cd (patch) | |
| tree | bab265f888a37838607eb688924fb87640ef26ab /include | |
| parent | ee132dc6c326708706e0c88ba234a90aec7ee936 (diff) | |
feat: 7TV websocket client
Diffstat (limited to 'include')
| -rw-r--r-- | include/emotespp/seventv.hpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/emotespp/seventv.hpp b/include/emotespp/seventv.hpp index 8a4149d..cce8ae7 100644 --- a/include/emotespp/seventv.hpp +++ b/include/emotespp/seventv.hpp @@ -1,7 +1,28 @@ #pragma once +#include <nlohmann/json.hpp> +#include <string> +#include <vector> + +#include "emotespp/emotes.hpp" +#include "ixwebsocket/IXWebSocket.h" + namespace emotespp { - class SevenTVEmoteListener { - SevenTVEmoteListener(); + class SevenTVWebsocketClient : public RetrieveEmoteWebsocket<Emote> { + public: + SevenTVWebsocketClient(); + + void subscribe_emote_set(const std::string &emote_set_id); + void unsubscribe_emote_set(const std::string &emote_set_id); + + void start(); + + private: + Emote create_emote(const nlohmann::json &data); + + std::vector<std::string> ids; + ix::WebSocket websocket; + + bool is_connected = false; }; }
\ No newline at end of file |
