You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This SDK is compatible with Appwrite server version 0.7.0. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-deno/releases).**
8
+
**This SDK is compatible with Appwrite server version 0.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-deno/releases).**
7
9
8
10
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
9
11
Use the Deno SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
@@ -18,6 +20,84 @@ Appwrite is an open-source backend as a service server that abstract and simplif
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.
28
+
29
+
```typescript
30
+
let client =newsdk.Client();
31
+
32
+
client
33
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
34
+
.setProject('5df5acd0d48c2') // Your project ID
35
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
36
+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
37
+
;
38
+
39
+
```
40
+
41
+
### Make your first request
42
+
43
+
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.
44
+
45
+
```typescript
46
+
let users =newsdk.Users(client);
47
+
48
+
let promise =users.create('email@example.com', 'password');
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
66
+
.setProject('5df5acd0d48c2') // Your project ID
67
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
68
+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
69
+
;
70
+
71
+
let promise =users.create('email@example.com', 'password');
72
+
73
+
promise.then(function (response) {
74
+
console.log(response);
75
+
}, function (error) {
76
+
console.log(error);
77
+
});
78
+
```
79
+
80
+
### Error Handling
81
+
The Appwrite Deno SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.
82
+
83
+
```typescript
84
+
let users =newsdk.Users(client);
85
+
86
+
try {
87
+
let res =awaitusers.create('email@example.com', 'password');
88
+
} catch(e) {
89
+
console.log(e.message);
90
+
}
91
+
```
92
+
93
+
### Learn more
94
+
You can use followng resources to learn more and get help
95
+
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
0 commit comments