Skip to content

Commit cf69e07

Browse files
committed
Updated examples
1 parent 4e77c58 commit cf69e07

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Add this to your package's `pubspec.yaml` file:
2020

2121
```yml
2222
dependencies:
23-
dart_appwrite: ^0.0.1
23+
dart_appwrite: ^0.1.0
2424
```
2525
2626
You can install packages from the command line:

example/README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,26 @@ Init your Appwrite client:
1313
1414
```
1515

16-
Create a new user and session:
16+
Create a new user:
1717

1818
```dart
19-
Account account = Account(client);
19+
Users users = Users(client);
2020
21-
Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name');
21+
Response result = await users.create(
22+
email: 'email@example.com',
23+
password: 'password',
24+
);
2225
23-
Response session = await account.createSession(email: 'me@appwrite.io', password: 'password');
24-
2526
```
2627

2728
Fetch user profile:
2829

2930
```dart
30-
Account account = Account(client);
31+
Users users = Users(client);
3132
32-
Response profile = await account.get();
33+
Response profile = await users.get(
34+
userId: '[USER_ID]',
35+
);
3336
```
3437

3538
Upload File:

lib/client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Client {
1717

1818
this.headers = {
1919
'content-type': 'application/json',
20-
'x-sdk-version': 'appwrite:dart:0.0.1',
20+
'x-sdk-version': 'appwrite:dart:0.1.0',
2121
};
2222

2323
this.config = {};

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_appwrite
2-
version: 0.0.1
2+
version: 0.1.0
33
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
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-dart

0 commit comments

Comments
 (0)