Skip to content

Commit 85f8b19

Browse files
feat: introduce 0.15.x support
1 parent 284290a commit 85f8b19

Some content is hidden

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

50 files changed

+917
-326
lines changed

README.md

Lines changed: 2 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-0.14.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-0.15.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 0.14.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 0.15.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://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
12+
;
13+
14+
15+
let promise = account.createPhoneVerification();
16+
17+
promise.then(function (response) {
18+
console.log(response);
19+
}, function (error) {
20+
console.log(error);
21+
});
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://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
12+
;
13+
14+
15+
let promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]');
16+
17+
promise.then(function (response) {
18+
console.log(response);
19+
}, function (error) {
20+
console.log(error);
21+
});
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://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
12+
;
13+
14+
15+
let promise = account.updatePhone('', 'password');
16+
17+
promise.then(function (response) {
18+
console.log(response);
19+
}, function (error) {
20+
console.log(error);
21+
});

docs/examples/database/create-boolean-attribute.md renamed to docs/examples/databases/create-boolean-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as sdk from "https://deno.land/x/appwrite/mod.ts";
33
// Init SDK
44
let client = new sdk.Client();
55

6-
let database = new sdk.Database(client);
6+
let databases = new sdk.Databases(client, '[DATABASE_ID]');
77

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
@@ -12,7 +12,7 @@ client
1212
;
1313

1414

15-
let promise = database.createBooleanAttribute('[COLLECTION_ID]', '', false);
15+
let promise = databases.createBooleanAttribute('[COLLECTION_ID]', '', false);
1616

1717
promise.then(function (response) {
1818
console.log(response);
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 databases = new sdk.Databases(client, '[DATABASE_ID]');
7+
8+
client
9+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
10+
.setProject('5df5acd0d48c2') // Your project ID
11+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
12+
;
13+
14+
15+
let promise = databases.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]);
16+
17+
promise.then(function (response) {
18+
console.log(response);
19+
}, function (error) {
20+
console.log(error);
21+
});

docs/examples/database/create-document.md renamed to docs/examples/databases/create-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as sdk from "https://deno.land/x/appwrite/mod.ts";
33
// Init SDK
44
let client = new sdk.Client();
55

6-
let database = new sdk.Database(client);
6+
let databases = new sdk.Databases(client, '[DATABASE_ID]');
77

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
@@ -12,7 +12,7 @@ client
1212
;
1313

1414

15-
let promise = database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {});
15+
let promise = databases.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {});
1616

1717
promise.then(function (response) {
1818
console.log(response);

docs/examples/database/create-email-attribute.md renamed to docs/examples/databases/create-email-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as sdk from "https://deno.land/x/appwrite/mod.ts";
33
// Init SDK
44
let client = new sdk.Client();
55

6-
let database = new sdk.Database(client);
6+
let databases = new sdk.Databases(client, '[DATABASE_ID]');
77

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
@@ -12,7 +12,7 @@ client
1212
;
1313

1414

15-
let promise = database.createEmailAttribute('[COLLECTION_ID]', '', false);
15+
let promise = databases.createEmailAttribute('[COLLECTION_ID]', '', false);
1616

1717
promise.then(function (response) {
1818
console.log(response);

docs/examples/database/create-enum-attribute.md renamed to docs/examples/databases/create-enum-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as sdk from "https://deno.land/x/appwrite/mod.ts";
33
// Init SDK
44
let client = new sdk.Client();
55

6-
let database = new sdk.Database(client);
6+
let databases = new sdk.Databases(client, '[DATABASE_ID]');
77

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
@@ -12,7 +12,7 @@ client
1212
;
1313

1414

15-
let promise = database.createEnumAttribute('[COLLECTION_ID]', '', [], false);
15+
let promise = databases.createEnumAttribute('[COLLECTION_ID]', '', [], false);
1616

1717
promise.then(function (response) {
1818
console.log(response);

docs/examples/database/create-float-attribute.md renamed to docs/examples/databases/create-float-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as sdk from "https://deno.land/x/appwrite/mod.ts";
33
// Init SDK
44
let client = new sdk.Client();
55

6-
let database = new sdk.Database(client);
6+
let databases = new sdk.Databases(client, '[DATABASE_ID]');
77

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
@@ -12,7 +12,7 @@ client
1212
;
1313

1414

15-
let promise = database.createFloatAttribute('[COLLECTION_ID]', '', false);
15+
let promise = databases.createFloatAttribute('[COLLECTION_ID]', '', false);
1616

1717
promise.then(function (response) {
1818
console.log(response);

0 commit comments

Comments
 (0)