Skip to content

Commit 563c57c

Browse files
committed
Add 1.8.x support
1 parent 677988a commit 563c57c

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

+762
-115
lines changed

README.md

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

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.7.2-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.7.4-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.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**
9+
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/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 Console 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Databases } from "@appwrite.io/console";
2+
3+
const client = new Client()
4+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
6+
7+
const databases = new Databases(client);
8+
9+
const result = await databases.decrementDocumentAttribute(
10+
'<DATABASE_ID>', // databaseId
11+
'<COLLECTION_ID>', // collectionId
12+
'<DOCUMENT_ID>', // documentId
13+
'', // attribute
14+
null, // value (optional)
15+
null // min (optional)
16+
);
17+
18+
console.log(result);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Databases } from "@appwrite.io/console";
2+
3+
const client = new Client()
4+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
6+
7+
const databases = new Databases(client);
8+
9+
const result = await databases.incrementDocumentAttribute(
10+
'<DATABASE_ID>', // databaseId
11+
'<COLLECTION_ID>', // collectionId
12+
'<DOCUMENT_ID>', // documentId
13+
'', // attribute
14+
null, // value (optional)
15+
null // max (optional)
16+
);
17+
18+
console.log(result);

docs/examples/databases/upsert-documents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const databases = new Databases(client);
99
const result = await databases.upsertDocuments(
1010
'<DATABASE_ID>', // databaseId
1111
'<COLLECTION_ID>', // collectionId
12-
[] // documents (optional)
12+
[] // documents
1313
);
1414

1515
console.log(result);

docs/examples/domains/create-record-a-a-a-a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const result = await domains.createRecordAAAA(
1010
'<DOMAIN_ID>', // domainId
1111
'<NAME>', // name
1212
'', // value
13-
null, // ttl
13+
1, // ttl
1414
'<COMMENT>' // comment (optional)
1515
);
1616

docs/examples/domains/create-record-a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const result = await domains.createRecordA(
1010
'<DOMAIN_ID>', // domainId
1111
'<NAME>', // name
1212
'', // value
13-
null, // ttl
13+
1, // ttl
1414
'<COMMENT>' // comment (optional)
1515
);
1616

docs/examples/domains/create-record-alias.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const result = await domains.createRecordAlias(
1010
'<DOMAIN_ID>', // domainId
1111
'<NAME>', // name
1212
'<VALUE>', // value
13-
null, // ttl
13+
1, // ttl
1414
'<COMMENT>' // comment (optional)
1515
);
1616

docs/examples/domains/create-record-c-a-a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const result = await domains.createRecordCAA(
1010
'<DOMAIN_ID>', // domainId
1111
'<NAME>', // name
1212
'<VALUE>', // value
13-
null, // ttl
13+
1, // ttl
1414
'<COMMENT>' // comment (optional)
1515
);
1616

docs/examples/domains/create-record-c-n-a-m-e.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const result = await domains.createRecordCNAME(
1010
'<DOMAIN_ID>', // domainId
1111
'<NAME>', // name
1212
'<VALUE>', // value
13-
null, // ttl
13+
1, // ttl
1414
'<COMMENT>' // comment (optional)
1515
);
1616

docs/examples/domains/create-record-h-t-t-p-s.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const result = await domains.createRecordHTTPS(
1010
'<DOMAIN_ID>', // domainId
1111
'<NAME>', // name
1212
'<VALUE>', // value
13-
null, // ttl
13+
1, // ttl
1414
'<COMMENT>' // comment (optional)
1515
);
1616

0 commit comments

Comments
 (0)