12 #include <rapidjson/document.h> 14 #include <QElapsedTimer> 45 : channelName(jsonObject.value(
"channel_name").toString())
46 , channelId(jsonObject.value(
"channel_id").toString())
47 , type(jsonObject.value(
"type").toString())
48 , tier(jsonObject.value(
"tier").toInt())
49 , isCustom(jsonObject.value(
"custom").toBool())
82 TwitchAccount(
const QString &username,
const QString &oauthToken_,
83 const QString &oauthClient_,
const QString &_userID);
85 virtual QString toString()
const override;
87 const QString &getUserName()
const;
88 const QString &getOAuthToken()
const;
89 const QString &getOAuthClient()
const;
90 const QString &getUserId()
const;
93 void setColor(QColor color);
97 bool setOAuthClient(
const QString &newClientID);
101 bool setOAuthToken(
const QString &newOAuthToken);
106 void blockUser(QString userId, std::function<
void()> onSuccess,
107 std::function<
void()> onFailure);
108 void unblockUser(QString userId, std::function<
void()> onSuccess,
109 std::function<
void()> onFailure);
114 void loadEmotes(std::weak_ptr<Channel> weakChannel = {});
117 void loadUserstateEmotes(std::weak_ptr<Channel> weakChannel = {});
120 [[nodiscard]]
bool setUserstateEmoteSets(QStringList newEmoteSets);
123 accessLocalEmotes()
const;
126 void autoModAllow(
const QString msgID,
ChannelPtr channel);
127 void autoModDeny(
const QString msgID,
ChannelPtr channel);
130 void loadEmoteSetData(std::shared_ptr<EmoteSet> emoteSet);
132 QString oauthClient_;
139 mutable std::mutex ignoresMutex_;
140 QStringList userstateEmoteSets_;
Definition: TwitchAccount.hpp:56
QString text
Definition: TwitchAccount.hpp:67
FollowResult
Definition: TwitchAccount.hpp:23
std::vector< QStringList > getEmoteSetBatches(QStringList emoteSetKeys)
Definition: Account.hpp:9
Definition: TwitchAccount.hpp:59
std::map< QString, EmoteSet > staticEmoteSets
Definition: TwitchAccount.hpp:72
std::vector< std::shared_ptr< EmoteSet > > emoteSets
Definition: TwitchAccount.hpp:75
Definition: UniqueAccess.hpp:10
QString key
Definition: TwitchAccount.hpp:65
std::vector< TwitchEmote > emotes
Definition: TwitchAccount.hpp:69
Definition: Application.cpp:48
const QString type
Definition: TwitchAccount.hpp:32
EmoteId id
Definition: TwitchAccount.hpp:60
Definition: TwitchAccount.hpp:29
Definition: TwitchAccount.hpp:24
TwitchEmoteSetResolverResponse(QJsonObject jsonObject)
Definition: TwitchAccount.hpp:44
Definition: UniqueAccess.hpp:53
const bool isCustom
Definition: TwitchAccount.hpp:34
EmoteName name
Definition: TwitchAccount.hpp:61
const QString channelId
Definition: TwitchAccount.hpp:31
const int tier
Definition: TwitchAccount.hpp:33
Definition: TwitchAccount.hpp:64
QString channelName
Definition: TwitchAccount.hpp:66
std::shared_ptr< Channel > ChannelPtr
Definition: Channel.hpp:125
Definition: TwitchAccount.hpp:74
EmoteMap emotes
Definition: TwitchAccount.hpp:79
Definition: TwitchAccount.hpp:26
Definition: TwitchAccount.hpp:25
const QString channelName
Definition: TwitchAccount.hpp:30