Skip to content

Commit 88bdd26

Browse files
feat: support for 0.13.0
1 parent 2a3bc2b commit 88bdd26

File tree

13 files changed

+308
-82
lines changed

13 files changed

+308
-82
lines changed

README.md

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

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-web.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-0.12.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-0.13.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.12.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/releases).**
9+
**This SDK is compatible with Appwrite server version 0.13.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/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 Web 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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const sdk = new Appwrite();
2+
3+
sdk
4+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
;
7+
8+
let promise = sdk.account.updateSession('[SESSION_ID]');
9+
10+
promise.then(function (response) {
11+
console.log(response); // Success
12+
}, function (error) {
13+
console.log(error); // Failure
14+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const sdk = new Appwrite();
2+
3+
sdk
4+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
;
7+
8+
let promise = sdk.functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]');
9+
10+
promise.then(function (response) {
11+
console.log(response); // Success
12+
}, function (error) {
13+
console.log(error); // Failure
14+
});

docs/examples/storage/create-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let promise = sdk.storage.createFile('[FILE_ID]', document.getElementById('uploader').files[0]);
8+
let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]);
99

1010
promise.then(function (response) {
1111
console.log(response); // Success

docs/examples/storage/delete-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let promise = sdk.storage.deleteFile('[FILE_ID]');
8+
let promise = sdk.storage.deleteFile('[BUCKET_ID]', '[FILE_ID]');
99

1010
promise.then(function (response) {
1111
console.log(response); // Success

docs/examples/storage/get-file-download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let result = sdk.storage.getFileDownload('[FILE_ID]');
8+
let result = sdk.storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]');
99

1010
console.log(result); // Resource URL

docs/examples/storage/get-file-preview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let result = sdk.storage.getFilePreview('[FILE_ID]');
8+
let result = sdk.storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]');
99

1010
console.log(result); // Resource URL

docs/examples/storage/get-file-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let result = sdk.storage.getFileView('[FILE_ID]');
8+
let result = sdk.storage.getFileView('[BUCKET_ID]', '[FILE_ID]');
99

1010
console.log(result); // Resource URL

docs/examples/storage/get-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let promise = sdk.storage.getFile('[FILE_ID]');
8+
let promise = sdk.storage.getFile('[BUCKET_ID]', '[FILE_ID]');
99

1010
promise.then(function (response) {
1111
console.log(response); // Success

docs/examples/storage/list-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sdk
55
.setProject('5df5acd0d48c2') // Your project ID
66
;
77

8-
let promise = sdk.storage.listFiles();
8+
let promise = sdk.storage.listFiles('[BUCKET_ID]');
99

1010
promise.then(function (response) {
1111
console.log(response); // Success

0 commit comments

Comments
 (0)