Skip to content

Commit ea0085c

Browse files
committed
Release candidate for 1.5.x
1 parent f09f311 commit ea0085c

File tree

186 files changed

+7285
-261
lines changed

Some content is hidden

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

186 files changed

+7285
-261
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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.4.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.5.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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
.setSession('') // The user session to authenticate with
12+
;
13+
14+
15+
let promise = account.addAuthenticator(.Totp);
16+
17+
promise.then(function (response) {
18+
console.log(response);
19+
}, function (error) {
20+
console.log(error);
21+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createAnonymousSession();
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createEmailPasswordSession('email@example.com', 'password');
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createEmailToken('[USER_ID]', 'email@example.com');
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createJWT();
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createMagicURLToken('[USER_ID]', 'email@example.com');
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createOAuth2Session(OAuthProvider.Amazon);
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
2+
3+
// Init SDK
4+
let client = new sdk.Client();
5+
6+
let account = new sdk.Account(client);
7+
8+
client
9+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
;
12+
13+
14+
let promise = account.createPhoneToken('[USER_ID]', '+12065550100');
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let account = new sdk.Account(client);
88
client
99
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
11-
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
11+
.setSession('') // The user session to authenticate with
1212
;
1313

1414

0 commit comments

Comments
 (0)