Skip to content

Commit 6cb6f1c

Browse files
authored
Merge pull request #51 from appwrite/dev
Appwrite 1.2.0 support
2 parents 0fac3f6 + 6e64245 commit 6cb6f1c

27 files changed

+183
-269
lines changed

LICENSE

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

88
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
99

10-
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.
10+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1111

1212
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: 5 additions & 5 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-1.0.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.2.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.0.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.2.x. 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)
@@ -48,7 +48,7 @@ Once your SDK object is set, create any of the Appwrite service objects and choo
4848
```js
4949
let users = new sdk.Users(client);
5050

51-
let promise = users.create(ID.unique(), '[email protected]', 'password');
51+
let promise = users.create(sdk.ID.unique(), '[email protected]', undefined, 'password', 'Jane Doe');
5252

5353
promise.then(function (response) {
5454
console.log(response);
@@ -71,7 +71,7 @@ client
7171
;
7272

7373
let users = new sdk.Users(client);
74-
let promise = users.create(ID.unique(), '[email protected]', 'password');
74+
let promise = users.create(sdk.ID.unique(), '[email protected]', undefined, 'password', 'Jane Doe');
7575

7676
promise.then(function (response) {
7777
console.log(response);
@@ -87,7 +87,7 @@ The Appwrite Node SDK raises `AppwriteException` object with `message`, `code` a
8787
let users = new sdk.Users(client);
8888

8989
try {
90-
let res = await users.create(ID.unique(), '[email protected]', 'password');
90+
let res = await users.create(sdk.ID.unique(), '[email protected]', 'password');
9191
} catch(e) {
9292
console.log(e.message);
9393
}

docs/examples/account/get-logs.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/account/get-sessions.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/account/update-phone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client
1111
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
1212
;
1313

14-
const promise = account.updatePhone('', 'password');
14+
const promise = account.updatePhone('+12065550100', 'password');
1515

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

docs/examples/functions/retry-build.md renamed to docs/examples/functions/create-build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]');
14+
const promise = functions.createBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]');
1515

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

docs/examples/locale/get-currencies.md renamed to docs/examples/graphql/mutation.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 locale = new sdk.Locale(client);
6+
const graphql = new sdk.Graphql(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 = locale.getCurrencies();
14+
const promise = graphql.mutation({});
1515

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

docs/examples/locale/get-languages.md renamed to docs/examples/graphql/query.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 locale = new sdk.Locale(client);
6+
const graphql = new sdk.Graphql(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 = locale.getLanguages();
14+
const promise = graphql.query({});
1515

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

docs/examples/locale/get-continents.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/locale/get-countries-e-u.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/locale/get-countries-phones.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/locale/get-countries.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/teams/get-memberships.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/users/get-logs.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/users/get-memberships.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/users/get-sessions.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/examples/users/update-phone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = users.updatePhone('[USER_ID]', '');
14+
const promise = users.updatePhone('[USER_ID]', '+12065550100');
1515

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

0 commit comments

Comments
 (0)