Skip to content

Commit aade39b

Browse files
committed
Add support for 1.7
1 parent c863c42 commit aade39b

Some content is hidden

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

68 files changed

+2231
-150
lines changed

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-1.6.2-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.7.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.6.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.7.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)

docs/examples/avatars/get-browser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ const result = await avatars.getBrowser(
1111
sdk.Browser.AvantBrowser, // code
1212
0, // width (optional)
1313
0, // height (optional)
14-
0 // quality (optional)
14+
-1 // quality (optional)
1515
);

docs/examples/avatars/get-credit-card.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ const result = await avatars.getCreditCard(
1111
sdk.CreditCard.AmericanExpress, // code
1212
0, // width (optional)
1313
0, // height (optional)
14-
0 // quality (optional)
14+
-1 // quality (optional)
1515
);

docs/examples/avatars/get-flag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ const result = await avatars.getFlag(
1111
sdk.Flag.Afghanistan, // code
1212
0, // width (optional)
1313
0, // height (optional)
14-
0 // quality (optional)
14+
-1 // quality (optional)
1515
);

docs/examples/databases/create-document.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ const sdk = require('node-appwrite');
22

33
const client = new sdk.Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5-
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6-
.setSession(''); // The user session to authenticate with
5+
.setSession('') // The user session to authenticate with
6+
.setKey('<YOUR_API_KEY>') // Your secret API key
7+
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
78

89
const databases = new sdk.Databases(client);
910

docs/examples/databases/create-documents.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ const sdk = require('node-appwrite');
22

33
const client = new sdk.Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5-
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6-
.setSession(''); // The user session to authenticate with
5+
.setKey('<YOUR_API_KEY>'); // Your secret API key
76

87
const databases = new sdk.Databases(client);
98

docs/examples/databases/create-index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ const result = await databases.createIndex(
1313
'', // key
1414
sdk.IndexType.Key, // type
1515
[], // attributes
16-
[] // orders (optional)
16+
[], // orders (optional)
17+
[] // lengths (optional)
1718
);

docs/examples/functions/create-build.md renamed to docs/examples/functions/create-duplicate-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const client = new sdk.Client()
77

88
const functions = new sdk.Functions(client);
99

10-
const result = await functions.createBuild(
10+
const result = await functions.createDuplicateDeployment(
1111
'<FUNCTION_ID>', // functionId
1212
'<DEPLOYMENT_ID>', // deploymentId
1313
'<BUILD_ID>' // buildId (optional)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const sdk = require('node-appwrite');
2+
3+
const client = new sdk.Client()
4+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>') // Your project ID
6+
.setKey('<YOUR_API_KEY>'); // Your secret API key
7+
8+
const functions = new sdk.Functions(client);
9+
10+
const result = await functions.createTemplateDeployment(
11+
'<FUNCTION_ID>', // functionId
12+
'<REPOSITORY>', // repository
13+
'<OWNER>', // owner
14+
'<ROOT_DIRECTORY>', // rootDirectory
15+
'<VERSION>', // version
16+
false // activate (optional)
17+
);

docs/examples/functions/create-variable.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ const functions = new sdk.Functions(client);
1010
const result = await functions.createVariable(
1111
'<FUNCTION_ID>', // functionId
1212
'<KEY>', // key
13-
'<VALUE>' // value
13+
'<VALUE>', // value
14+
false // secret (optional)
1415
);

0 commit comments

Comments
 (0)