#pragma once #include #include "boost/optional.hpp" #include "common/Aliases.hpp" #include "common/Atomic.hpp" namespace chatterino { struct Emote; using EmotePtr = std::shared_ptr; class EmoteMap; class BttvEmotes final { static constexpr const char *globalEmoteApiUrl = "https://api.betterttv.net/2/emotes"; static constexpr const char *bttvChannelEmoteApiUrl = "https://api.betterttv.net/3/cached/users/twitch/"; public: BttvEmotes(); std::shared_ptr emotes() const; boost::optional emote(const EmoteName &name) const; void loadEmotes(); static void loadChannel(const QString &channelId, std::function callback); private: Atomic> global_; }; } // namespace chatterino