Migrate /w to Helix API (#4052)

This commit is contained in:
nerix
2022-10-08 13:11:55 +02:00
committed by GitHub
parent 7f93885518
commit 974a8f11b7
8 changed files with 317 additions and 48 deletions
+27
View File
@@ -478,6 +478,19 @@ enum class HelixBanUserError { // /timeout, /ban
Forwarded,
}; // /timeout, /ban
enum class HelixWhisperError { // /w
Unknown,
UserMissingScope,
UserNotAuthorized,
Ratelimited,
NoVerifiedPhone,
RecipientBlockedUser,
WhisperSelf,
// The error message is forwarded directly from the Twitch API
Forwarded,
}; // /w
class IHelix
{
public:
@@ -719,6 +732,13 @@ public:
ResultCallback<> successCallback,
FailureCallback<HelixBanUserError, QString> failureCallback) = 0;
// Send a whisper
// https://dev.twitch.tv/docs/api/reference#send-whisper
virtual void sendWhisper(
QString fromUserID, QString toUserID, QString message,
ResultCallback<> successCallback,
FailureCallback<HelixWhisperError, QString> failureCallback) = 0;
virtual void update(QString clientId, QString oauthToken) = 0;
protected:
@@ -961,6 +981,13 @@ public:
ResultCallback<> successCallback,
FailureCallback<HelixBanUserError, QString> failureCallback) final;
// Send a whisper
// https://dev.twitch.tv/docs/api/reference#send-whisper
void sendWhisper(
QString fromUserID, QString toUserID, QString message,
ResultCallback<> successCallback,
FailureCallback<HelixWhisperError, QString> failureCallback) final;
void update(QString clientId, QString oauthToken) final;
static void initialize();