renamed twitch api get functions

This commit is contained in:
fourtf
2018-06-26 17:12:50 +02:00
parent 54eb07e116
commit c74bc00106
6 changed files with 24 additions and 23 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ void TwitchAccount::loadIgnores()
void TwitchAccount::ignore(const QString &targetName,
std::function<void(IgnoreResult, const QString &)> onFinished)
{
getUserID(targetName, QThread::currentThread(), [=](QString targetUserID) {
twitchApiGetUserID(targetName, QThread::currentThread(), [=](QString targetUserID) {
this->ignoreByID(targetUserID, targetName, onFinished); //
});
}
@@ -179,7 +179,7 @@ void TwitchAccount::ignoreByID(const QString &targetUserID, const QString &targe
void TwitchAccount::unignore(const QString &targetName,
std::function<void(UnignoreResult, const QString &message)> onFinished)
{
getUserID(targetName, QThread::currentThread(), [=](QString targetUserID) {
twitchApiGetUserID(targetName, QThread::currentThread(), [=](QString targetUserID) {
this->unignoreByID(targetUserID, targetName, onFinished); //
});
}
+3 -3
View File
@@ -83,7 +83,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
}
}
get("https://tmi.twitch.tv/group/user/" + this->name + "/chatters",
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->name + "/chatters",
QThread::currentThread(), refreshChatters);
};
@@ -332,7 +332,7 @@ void TwitchChannel::refreshLiveStatus()
std::weak_ptr<Channel> weak = this->shared_from_this();
get2(url, QThread::currentThread(), false, [weak](const rapidjson::Document &d) {
twitchApiGet2(url, QThread::currentThread(), false, [weak](const rapidjson::Document &d) {
ChannelPtr shared = weak.lock();
if (!shared) {
@@ -432,7 +432,7 @@ void TwitchChannel::fetchRecentMessages()
std::weak_ptr<Channel> weak = this->shared_from_this();
get(genericURL.arg(roomID), QThread::currentThread(), [weak](QJsonObject obj) {
twitchApiGet(genericURL.arg(roomID), QThread::currentThread(), [weak](QJsonObject obj) {
ChannelPtr shared = weak.lock();
if (!shared) {