Add a local backup of the Twitch Badges API (#4463)

This commit is contained in:
pajlada
2023-03-19 12:28:28 +01:00
committed by GitHub
parent 1ad93b7acc
commit 130b23edaf
5 changed files with 65 additions and 44 deletions
+5
View File
@@ -6,6 +6,7 @@
#include <boost/optional.hpp>
#include <pajlada/signals/signal.hpp>
#include <QIcon>
#include <QJsonObject>
#include <QMap>
#include <QString>
@@ -49,6 +50,10 @@ private:
TwitchBadges();
void loadTwitchBadges();
/**
* @brief Accepts a JSON blob from https://badges.twitch.tv/v1/badges/global/display and updates our badges with it
**/
void parseTwitchBadges(QJsonObject root);
void loaded();
void loadEmoteImage(const QString &name, ImagePtr image,
BadgeIconCallback &&callback);