Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8c6c121
Update IPaddress and sting attribute
sristy17 Oct 20, 2024
6ee76d4
Merge branch 'master' of https://github.com/pooranjoyb/cpp-sdk-appwri…
pooranjoyb Oct 20, 2024
cd2cc12
Feat: update IPaddress & String Attribute
sristy17 Oct 20, 2024
cfd4da3
Merge pull request #2 from pooranjoyb/Update_IP-Addres_and_String
sristy17 Oct 20, 2024
4474f95
feat:health apis & updated Utils::encodeUrl to handle query params
pooranjoyb Oct 21, 2024
fcb4d9c
Feat: Create Document
sristy17 Oct 21, 2024
be791cf
Feat: List Document
sristy17 Oct 21, 2024
3037cb2
Feat: Delete and Get Document
sristy17 Oct 21, 2024
afdc3e7
Docs: Updated Database Docs
sristy17 Oct 21, 2024
beae4f9
feat:create and list indexes
pooranjoyb Oct 22, 2024
0c829be
docs:indexes
pooranjoyb Oct 22, 2024
d777111
feat:getQueueMigrations, getQueueFunctions, getQueueMessaging, getQue…
pooranjoyb Oct 22, 2024
c6477ab
Merge branch 'master' of https://github.com/pooranjoyb/cpp-sdk-appwrite
pooranjoyb Oct 22, 2024
7fda97f
Feat: Get and Delete Indexes
sristy17 Oct 22, 2024
8aa9f65
Docs: Updated Database Docs
sristy17 Oct 22, 2024
89e28f0
docs:health+account
pooranjoyb Oct 23, 2024
a1430c3
bug-fix:createIndex => createIndexes
pooranjoyb Oct 23, 2024
f9e82c2
Feat: Get Database and Collection Usage
sristy17 Oct 24, 2024
19f635a
Docs: Updated Database Docs(Get Database Usage+ Get Collection Usage)
sristy17 Oct 24, 2024
be1273a
Create LICENSE
sristy17 Oct 26, 2024
2f20162
Update README.md
sristy17 Oct 26, 2024
d050684
Update README.md
pooranjoyb Oct 27, 2024
41c9437
typo:account-dir
pooranjoyb Oct 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Pooranjoy Bhattacharya

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 53 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ getDatabase: $(SRCS) $(EXAMPLES_DIR)/database/getDatabase.cpp
$(CXX) $(CXXFLAGS) -o tests/database/getDatabase $(SRCS) $(EXAMPLES_DIR)/database/getDatabase.cpp $(LDFLAGS)
listDatabase: $(SRCS) $(EXAMPLES_DIR)/database/listDatabase.cpp
$(CXX) $(CXXFLAGS) -o tests/database/listDatabase $(SRCS) $(EXAMPLES_DIR)/database/listDatabase.cpp $(LDFLAGS)

getDatabaseUsage: $(SRCS) $(EXAMPLES_DIR)/database/getDatabaseUsage.cpp
$(CXX) $(CXXFLAGS) -o tests/database/getDatabaseUsage $(SRCS) $(EXAMPLES_DIR)/database/getDatabaseUsage.cpp $(LDFLAGS)
getCollectionUsage: $(SRCS) $(EXAMPLES_DIR)/database/getCollectionUsage.cpp
$(CXX) $(CXXFLAGS) -o tests/database/getCollectionUsage $(SRCS) $(EXAMPLES_DIR)/database/getCollectionUsage.cpp $(LDFLAGS)

# Database - Collection
listCollection: $(SRCS) $(EXAMPLES_DIR)/database/collection/listCollection.cpp
Expand All @@ -68,9 +71,15 @@ updateCollection: $(SRCS) $(EXAMPLES_DIR)/database/collection/updateCollection.c
deleteCollection: $(SRCS) $(EXAMPLES_DIR)/database/collection/deleteCollection.cpp
$(CXX) $(CXXFLAGS) -o tests/collection/deleteCollection $(SRCS) $(EXAMPLES_DIR)/database/collection/deleteCollection.cpp $(LDFLAGS)

