1
0
Fork 0
mirror of synced 2024-07-07 15:36:19 +12:00
appwrite/app/sdks/console-javascript/docs/examples/database/get-collection.md
2020-02-23 20:09:34 +02:00

353 B

let sdk = new Appwrite();

sdk .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ;

let promise = sdk.database.getCollection('[COLLECTION_ID]');

promise.then(function (response) { console.log(response); // Success }, function (error) { console.log(error); // Failure });