File tree Expand file tree Collapse file tree 3 files changed +53
-6
lines changed
examples/database/collection/document Expand file tree Collapse file tree 3 files changed +53
-6
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,63 @@ BINS = \
2222 updateDatabase \
2323 getDatabase \
2424 listDatabase \
25- createCollection \
26- createDocument \
25+ getDatabaseUsage \
26+ getCollectionUsage \
2727 listCollection \
28+ createCollection \
2829 getCollection \
2930 updateCollection \
3031 deleteCollection \
32+ createDocument \
33+ listDocument \
34+ getDocument \
35+ deleteDocument \
36+ listAttributes \
3137 createBooleanAttribute \
3238 createEmailAttribute \
3339 createEnumAttribute \
3440 createFloatAttribute \
35- listAttributes \
41+ createIntegerAttribute \
42+ createIPaddressAttribute \
43+ createStringAttribute \
3644 updateBooleanAttribute \
3745 updateEmailAttribute \
46+ updateEnumAttribute \
47+ updateFloatAttribute \
48+ updateIntegerAttribute \
49+ updateIPaddressAttribute \
50+ updateStringAttribute \
51+ listIndexes \
52+ createIndex \
53+ deleteIndex \
54+ getIndex \
55+ createBucket \
56+ updateBucket \
57+ listBuckets \
58+ getBucket \
59+ deleteBucket \
60+ getFile \
61+ updateFile \
62+ deleteFile \
63+ getFileDownload \
64+ getHealth \
65+ getAntivirus \
66+ getCache \
67+ getDB \
68+ getPubSub \
69+ getStorage \
70+ getStorageLocal \
71+ getTime \
72+ getQueue \
73+ getCertificate \
74+ getQueueBuilds \
75+ getQueueCertificates \
76+ getQueueUsageWebhooks \
77+ getQueueUsageDump \
78+ getQueueFunctions \
79+ getQueueMails \
80+ getQueueMessaging \
81+ getQueueMigrations \
3882
3983# build all binaries
4084all : $(BINS )
Original file line number Diff line number Diff line change 33
44int main () {
55 std::string projectId = " 66fbb5a100070a3a1d19" ;
6- std::string apiKey = " " ;
6+ std::string apiKey = " " ;
7+ std::string databaseId = " database123" ;
8+ std::string collectionId = " test1234" ;
9+
710 Appwrite appwrite (projectId);
811 Databases& databases = appwrite.getDatabases ();
912
1013 databases.setup (apiKey, projectId);
1114
1215 try {
13- std::string response = databases.listCollection ( );
14- std::cout << " Document listed successfully! \n Response: " << response << std::endl;
16+ std::string response = databases.listDocument (databaseId, collectionId );
17+ std::cout << " Documents listed successfully! \n Response: " << response << std::endl;
1518 } catch (const AppwriteException& ex) {
1619 std::cerr << " Exception: " << ex.what () << std::endl;
1720 }
You can’t perform that action at this time.
0 commit comments