From 655cc593762fbba9bdb811028fba48d600c27802 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 16 Mar 2021 17:51:17 +0545 Subject: [PATCH 1/3] deno getting started --- docs/sdks/deno/GETTING_STARTED.md | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/sdks/deno/GETTING_STARTED.md diff --git a/docs/sdks/deno/GETTING_STARTED.md b/docs/sdks/deno/GETTING_STARTED.md new file mode 100644 index 000000000..9c9698e7c --- /dev/null +++ b/docs/sdks/deno/GETTING_STARTED.md @@ -0,0 +1,60 @@ +## Getting Started + +### Init your SDK +Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from previous phase. + +```typescript +let client = new sdk.Client(); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +``` + +### Make your first request + +Once your SDK object is set, create any of the Appwrite service project objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section. + +```typescript +let users = new sdk.Users(client); + +let promise = users.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` + +### Full Example +```typescript +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +let client = new sdk.Client(); +let users = new sdk.Users(client); + +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = users.create('email@example.com', 'password'); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); +``` + +### Learn more +You can use followng resources to learn more and get help +- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) +- 📜 [Appwrite Docs](https://appwrite.io/docs) +- 💬 [Discord Community](https://appwrite.io/discord) +- 🚂 [Appwrite Deno Playground](https://github.com/appwrite/playground-for-deno) \ No newline at end of file From 4d9e021eb27ebd309a7801fb6b54501cb59cc68f Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 17 Mar 2021 10:35:27 +0545 Subject: [PATCH 2/3] corrections --- docs/sdks/deno/GETTING_STARTED.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sdks/deno/GETTING_STARTED.md b/docs/sdks/deno/GETTING_STARTED.md index 9c9698e7c..2b27d950f 100644 --- a/docs/sdks/deno/GETTING_STARTED.md +++ b/docs/sdks/deno/GETTING_STARTED.md @@ -1,7 +1,7 @@ ## Getting Started ### Init your SDK -Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from previous phase. +Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from project's API keys section. ```typescript let client = new sdk.Client(); @@ -57,4 +57,4 @@ You can use followng resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) -- 🚂 [Appwrite Deno Playground](https://github.com/appwrite/playground-for-deno) \ No newline at end of file +- 🚂 [Appwrite Deno Playground](https://github.com/appwrite/playground-for-deno) From 82e1ceb8a93f928b08e5a0af293bd9c9fa53fe79 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 17 Mar 2021 18:29:20 +0545 Subject: [PATCH 3/3] fix grammar --- docs/sdks/deno/GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/deno/GETTING_STARTED.md b/docs/sdks/deno/GETTING_STARTED.md index 2b27d950f..f0b10ed37 100644 --- a/docs/sdks/deno/GETTING_STARTED.md +++ b/docs/sdks/deno/GETTING_STARTED.md @@ -16,7 +16,7 @@ client ### Make your first request -Once your SDK object is set, create any of the Appwrite service project objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section. +Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section. ```typescript let users = new sdk.Users(client);