File tree 23 files changed +48
-121
lines changed
23 files changed +48
-121
lines changed Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
10
-
11
- health.setup (apiKey, projectId);
12
-
7
+ Appwrite appwrite (projectId, apiKey);
8
+
13
9
try {
14
- std::string response = health .getAntivirus ();
10
+ std::string response = appwrite. getHealth () .getAntivirus ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getCache ();
10
+ std::string response = appwrite. getHealth () .getCache ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getDB ();
10
+ std::string response = appwrite. getHealth () .getDB ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getHealth ();
10
+ std::string response = appwrite .getHealth (). getHealthStatus ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getPubSub ();
10
+ std::string response = appwrite. getHealth () .getPubSub ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getQueue ();
10
+ std::string response = appwrite. getHealth () .getQueue ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getStorage ();
10
+ std::string response = appwrite. getHealth () .getStorage ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
6
std::string apiKey = " " ;
7
-
8
- Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
7
+ Appwrite appwrite (projectId, apiKey);
10
8
11
- health.setup (apiKey, projectId);
12
-
13
9
try {
14
- std::string response = health .getStorageLocal ();
10
+ std::string response = appwrite. getHealth () .getStorageLocal ();
15
11
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
12
} catch (const AppwriteException& ex) {
17
13
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
-
8
6
Appwrite appwrite (projectId);
9
- Health& health = appwrite.getHealth ();
10
-
11
- health.setup (apiKey, projectId);
12
-
7
+
13
8
try {
14
- std::string response = health .getTime ();
9
+ std::string response = appwrite. getHealth () .getTime ();
15
10
std::cout << " Health Check Done! \n Response: " << response << std::endl;
16
11
} catch (const AppwriteException& ex) {
17
12
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string domain = " pooranjoyb.tech" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
11
-
12
- health.setup (apiKey, projectId);
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
13
9
14
10
try {
15
- std::string response = health .getCertificate (domain);
11
+ std::string response = appwrite. getHealth () .getCertificate (domain);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueBuilds (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueBuilds (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueCertificates (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueCertificates (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueFunctions (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueFunctions (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueMails (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueMails (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueMessaging (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueMessaging (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
11
-
12
- health.setup (apiKey, projectId);
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
13
9
14
10
try {
15
- std::string response = health .getQueueMigrations (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueMigrations (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueUsageDump (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueUsageDump (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
std::string projectId = " 66fbb5a100070a3a1d19" ;
6
- std::string apiKey = " " ;
7
6
std::string threshold = " 5" ;
8
-
9
- Appwrite appwrite (projectId);
10
- Health& health = appwrite.getHealth ();
7
+ std::string apiKey = " " ;
8
+ Appwrite appwrite (projectId, apiKey);
11
9
12
- health.setup (apiKey, projectId);
13
-
14
10
try {
15
- std::string response = health .getQueueUsageWebhooks (threshold);
11
+ std::string response = appwrite. getHealth () .getQueueUsageWebhooks (threshold);
16
12
std::cout << " Health Check Done! \n Response: " << response << std::endl;
17
13
} catch (const AppwriteException& ex) {
18
14
std::cerr << " Exception: " << ex.what () << std::endl;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Health {
11
11
Health (const std::string& projectId, const std::string& apiKey);
12
12
13
13
// core
14
- std::string getHealth ();
14
+ std::string getHealthStatus ();
15
15
std::string getAntivirus ();
16
16
std::string getCache ();
17
17
std::string getDB ();
Original file line number Diff line number Diff line change 10
10
Health::Health (const std::string& projectId, const std::string& apiKey)
11
11
: projectId(projectId), apiKey(apiKey) {}
12
12
13
- std::string Health::getHealth (){
13
+ std::string Health::getHealthStatus (){
14
14
15
15
std::string url = Config::API_BASE_URL + " /health" ;
16
16
You can’t perform that action at this time.
0 commit comments