@@ -14,13 +14,15 @@ namespace KeyAuth {
14
14
class api {
15
15
public:
16
16
17
- std::string name, ownerid, version, url, path;
17
+ std::string name, ownerid, version, url, path;
18
18
static bool debug;
19
19
20
- api (std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debugParameter = false ) {
20
+ api (std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debugParameter = false )
21
+ : name(name), ownerid(ownerid), version(version), url(url), path(path)
22
+ {
21
23
setDebug (debugParameter);
22
24
}
23
-
25
+
24
26
void ban (std::string reason = " " );
25
27
void init ();
26
28
void check (bool check_paid = false );
@@ -44,26 +46,26 @@ namespace KeyAuth {
44
46
void fetchstats ();
45
47
void forgot (std::string username, std::string email);
46
48
void logout ();
47
-
49
+
48
50
class subscriptions_class {
49
51
public:
50
52
std::string name;
51
53
std::string expiry;
52
54
};
53
-
55
+
54
56
class userdata {
55
57
public:
56
-
58
+
57
59
// user data
58
60
std::string username;
59
61
std::string ip;
60
62
std::string hwid;
61
63
std::string createdate;
62
64
std::string lastlogin;
63
-
65
+
64
66
std::vector<subscriptions_class> subscriptions;
65
67
};
66
-
68
+
67
69
class appdata {
68
70
public:
69
71
// app data
@@ -72,8 +74,9 @@ namespace KeyAuth {
72
74
std::string numKeys;
73
75
std::string version;
74
76
std::string customerPanelLink;
77
+ std::string downloadLink;
75
78
};
76
-
79
+
77
80
class responsedata {
78
81
public:
79
82
// response data
@@ -82,7 +85,7 @@ namespace KeyAuth {
82
85
std::string message;
83
86
bool isPaid{};
84
87
};
85
-
88
+
86
89
bool activate = false ;
87
90
class Tfa {
88
91
public:
@@ -92,13 +95,14 @@ namespace KeyAuth {
92
95
private:
93
96
void QrCode ();
94
97
};
95
-
98
+
96
99
Tfa& enable2fa (std::string code = " " );
97
100
Tfa& disable2fa (std::string code = " " );
98
-
101
+
99
102
userdata user_data;
100
103
appdata app_data;
101
104
responsedata response;
105
+ Tfa tfa;
102
106
103
107
private:
104
108
std::string sessionid, enckey;
0 commit comments