2018-07-07 13:08:57 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
// Experimental class to test a method of calling APIs on twitch users
|
|
|
|
class PartialTwitchUser
|
|
|
|
{
|
|
|
|
PartialTwitchUser() = default;
|
|
|
|
|
|
|
|
QString username_;
|
|
|
|
QString id_;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static PartialTwitchUser byName(const QString &username);
|
|
|
|
static PartialTwitchUser byId(const QString &id);
|
|
|
|
|
2018-08-06 21:17:03 +02:00
|
|
|
void getId(std::function<void(QString)> successCallback,
|
|
|
|
const QObject *caller = nullptr);
|
2018-07-07 13:08:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|