# Database - Document
createDocument: $(SRCS) $(EXAMPLES_DIR)/database/createDocument.cpp
$(CXX) $(CXXFLAGS) -o tests/createDocument $(SRCS) $(EXAMPLES_DIR)/database/createDocument.cpp $(LDFLAGS)
# Database-Collection-Document
createDocument: $(SRCS) $(EXAMPLES_DIR)/database/collection/document/createDocument.cpp
$(CXX) $(CXXFLAGS) -o tests/document/createDocument $(SRCS) $(EXAMPLES_DIR)/database/collection/document/createDocument.cpp $(LDFLAGS)
listDocument: $(SRCS) $(EXAMPLES_DIR)/database/collection/document/listDocument.cpp
$(CXX) $(CXXFLAGS) -o tests/document/listDocument $(SRCS) $(EXAMPLES_DIR)/database/collection/document/listDocument.cpp $(LDFLAGS)
deleteDocument: $(SRCS) $(EXAMPLES_DIR)/database/collection/document/deleteDocument.cpp
$(CXX) $(CXXFLAGS) -o tests/document/deleteDocument $(SRCS) $(EXAMPLES_DIR)/database/collection/document/deleteDocument.cpp $(LDFLAGS)
getDocument: $(SRCS) $(EXAMPLES_DIR)/database/collection/document/getDocument.cpp
$(CXX) $(CXXFLAGS) -o tests/document/getDocument $(SRCS) $(EXAMPLES_DIR)/database/collection/document/getDocument.cpp $(LDFLAGS)

#Collection-Attribute
listAttributes: $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/listAttributes.cpp
Expand Down Expand Up @@ -100,7 +109,20 @@ updateFloatAttribute: $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/upda
$(CXX) $(CXXFLAGS) -o tests/attribute/updateFloatAttribute $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateFloatAttribute.cpp $(LDFLAGS)
updateIntegerAttribute: $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateIntegerAttribute.cpp
$(CXX) $(CXXFLAGS) -o tests/attribute/updateIntegerAttribute $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateIntegerAttribute.cpp $(LDFLAGS)

updateIPaddressAttribute: $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateIPaddressAttribute.cpp
$(CXX) $(CXXFLAGS) -o tests/attribute/updateIPaddressAttribute $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateIPaddressAttribute.cpp $(LDFLAGS)
updateStringAttribute: $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateStringAttribute.cpp
$(CXX) $(CXXFLAGS) -o tests/attribute/updateStringAttribute $(SRCS) $(EXAMPLES_DIR)/database/collection/attribute/updateStringAttribute.cpp $(LDFLAGS)

# Collection-Indexes
listIndexes: $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/listIndexes.cpp
$(CXX) $(CXXFLAGS) -o tests/indexes/listIndexes $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/listIndexes.cpp $(LDFLAGS)
createIndex: $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/createIndex.cpp
$(CXX) $(CXXFLAGS) -o tests/indexes/createIndex $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/createIndex.cpp $(LDFLAGS)
deleteIndex: $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/deleteIndex.cpp
$(CXX) $(CXXFLAGS) -o tests/indexes/deleteIndex $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/deleteIndex.cpp $(LDFLAGS)
getIndex: $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/getIndex.cpp
$(CXX) $(CXXFLAGS) -o tests/indexes/getIndex $(SRCS) $(EXAMPLES_DIR)/database/collection/indexes/getIndex.cpp $(LDFLAGS)

