File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
examples/database/collection/document Expand file tree Collapse file tree 2 files changed +6
-3
lines changed 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