-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.hpp
51 lines (42 loc) · 970 Bytes
/
user.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
SPDX-FileCopyrightText: 2018 Kamil Jakubus
SPDX-License-Identifier: MIT
*/
#ifndef TWITCHUSER_HPP
#define TWITCHUSER_HPP
#include <QObject>
#include <QString>
namespace Twitch
{
// Models
struct User {
enum class UserType { No, GlobalMod, Admin, Staff };
enum class BroadcasterType { No, Partner, Affiliate };
BroadcasterType m_broadcasterType;
QString m_description;
QString m_displayName;
QString m_email;
QString m_id;
QString m_login;
QString m_offlineImageUrl;
QString m_profileImageUrl;
UserType m_type;
int m_viewCount;
};
struct Follow {
QString m_fromId;
QString m_fromName;
QString m_toId;
QString m_toName;
QString m_followedAt;
};
struct UserFollows {
int m_total;
QList<Twitch::Follow> m_follows;
};
using Users = QList<User>;
}
Q_DECLARE_METATYPE(Twitch::User)
Q_DECLARE_METATYPE(Twitch::Users)
Q_DECLARE_METATYPE(Twitch::UserFollows)
#endif // TWITCHUSER_HPP