Implemented bit emotes (#2550)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -29,6 +29,41 @@ struct IvrSubage {
|
||||
}
|
||||
};
|
||||
|
||||
struct IvrEmoteSet {
|
||||
const QString setId;
|
||||
const QString displayName;
|
||||
const QString login;
|
||||
const QString id;
|
||||
const QString tier;
|
||||
const QJsonArray emotes;
|
||||
|
||||
IvrEmoteSet(QJsonObject root)
|
||||
: setId(root.value("setID").toString())
|
||||
, displayName(root.value("channelName").toString())
|
||||
, login(root.value("channelLogin").toString())
|
||||
, id(root.value("channelID").toString())
|
||||
, tier(root.value("tier").toString())
|
||||
, emotes(root.value("emotes").toArray())
|
||||
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct IvrEmote {
|
||||
const QString code;
|
||||
const QString id;
|
||||
const QString setId;
|
||||
const QString url;
|
||||
|
||||
IvrEmote(QJsonObject root)
|
||||
: code(root.value("token").toString())
|
||||
, id(root.value("id").toString())
|
||||
, setId(root.value("setID").toString())
|
||||
, url(root.value("url_3x").toString())
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class IvrApi final : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
@@ -37,6 +72,12 @@ public:
|
||||
ResultCallback<IvrSubage> resultCallback,
|
||||
IvrFailureCallback failureCallback);
|
||||
|
||||
// https://api.ivr.fi/docs#tag/Twitch/paths/~1twitch~1emoteset~1{setid}/get
|
||||
// however, we use undocumented endpoint, which takes ?set_id=1,2,3,4,... as query parameter
|
||||
void getBulkEmoteSets(QString emoteSetList,
|
||||
ResultCallback<QJsonArray> successCallback,
|
||||
IvrFailureCallback failureCallback);
|
||||
|
||||
static void initialize();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user