Skip to content

Commit 49de3c5

Browse files
add param checking and removed default values
1 parent 6d339cf commit 49de3c5

File tree

3 files changed

+171
-167
lines changed

3 files changed

+171
-167
lines changed

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { Appwrite } from "appwrite";
3434
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:
3535

3636
```html
37-
<script src="https://cdn.jsdelivr.net/npm/[email protected].4"></script>
37+
<script src="https://cdn.jsdelivr.net/npm/[email protected].5"></script>
3838
```
3939

4040

@@ -50,11 +50,12 @@ Initialize your SDK code with your project ID which can be found in your project
5050

5151
```js
5252
// Init your Web SDK
53-
const sdk = new Appwrite();
53+
const appwrite = new Appwrite();
5454

55-
sdk
55+
appwrite
5656
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint
5757
.setProject('455x34dfkj') // Your project ID
58+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
5859
;
5960
```
6061

@@ -63,32 +64,35 @@ Once your SDK object is set, access any of the Appwrite services and choose any
6364

6465
```js
6566
// Register User
66-
sdk.account.create('[email protected]', 'password', 'Jane Doe')
67-
.then(function (response) {
68-
console.log(response);
69-
}, function (error) {
70-
console.log(error);
71-
});
67+
appwrite
68+
.account.create('[email protected]', 'password', 'Jane Doe')
69+
.then(function (response) {
70+
console.log(response);
71+
}, function (error) {
72+
console.log(error);
73+
});
7274

7375
```
7476

7577
### Full Example
7678
```js
7779
// Init your Web SDK
78-
const sdk = new Appwrite();
80+
const appwrite = new Appwrite();
7981

80-
sdk
82+
appwrite
8183
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint
8284
.setProject('455x34dfkj')
85+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
8386
;
8487

8588
// Register User
86-
sdk.account.create('[email protected]', 'password', 'Jane Doe')
87-
.then(function (response) {
88-
console.log(response);
89-
}, function (error) {
90-
console.log(error);
91-
});
89+
appwrite
90+
.account.create('[email protected]', 'password', 'Jane Doe')
91+
.then(function (response) {
92+
console.log(response);
93+
}, function (error) {
94+
console.log(error);
95+
});
9296
```
9397

9498
### Learn more

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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": "3.0.4",
5+
"version": "3.0.5",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

0 commit comments

Comments
 (0)