Skip to content

Commit a78e3d2

Browse files
authored
Merge pull request #30 from appwrite/dev
Add 1.8.x support
2 parents 3e4e7cf + 1a9de21 commit a78e3d2

File tree

346 files changed

+8103
-1620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+8103
-1620
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Appwrite Deno SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

9-
**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-deno/releases).**
9+
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-deno/releases).**
1010

1111
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. Use the Deno SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1212

@@ -23,6 +23,7 @@ import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2323
## Getting Started
2424

2525
### Init your SDK
26+
2627
Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page and your new API secret Key from project's API keys section.
2728

2829
```typescript
@@ -48,6 +49,7 @@ console.log(user);
4849
```
4950

5051
### Full Example
52+
5153
```typescript
5254
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
5355

@@ -66,6 +68,7 @@ console.log(user);
6668
```
6769

6870
### Error Handling
71+
6972
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.
7073

7174
```typescript
@@ -79,6 +82,7 @@ try {
7982
```
8083

8184
### Learn more
85+
8286
You can use the following resources to learn more and get help
8387
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
8488
- 📜 [Appwrite Docs](https://appwrite.io/docs)

docs/examples/account/create-email-password-session.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const response = await account.createEmailPasswordSession(
10-
'[email protected]', // email
11-
'password' // password
12-
);
9+
const response = await account.createEmailPasswordSession({
10+
11+
password: 'password'
12+
});

docs/examples/account/create-email-token.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const response = await account.createEmailToken(
10-
'<USER_ID>', // userId
11-
'[email protected]', // email
12-
false // phrase (optional)
13-
);
9+
const response = await account.createEmailToken({
10+
userId: '<USER_ID>',
11+
12+
phrase: false // optional
13+
});

docs/examples/account/create-magic-u-r-l-token.md renamed to docs/examples/account/create-magic-url-token.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const response = await account.createMagicURLToken(
10-
'<USER_ID>', // userId
11-
'[email protected]', // email
12-
'https://example.com', // url (optional)
13-
false // phrase (optional)
14-
);
9+
const response = await account.createMagicURLToken({
10+
userId: '<USER_ID>',
11+
12+
url: 'https://example.com', // optional
13+
phrase: false // optional
14+
});

docs/examples/account/create-mfa-authenticator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ const client = new Client()
77

88
const account = new Account(client);
99

10-
const response = await account.createMfaAuthenticator(
11-
AuthenticatorType.Totp // type
12-
);
10+
const response = await account.createMFAAuthenticator({
11+
type: AuthenticatorType.Totp
12+
});

docs/examples/account/create-mfa-challenge.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const response = await account.createMfaChallenge(
10-
AuthenticationFactor.Email // factor
11-
);
9+
const response = await account.createMFAChallenge({
10+
factor: AuthenticationFactor.Email
11+
});

docs/examples/account/create-mfa-recovery-codes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const client = new Client()
77

88
const account = new Account(client);
99

10-
const response = await account.createMfaRecoveryCodes();
10+
const response = await account.createMFARecoveryCodes();

docs/examples/account/create-o-auth2token.md renamed to docs/examples/account/create-o-auth-2-token.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
account.createOAuth2Token(
10-
OAuthProvider.Amazon, // provider
11-
'https://example.com', // success (optional)
12-
'https://example.com', // failure (optional)
13-
[] // scopes (optional)
14-
);
9+
account.createOAuth2Token({
10+
provider: OAuthProvider.Amazon,
11+
success: 'https://example.com', // optional
12+
failure: 'https://example.com', // optional
13+
scopes: [] // optional
14+
});

docs/examples/account/create-phone-token.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const response = await account.createPhoneToken(
10-
'<USER_ID>', // userId
11-
'+12065550100' // phone
12-
);
9+
const response = await account.createPhoneToken({
10+
userId: '<USER_ID>',
11+
phone: '+12065550100'
12+
});

0 commit comments

Comments
 (0)