Migrate /unban and /untimeout to Helix API (#4026)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Aiden
2022-10-01 16:10:06 +01:00
committed by GitHub
parent adbc4690af
commit a275a1793a
5 changed files with 297 additions and 3 deletions
+31
View File
@@ -401,6 +401,19 @@ enum class HelixRemoveChannelVIPError {
Forwarded,
};
// These changes are from the helix-command-migration/unban-untimeout branch
enum class HelixUnbanUserError {
Unknown,
UserMissingScope,
UserNotAuthorized,
Ratelimited,
ConflictingOperation,
TargetNotBanned,
// The error message is forwarded directly from the Twitch API
Forwarded,
}; // These changes are from the helix-command-migration/unban-untimeout branch
class IHelix
{
public:
@@ -567,6 +580,15 @@ public:
FailureCallback<HelixRemoveChannelVIPError, QString>
failureCallback) = 0;
// These changes are from the helix-command-migration/unban-untimeout branch
// https://dev.twitch.tv/docs/api/reference#unban-user
// These changes are from the helix-command-migration/unban-untimeout branch
virtual void unbanUser(
QString broadcasterID, QString moderatorID, QString userID,
ResultCallback<> successCallback,
FailureCallback<HelixUnbanUserError, QString> failureCallback) = 0;
// These changes are from the helix-command-migration/unban-untimeout branch
virtual void update(QString clientId, QString oauthToken) = 0;
};
@@ -727,6 +749,15 @@ public:
FailureCallback<HelixRemoveChannelVIPError, QString>
failureCallback) final;
// These changes are from the helix-command-migration/unban-untimeout branch
// https://dev.twitch.tv/docs/api/reference#unban-user
// These changes are from the helix-command-migration/unban-untimeout branch
void unbanUser(
QString broadcasterID, QString moderatorID, QString userID,
ResultCallback<> successCallback,
FailureCallback<HelixUnbanUserError, QString> failureCallback) final;
// These changes are from the helix-command-migration/unban-untimeout branch
void update(QString clientId, QString oauthToken) final;
static void initialize();