#pragma once #include "ForwardDecl.hpp" #include #include #include #include namespace chatterino { class RecentMessagesApi { public: using ResultCallback = std::function &)>; using ErrorCallback = std::function; /** * @brief Loads recent messages for a channel using the Recent Messages API * * @param channelName Name of Twitch channel * @param channelPtr Weak pointer to Channel to use to build messages * @param onLoaded Callback taking the built messages as a const std::vector & * @param onError Callback called when the network request fails */ static void loadRecentMessages(const QString &channelName, std::weak_ptr channelPtr, ResultCallback onLoaded, ErrorCallback onError); }; } // namespace chatterino