Skip to content

Commit e050384

Browse files
committed
Bug Fixed: List Document
1 parent fd54471 commit e050384

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples/database/collection/document/listDocument.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33

44
int 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! \nResponse: " << response << std::endl;
16+
std::string response = databases.listDocument(databaseId, collectionId);
17+
std::cout << "Documents listed successfully! \nResponse: " << response << std::endl;
1518
} catch (const AppwriteException& ex) {
1619
std::cerr << "Exception: " << ex.what() << std::endl;
1720
}

tests/document/listDocument

33.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)