Migrate /unban and /untimeout to Helix API (#4026)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user