Skip to content

Commit cc62c92

Browse files
committed
Update for 1.0.0
1 parent e3465ee commit cc62c92

17 files changed

+203
-27
lines changed

README.md

Lines changed: 5 additions & 5 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-1.0.0-RC1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.0.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.0.0-RC1. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/releases).**
9+
**This SDK is compatible with Appwrite server version 1.0.0. 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

@@ -33,7 +33,7 @@ import { Client, Account } from "appwrite";
3333
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:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/[email protected]-RC2"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
3737
```
3838

3939

@@ -64,7 +64,7 @@ Once your SDK object is set, access any of the Appwrite services and choose any
6464
const account = new Account(client);
6565

6666
// Register User
67-
account.create('[USER_ID]', '[email protected]', 'password', 'Jane Doe')
67+
account.create(ID.unique(), '[email protected]', 'password', 'Jane Doe')
6868
.then(function (response) {
6969
console.log(response);
7070
}, function (error) {
@@ -86,7 +86,7 @@ client
8686
const account = new Account(client);
8787

8888
// Register User
89-
account.create('[USER_ID]', '[email protected]', 'password', 'Jane Doe')
89+
account.create(ID.unique(), '[email protected]', 'password', 'Jane Doe')
9090
.then(function (response) {
9191
console.log(response);
9292
}, function (error) {

docs/examples/account/list-logs.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Account } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const account = new Account(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = account.listLogs();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Account } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const account = new Account(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = account.listSessions();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Locale } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const locale = new Locale(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = locale.listContinents();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Locale } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const locale = new Locale(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = locale.listCountriesEU();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Locale } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const locale = new Locale(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = locale.listCountriesPhones();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Locale } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const locale = new Locale(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = locale.listCountries();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Locale } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const locale = new Locale(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = locale.listCurrencies();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Locale } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const locale = new Locale(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = locale.listLanguages();
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Client, Teams } from "appwrite";
2+
3+
const client = new Client();
4+
5+
const teams = new Teams(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
const promise = teams.listMemberships('[TEAM_ID]');
13+
14+
promise.then(function (response) {
15+
console.log(response); // Success
16+
}, function (error) {
17+
console.log(error); // Failure
18+
});

0 commit comments

Comments
 (0)