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 = \
22
22
updateDatabase \
23
23
getDatabase \
24
24
listDatabase \
25
- createCollection \
26
- createDocument \
25
+ getDatabaseUsage \
26
+ getCollectionUsage \
27
27
listCollection \
28
+ createCollection \
28
29
getCollection \
29
30
updateCollection \
30
31
deleteCollection \
32
+ createDocument \
33
+ listDocument \
34
+ getDocument \
35
+ deleteDocument \
36
+ listAttributes \
31
37
createBooleanAttribute \
32
38
createEmailAttribute \
33
39
createEnumAttribute \
34
40
createFloatAttribute \
35
- listAttributes \
41
+ createIntegerAttribute \
42
+ createIPaddressAttribute \
43
+ createStringAttribute \
36
44
updateBooleanAttribute \
37
45
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 \
38
82
39
83
# build all binaries
40
84
all : $(BINS )
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 = " " ;
6
+ std::string apiKey = " " ;
7
+ std::string databaseId = " database123" ;
8
+ std::string collectionId = " test1234" ;
9
+
7
10
Appwrite appwrite (projectId);
8
11
Databases& databases = appwrite.getDatabases ();
9
12
10
13
databases.setup (apiKey, projectId);
11
14
12
15
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;
15
18
} catch (const AppwriteException& ex) {
16
19
std::cerr << " Exception: " << ex.what () << std::endl;
17
20
}
You can’t perform that action at this time.
0 commit comments