Skip to content

Commit ac649b6

Browse files
committed
Release candidate 4 for 1.5.x
1 parent 5f32cd1 commit ac649b6

File tree

263 files changed

+2755
-3819
lines changed

Some content is hidden

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

263 files changed

+2755
-3819
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.4.13-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.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)
Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
105
.setProject('5df5acd0d48c2') // Your project ID
11-
.setSession('') // The user session to authenticate with
12-
;
6+
.setSession(''); // The user session to authenticate with
137

8+
const account = new Account(client);
149

15-
let promise = account.addAuthenticator(AuthenticatorType.Totp);
10+
const response = await account.addAuthenticator(
11+
AuthenticatorType.Totp // type
12+
);
1613

17-
promise.then(function (response) {
18-
console.log(response);
19-
}, function (error) {
20-
console.log(error);
21-
});
14+
console.log(response);
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createAnonymousSession();
9+
const response = await account.createAnonymousSession();
1510

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
11+
console.log(response);
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createEmailPasswordSession('email@example.com', 'password');
9+
const response = await account.createEmailPasswordSession(
10+
'email@example.com', // email
11+
'password' // password
12+
);
1513

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
14+
console.log(response);
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createEmailToken('[USER_ID]', 'email@example.com');
9+
const response = await account.createEmailToken(
10+
'[USER_ID]', // userId
11+
'email@example.com', // email
12+
false // phrase (optional)
13+
);
1514

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
15+
console.log(response);
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createJWT();
9+
const response = await account.createJWT();
1510

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
11+
console.log(response);
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createMagicURLToken('[USER_ID]', 'email@example.com');
9+
const response = await account.createMagicURLToken(
10+
'[USER_ID]', // userId
11+
'email@example.com', // email
12+
'https://example.com', // url (optional)
13+
false // phrase (optional)
14+
);
1515

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
16+
console.log(response);
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account, OAuthProvider } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createOAuth2Session(OAuthProvider.Amazon);
9+
account.createOAuth2Session(
10+
OAuthProvider.Amazon, // provider
11+
'https://example.com', // success (optional)
12+
'https://example.com', // failure (optional)
13+
false, // token (optional)
14+
[] // scopes (optional)
15+
);
1516

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
.setProject('5df5acd0d48c2') // Your project ID
11-
;
5+
.setProject('5df5acd0d48c2'); // Your project ID
126

7+
const account = new Account(client);
138

14-
let promise = account.createPhoneToken('[USER_ID]', '+12065550100');
9+
const response = await account.createPhoneToken(
10+
'[USER_ID]', // userId
11+
'+12065550100' // phone
12+
);
1513

16-
promise.then(function (response) {
17-
console.log(response);
18-
}, function (error) {
19-
console.log(error);
20-
});
14+
console.log(response);
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
1+
import { Client, Account } from "https://deno.land/x/appwrite/mod.ts";
22

3-
// Init SDK
4-
let client = new sdk.Client();
5-
6-
let account = new sdk.Account(client);
7-
8-
client
3+
const client = new Client()
94
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
105
.setProject('5df5acd0d48c2') // Your project ID
11-
.setSession('') // The user session to authenticate with
12-
;
6+
.setSession(''); // The user session to authenticate with
137

8+
const account = new Account(client);
149

15-
let promise = account.createPhoneVerification();
10+
const response = await account.createPhoneVerification();
1611

17-
promise.then(function (response) {
18-
console.log(response);
19-
}, function (error) {
20-
console.log(error);
21-
});
12+
console.log(response);

0 commit comments

Comments
 (0)