Chatterino
Twitch.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QRegularExpression>
4 #include <QString>
5 #include <QStringList>
6 
7 namespace chatterino {
8 
9 extern const QStringList VALID_HELIX_COLORS;
10 
11 void openTwitchUsercard(const QString channel, const QString username);
12 
13 // stripUserName removes any @ prefix or , suffix to make it more suitable for command use
14 void stripUserName(QString &userName);
15 
16 // stripChannelName removes any @ prefix or , suffix to make it more suitable for command use
17 void stripChannelName(QString &channelName);
18 
19 // Matches a strict Twitch user login.
20 // May contain lowercase a-z, 0-9, and underscores
21 // Must contain between 1 and 25 characters
22 // Must not start with an underscore
23 QRegularExpression twitchUserLoginRegexp();
24 
25 // Matches a loose Twitch user login name.
26 // May contain lowercase and uppercase a-z, 0-9, and underscores
27 // Must contain between 1 and 25 characters
28 // Must not start with an underscore
29 QRegularExpression twitchUserNameRegexp();
30 
31 // Cleans up a color name input for use in the Helix API
32 // Will help massage color names like BlueViolet to the helix-acceptible blue_violet
33 // Will also lowercase the color
34 void cleanHelixColorName(QString &color);
35 
36 } // namespace chatterino
void stripUserName(QString &userName)
Definition: Twitch.cpp:41
void cleanHelixColorName(QString &color)
Definition: Twitch.cpp:81
Definition: Application.cpp:48
QRegularExpression twitchUserNameRegexp()
Definition: Twitch.cpp:65
void openTwitchUsercard(QString channel, QString username)
Definition: Twitch.cpp:35
const QStringList VALID_HELIX_COLORS
Definition: Twitch.hpp:9
QRegularExpression twitchUserLoginRegexp()
Definition: Twitch.cpp:74
void stripChannelName(QString &channelName)
Definition: Twitch.cpp:53