Skip to content

Commit 866d738

Browse files
committed
Upgraded to support Appwrite 0.7.0
1 parent c33b9f7 commit 866d738

File tree

9 files changed

+326
-115
lines changed

9 files changed

+326
-115
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2021 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Appwrite Web SDK
22

3-
![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1)
4-
![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1)
3+
![License](https://img.shields.io/github/license/appwrite/sdk-for-web.svg?v=1)
4+
![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1)
5+
6+
**This SDK is compatible with Appwrite server version 0.7.0. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/releases).**
57

68
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.
79
Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
@@ -30,7 +32,7 @@ import * as Appwrite from "appwrite";
3032
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
3133

3234
```html
33-
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.2.0"></script>
35+
<script src="https://cdn.jsdelivr.net/npm/appwrite@2.0.0"></script>
3436
```
3537

3638
## Getting Started
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
let 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.createExecution('[FUNCTION_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+
let 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.getExecution('[FUNCTION_ID]', '[EXECUTION_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+
let 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.listExecutions('[FUNCTION_ID]');
9+
10+
promise.then(function (response) {
11+
console.log(response); // Success
12+
}, function (error) {
13+
console.log(error); // Failure
14+
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "appwrite",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "1.2.0",
5+
"version": "2.0.0",
66
"license": "BSD-3-Clause",
77
"main": "src/sdk.js",
88
"types": "types/index.d.ts",
99
"repository": {
1010
"type": "git",
11-
"url": "https://github.com/appwrite/sdk-for-js"
11+
"url": "https://github.com/appwrite/sdk-for-web"
1212
},
1313
"devDependencies": {
1414
"typescript": "^3.6.4"

0 commit comments

Comments
 (0)