# Storage
createBucket: $(SRCS) $(EXAMPLES_DIR)/storage/createBucket.cpp
Expand Down Expand Up @@ -135,6 +157,32 @@ getDB: $(SRCS) $(EXAMPLES_DIR)/health/getDB.cpp
$(CXX) $(CXXFLAGS) -o tests/health/getDB $(SRCS) $(EXAMPLES_DIR)/health/getDB.cpp $(LDFLAGS)
getPubSub: $(SRCS) $(EXAMPLES_DIR)/health/getPubSub.cpp
$(CXX) $(CXXFLAGS) -o tests/health/getPubSub $(SRCS) $(EXAMPLES_DIR)/health/getPubSub.cpp $(LDFLAGS)
getStorage: $(SRCS) $(EXAMPLES_DIR)/health/getStorage.cpp
$(CXX) $(CXXFLAGS) -o tests/health/getStorage $(SRCS) $(EXAMPLES_DIR)/health/getStorage.cpp $(LDFLAGS)
getStorageLocal: $(SRCS) $(EXAMPLES_DIR)/health/getStorageLocal.cpp
$(CXX) $(CXXFLAGS) -o tests/health/getStorageLocal $(SRCS) $(EXAMPLES_DIR)/health/getStorageLocal.cpp $(LDFLAGS)
getTime: $(SRCS) $(EXAMPLES_DIR)/health/getTime.cpp
$(CXX) $(CXXFLAGS) -o tests/health/getTime $(SRCS) $(EXAMPLES_DIR)/health/getTime.cpp $(LDFLAGS)
getQueue: $(SRCS) $(EXAMPLES_DIR)/health/getQueue.cpp
$(CXX) $(CXXFLAGS) -o tests/health/getQueue $(SRCS) $(EXAMPLES_DIR)/health/getQueue.cpp $(LDFLAGS)
getCertificate: $(SRCS) $(EXAMPLES_DIR)/health/params/getCertificate.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getCertificate $(SRCS) $(EXAMPLES_DIR)/health/params/getCertificate.cpp $(LDFLAGS)
getQueueBuilds: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueBuilds.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueBuilds $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueBuilds.cpp $(LDFLAGS)
getQueueCertificates: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueCertificates.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueCertificates $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueCertificates.cpp $(LDFLAGS)
getQueueUsageWebhooks: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueUsageWebhooks.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueUsageWebhooks $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueUsageWebhooks.cpp $(LDFLAGS)
getQueueUsageDump: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueUsageDump.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueUsageDump $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueUsageDump.cpp $(LDFLAGS)
getQueueFunctions: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueFunctions.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueFunctions $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueFunctions.cpp $(LDFLAGS)
getQueueMails: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueMails.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueMails $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueMails.cpp $(LDFLAGS)
getQueueMessaging: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueMessaging.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueMessaging $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueMessaging.cpp $(LDFLAGS)
getQueueMigrations: $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueMigrations.cpp
$(CXX) $(CXXFLAGS) -o tests/health/params/getQueueMigrations $(SRCS) $(EXAMPLES_DIR)/health/params/getQueueMigrations.cpp $(LDFLAGS)

