Skip to content

Commit 50c070c

Browse files
Merge pull request #34 from appwrite/dev
update to support 1.0.0-RC1
2 parents 0b061a1 + 30abd9b commit 50c070c

Some content is hidden

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

69 files changed

+2428
-1027
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
99

1010
3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1111

12-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

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

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-0.15.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.0.0-RC1-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.15.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).**
9+
**This SDK is compatible with Appwrite server version 1.0.0-RC1. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-node/releases).**
1010

1111
> This is the Node.js SDK for integrating with Appwrite from your Node.js server-side code.
1212
If you're looking to integrate from the browser, you should check [appwrite/sdk-for-web](https://github.com/appwrite/sdk-for-web)

docs/examples/databases/create-boolean-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createBooleanAttribute('[COLLECTION_ID]', '', false);
14+
const promise = databases.createBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false);
1515

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

docs/examples/databases/create-collection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]);
14+
const promise = databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]');
1515

1616
promise.then(function (response) {
1717
console.log(response);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const sdk = require('node-appwrite');
2+
3+
// Init SDK
4+
const client = new sdk.Client();
5+
6+
const databases = new sdk.Databases(client);
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+
const promise = databases.createDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false);
15+
16+
promise.then(function (response) {
17+
console.log(response);
18+
}, function (error) {
19+
console.log(error);
20+
});

docs/examples/databases/create-document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {});
14+
const promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {});
1515

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

docs/examples/databases/create-email-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createEmailAttribute('[COLLECTION_ID]', '', false);
14+
const promise = databases.createEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false);
1515

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

docs/examples/databases/create-enum-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createEnumAttribute('[COLLECTION_ID]', '', [], false);
14+
const promise = databases.createEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false);
1515

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

docs/examples/databases/create-float-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createFloatAttribute('[COLLECTION_ID]', '', false);
14+
const promise = databases.createFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false);
1515

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

docs/examples/databases/create-index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const sdk = require('node-appwrite');
33
// Init SDK
44
const client = new sdk.Client();
55

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

88
client
99
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = databases.createIndex('[COLLECTION_ID]', '', 'key', []);
14+
const promise = databases.createIndex('[DATABASE_ID]', '[COLLECTION_ID]', '', 'key', []);
1515

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

0 commit comments

Comments
 (0)