#pragma once #include #include #include "common/Atomic.hpp" #include "messages/Emote.hpp" namespace chatterino { class BttvEmotes final { static constexpr const char *globalEmoteApiUrl = "https://api.betterttv.net/2/emotes"; static constexpr const char *bttvChannelEmoteApiUrl = "https://api.betterttv.net/2/channels/"; public: BttvEmotes(); std::shared_ptr global() const; boost::optional global(const EmoteName &name) const; void loadGlobal(); static void loadChannel(const QString &channelName, std::function callback); private: Atomic> global_; }; } // namespace chatterino