@@ -14,95 +14,95 @@ namespace KeyAuth {
14
14
class api {
15
15
public:
16
16
17
- std::string name, ownerid, version, url, path;
18
- static bool debug;
19
-
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
- {
23
- setDebug (debugParameter);
24
- }
25
-
26
- void ban (std::string reason = " " );
27
- void init ();
28
- void check (bool check_paid = false );
29
- void log (std::string msg);
30
- void license (std::string key, std::string code = " " );
31
- std::string var (std::string varid);
32
- std::string webhook (std::string id, std::string params, std::string body = " " , std::string contenttype = " " );
33
- void setvar (std::string var, std::string vardata);
34
- std::string getvar (std::string var);
35
- bool checkblack ();
36
- void web_login ();
37
- void button (std::string value);
38
- void upgrade (std::string username, std::string key);
39
- void login (std::string username, std::string password, std::string code = " " );
40
- std::vector<unsigned char > download (std::string fileid);
41
- void regstr (std::string username, std::string password, std::string key, std::string email = " " );
42
- void chatget (std::string channel);
43
- bool chatsend (std::string message, std::string channel);
44
- void changeUsername (std::string newusername);
45
- std::string fetchonline ();
46
- void fetchstats ();
47
- void forgot (std::string username, std::string email);
48
- void logout ();
49
-
50
- class subscriptions_class {
51
- public:
52
- std::string name;
53
- std::string expiry;
54
- };
55
-
56
- class userdata {
57
- public:
58
-
59
- // user data
60
- std::string username;
61
- std::string ip;
62
- std::string hwid;
63
- std::string createdate;
64
- std::string lastlogin;
65
-
66
- std::vector<subscriptions_class> subscriptions;
67
- };
68
-
69
- class appdata {
70
- public:
71
- // app data
72
- std::string numUsers;
73
- std::string numOnlineUsers;
74
- std::string numKeys;
75
- std::string version;
76
- std::string customerPanelLink;
77
- std::string downloadLink;
78
- };
79
-
80
- class responsedata {
81
- public:
82
- // response data
83
- std::vector<channel_struct> channeldata;
84
- bool success{};
85
- std::string message;
86
- bool isPaid{};
87
- };
88
-
89
- bool activate = false ;
90
- class Tfa {
91
- public:
92
- std::string secret;
93
- std::string link;
94
- Tfa& handleInput (KeyAuth::api& apiInstance);
95
- private:
96
- void QrCode ();
97
- };
98
-
99
- Tfa& enable2fa (std::string code = " " );
100
- Tfa& disable2fa (std::string code = " " );
101
-
102
- userdata user_data;
103
- appdata app_data;
104
- responsedata response;
105
- Tfa tfa;
17
+ std::string name, ownerid, version, url, path;
18
+ static bool debug;
19
+
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
+ {
23
+ setDebug (debugParameter);
24
+ }
25
+
26
+ void ban (std::string reason = " " );
27
+ void init ();
28
+ void check (bool check_paid = false );
29
+ void log (std::string msg);
30
+ void license (std::string key, std::string code = " " );
31
+ std::string var (std::string varid);
32
+ std::string webhook (std::string id, std::string params, std::string body = " " , std::string contenttype = " " );
33
+ void setvar (std::string var, std::string vardata);
34
+ std::string getvar (std::string var);
35
+ bool checkblack ();
36
+ void web_login ();
37
+ void button (std::string value);
38
+ void upgrade (std::string username, std::string key);
39
+ void login (std::string username, std::string password, std::string code = " " );
40
+ std::vector<unsigned char > download (std::string fileid);
41
+ void regstr (std::string username, std::string password, std::string key, std::string email = " " );
42
+ void chatget (std::string channel);
43
+ bool chatsend (std::string message, std::string channel);
44
+ void changeUsername (std::string newusername);
45
+ std::string fetchonline ();
46
+ void fetchstats ();
47
+ void forgot (std::string username, std::string email);
48
+ void logout ();
49
+
50
+ class subscriptions_class {
51
+ public:
52
+ std::string name;
53
+ std::string expiry;
54
+ };
55
+
56
+ class userdata {
57
+ public:
58
+
59
+ // user data
60
+ std::string username;
61
+ std::string ip;
62
+ std::string hwid;
63
+ std::string createdate;
64
+ std::string lastlogin;
65
+
66
+ std::vector<subscriptions_class> subscriptions;
67
+ };
68
+
69
+ class appdata {
70
+ public:
71
+ // app data
72
+ std::string numUsers;
73
+ std::string numOnlineUsers;
74
+ std::string numKeys;
75
+ std::string version;
76
+ std::string customerPanelLink;
77
+ std::string downloadLink;
78
+ };
79
+
80
+ class responsedata {
81
+ public:
82
+ // response data
83
+ std::vector<channel_struct> channeldata;
84
+ bool success{};
85
+ std::string message;
86
+ bool isPaid{};
87
+ };
88
+
89
+ bool activate = false ;
90
+ class Tfa {
91
+ public:
92
+ std::string secret;
93
+ std::string link;
94
+ Tfa& handleInput (KeyAuth::api& apiInstance);
95
+ private:
96
+ void QrCode ();
97
+ };
98
+
99
+ Tfa& enable2fa (std::string code = " " );
100
+ Tfa& disable2fa (std::string code = " " );
101
+
102
+ userdata user_data;
103
+ appdata app_data;
104
+ responsedata response;
105
+ Tfa tfa;
106
106
107
107
private:
108
108
std::string sessionid, enckey;
0 commit comments