clean:
rm -f tests/*
87 changes: 85 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
Can we do it?
# Appwrite C++ SDK

May God be with us <3
![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=flat-square&logo=c%2B%2B&logoColor=white)
![Appwrite](https://img.shields.io/badge/Appwrite-%23FD366E.svg?style=flat-square&logo=appwrite&logoColor=white)
![GitHub License](https://img.shields.io/github/license/pooranjoyb/cpp-sdk-appwrite)
![Version](https://img.shields.io/badge/api%20version-0.0.1-blue.svg?style=flat-square)

![banner-appwrite](https://github.com/user-attachments/assets/63e7dbad-6a49-4b80-bee2-8e0a46601eec)

## Overview

This **C++ SDK** is built from scratch as a **prototype** for interacting with Appwrite's backend services.
- It allows users to perform a limited set of functionalities as of now,
- including the **creation of databases, collections, and documents**,
- while also enabling the **retrieval of usage statistics** and
- management of **storage** and **account health**.

**This SDK is compatible with Appwrite server version 1.6.x.**

![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)


## Getting Started

### Make Your First Request

Set the neccessary header files.
```cpp
#include "Appwrite.hpp"
```
Once your SDK header is set, create the Appwrite service objects and choose the request to send.
```cpp
std::string projectId = "<your-project-id>";
std::string apiKey = "<your-api-key>";

Appwrite appwrite(projectId);

// for the Databases instance
Databases& databases = appwrite.getDatabases();
databases.setup(apiKey, projectId);
```

### Full Example
```cpp
#include "Appwrite.hpp"
#include <iostream>

int main() {
std::string projectId = "<your-project-id>";
std::string apiKey = "<your-api-key>";
std::string databaseId = "<unique-database-id>";
std::string name = "<unique-database-name>";
bool enabled = true;

Appwrite appwrite(projectId);
Databases& databases = appwrite.getDatabases();

databases.setup(apiKey, projectId);
std::string response = databases.create(databaseId, name, enabled);

return 0;
}

```
### Error Handling

The Appwrite C++ SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.

```cpp
try {
// Send some request here
} catch (const AppwriteException& ex) {
std::cerr << "Exception: " << ex.what() << std::endl;
}
```

For a more detailed view of the implementations, please check out the example directory. [Example](/examples/)

### Learn more
You can use the following resources to learn more and get help
- 🚀 [Getting Started Tutorial](youtube-link)
- 📜 [C++ SDK Docs](/docs)


## License
This project is licensed under the MIT License, and further details can be found in the [LICENSE](LICENSE) file.
9 changes: 9 additions & 0 deletions docs/Account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Class: Account
Works around with User Account in Appwrite

### Core

| Method Name | Usage | Link |
|-------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| `createAccount()` | Creates an account in the Appwrite project. | [Example](/examples/account/createAccount.cpp) |
| `createSession()` | Creates an session in the Appwrite project. | [Example](/examples/account/createSession.cpp) |
19 changes: 18 additions & 1 deletion docs/Databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Works around with Databases in Appwrite
| `get()` | Fetches the database from the Appwrite project using the unique database ID. | [Example](/examples/database/getDatabase.cpp) |
| `list()` | Retrieves a list of all databases in the Appwrite project. | [Example](/examples/database/listDatabase.cpp) |
| `update()` | Updates a databases details in the Appwrite project. | [Example](/examples/database/updateDatabase.cpp) |
| `getDatabaseUsage()` | Fetches databases Usage details in the Appwrite project. | [Example](/examples/database/getDatabaseUsage.cpp) |
| `getCollectionUsage()` | Fetches collection Usage details in the Appwrite project. | [Example](/examples/database/getCollectionUsage.cpp) |


### Collections
Expand Down Expand Up @@ -36,10 +38,25 @@ Works around with Databases in Appwrite
| `updateFloatAttribute()` | Updates Float Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/updateFloatAttribute.cpp) |
| `createIntegerAttribute()` | Create Integer Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/createIntegerAttribute.cpp) |
| `updateIntegerAttribute()` | Update Integer Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/updateIntegerAttribute.cpp) |
| `createIPaddressAttribute()` | Create IP Address Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/createIPaddressAttribute.cpp) |
| `updateIPaddressAttribute()` | Update IP Address Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/updateIPaddressAttribute.cpp) |
| `createStringAttribute()` | Create String Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/createStringAttribute.cpp) |
| `updateStringAttribute()` | Update String Attribute in the database in the Appwrite project | [Example](/examples/database/collection/attribute/updateStringAttribute.cpp) |

### Indexes

| Method Name | Usage | Link |
|-------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| `listIndexes()` | List all Indexes from the Collection in the database in the Appwrite project | [Example](/examples/database/collection/indexes/listIndexes.cpp) |
| `createIndex()` | Create Indexes in the Collection in the Appwrite project | [Example](/examples/database/collection/indexes/createIndex.cpp) |
| `getIndex()` | Fetch Indexes in the Collection in the Appwrite project | [Example](/examples/database/collection/indexes/getIndex.cpp) |
| `deleteIndex()` | Delete Indexes in the Collection in the Appwrite project | [Example](/examples/database/collection/indexes/deleteIndex.cpp) |

### Documents

| Method Name | Usage | Link |
|-------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| `createDocument` | Creates a new Document in the Appwrite Collection. | [Example](/examples/database/createDocument.cpp) |
| `createDocument` | Creates a new Document in the Appwrite Collection. | [Example](/examples/database/collection/document/createDocument.cpp) |
| `deleteDocument` | Delete Document in the Appwrite Collection. | [Example](/examples/database/collection/document/deleteDocument.cpp) |
| `getDocument` | Fetches the Document in the Appwrite Collection. | [Example](/examples/database/collection/document/getDocument.cpp) |
| `listDocument` | Retrives a list of Document in the Appwrite Collection. | [Example](/examples/database/collection/document/listDocument.cpp) |
13 changes: 13 additions & 0 deletions docs/Health.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ Works around with Health Checks in Appwrite
| `getCache()` | Fetches the cache status in the Appwrite project. | [Example](/examples/health/getCache.cpp) |
| `getDB()` | Fetches the DB in the Appwrite project. | [Example](/examples/health/getDB.cpp) |
| `getPubSub()` | Fetches the PubSub status in the Appwrite project. | [Example](/examples/health/getPubSub.cpp) |
| `getStorage()` | Fetches the Storage status in the Appwrite project. | [Example](/examples/health/getStorage.cpp) |
| `getStorageLocal()` | Fetches the Local storage status in the Appwrite project. | [Example](/examples/health/getStorageLocal.cpp) |
| `getTime()` | Fetches the time status in the Appwrite project. | [Example](/examples/health/getTime.cpp) |
| `getQueue()` | Fetches the queue status in the Appwrite project. | [Example](/examples/health/getQueue.cpp) |
| `getCertificate()` | Fetches the certificate status in the Appwrite project. | [Example](/examples/health/params/getCertificate.cpp) |
| `getQueueMails()` | Fetches the queue mails status in the Appwrite project. | [Example](/examples/health/params/getQueueMails.cpp) |
| `getQueueCertificates()` | Fetches the Queue Certificates status in the Appwrite project. | [Example](/examples/health/params/getQueueCertificates.cpp) |
| `getQueueBuilds()` | Fetches the Queue Builds status in the Appwrite project. | [Example](/examples/health/params/getQueueBuilds.cpp) |
| `getQueueMessaging()` | Fetches the Queue Messaging status in the Appwrite project. | [Example](/examples/health/params/getQueueMessaging.cpp) |
| `getQueueMigrations()` | Fetches the Queue Migrations status in the Appwrite project. | [Example](/examples/health/params/getQueueMigrations.cpp) |
| `getQueueFunctions()` | Fetches the Queue Functions status in the Appwrite project. | [Example](/examples/health/params/getQueueFunctions.cpp) |
| `getQueueUsageWebhooks()` | Fetches the Queue Usage Webhooks status in the Appwrite project. | [Example](/examples/health/params/getQueueUsageWebhooks.cpp) |
| `getQueueUsageDump()` | Fetches the Queue Usage Dump status in the Appwrite project. | [Example](/examples/health/params/getQueueUsageDump.cpp) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "Appwrite.hpp"
#include <iostream>

int main() {
std::string projectId = "66fbb5a100070a3a1d19";
std::string apiKey = "";
std::string databaseId = "database123";
std::string collectionId = "test1234";
std::string attributeId = "IPA123";
bool required = true;
std::string new_key = "UpdatedIPaddress123";
std::string defaultValue = "";

Appwrite appwrite(projectId);
Databases& databases = appwrite.getDatabases();

databases.setup(apiKey, projectId);

try {
std::string response = databases.updateIPaddressAttribute(databaseId, collectionId, attributeId, required, defaultValue, new_key);
std::cout << "IP Address attribute updated successfully!\nResponse: " << response << std::endl;
} catch (const AppwriteException& ex) {
std::cerr << "Appwrite exception: " << ex.what() << std::endl;
} catch (const std::exception& ex) {
std::cerr << "Standard exception: " << ex.what() << std::endl;
}

return 0;
}
Loading