Skip to content

Commit 729f4ab

Browse files
committed
Release candidate 4 for 1.5.x
1 parent 43a7762 commit 729f4ab

File tree

270 files changed

+3943
-4711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+3943
-4711
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![pub package](https://img.shields.io/pub/v/dart_appwrite.svg?style=flat-square)](https://pub.dartlang.org/packages/dart_appwrite)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.4.x-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.5.x-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^11.0.0-rc.3
26+
dart_appwrite: ^11.0.0-rc.4
2727
```
2828
2929
You can install packages from the command line:
+13-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
.setSession(''); // The user session to authenticate with
67

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
.setSession('') // The user session to authenticate with
11-
;
8+
Account account = Account(client);
129

13-
Future result = account.addAuthenticator(
14-
type: AuthenticatorType.totp,
15-
);
10+
Future result = account.addAuthenticator(
11+
type: AuthenticatorType.totp,
12+
);
1613

17-
result
18-
.then((response) {
19-
print(response);
20-
}).catchError((error) {
21-
print(error.response);
22-
});
23-
}}
14+
result.then((response) {
15+
print(response);
16+
}).catchError((error) {
17+
print(error.response);
18+
});
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createAnonymousSession();
9+
Future result = account.createAnonymousSession();
1310

14-
result
15-
.then((response) {
16-
print(response);
17-
}).catchError((error) {
18-
print(error.response);
19-
});
20-
}}
11+
result.then((response) {
12+
print(response);
13+
}).catchError((error) {
14+
print(error.response);
15+
});
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createEmailPasswordSession(
13-
14-
password:'password' ,
15-
);
9+
Future result = account.createEmailPasswordSession(
10+
11+
password: 'password',
12+
);
1613

17-
result
18-
.then((response) {
19-
print(response);
20-
}).catchError((error) {
21-
print(error.response);
22-
});
23-
}}
14+
result.then((response) {
15+
print(response);
16+
}).catchError((error) {
17+
print(error.response);
18+
});
+14-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createEmailToken(
13-
userId:'[USER_ID]' ,
14-
15-
);
9+
Future result = account.createEmailToken(
10+
userId: '[USER_ID]',
11+
12+
phrase: false, // (optional)
13+
);
1614

17-
result
18-
.then((response) {
19-
print(response);
20-
}).catchError((error) {
21-
print(error.response);
22-
});
23-
}}
15+
result.then((response) {
16+
print(response);
17+
}).catchError((error) {
18+
print(error.response);
19+
});

docs/examples/account/create-j-w-t.md

+10-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createJWT();
9+
Future result = account.createJWT();
1310

14-
result
15-
.then((response) {
16-
print(response);
17-
}).catchError((error) {
18-
print(error.response);
19-
});
20-
}}
11+
result.then((response) {
12+
print(response);
13+
}).catchError((error) {
14+
print(error.response);
15+
});
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createMagicURLToken(
13-
userId:'[USER_ID]' ,
14-
15-
);
9+
Future result = account.createMagicURLToken(
10+
userId: '[USER_ID]',
11+
12+
url: 'https://example.com', // (optional)
13+
phrase: false, // (optional)
14+
);
1615

17-
result
18-
.then((response) {
19-
print(response);
20-
}).catchError((error) {
21-
print(error.response);
22-
});
23-
}}
16+
result.then((response) {
17+
print(response);
18+
}).catchError((error) {
19+
print(error.response);
20+
});
+16-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createOAuth2Session(
13-
provider: OAuthProvider.amazon,
14-
);
9+
Future result = account.createOAuth2Session(
10+
provider: OAuthProvider.amazon,
11+
success: 'https://example.com', // (optional)
12+
failure: 'https://example.com', // (optional)
13+
token: false, // (optional)
14+
scopes: [], // (optional)
15+
);
1516

16-
result
17-
.then((response) {
18-
print(response);
19-
}).catchError((error) {
20-
print(error.response);
21-
});
22-
}}
17+
result.then((response) {
18+
print(response);
19+
}).catchError((error) {
20+
print(error.response);
21+
});
+13-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2'); // Your project ID
66

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
;
7+
Account account = Account(client);
118

12-
Future result = account.createPhoneToken(
13-
userId:'[USER_ID]' ,
14-
phone:'+12065550100' ,
15-
);
9+
Future result = account.createPhoneToken(
10+
userId: '[USER_ID]',
11+
phone: '+12065550100',
12+
);
1613

17-
result
18-
.then((response) {
19-
print(response);
20-
}).catchError((error) {
21-
print(error.response);
22-
});
23-
}}
14+
result.then((response) {
15+
print(response);
16+
}).catchError((error) {
17+
print(error.response);
18+
});
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
.setSession(''); // The user session to authenticate with
67

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
.setSession('') // The user session to authenticate with
11-
;
8+
Account account = Account(client);
129

13-
Future result = account.createPhoneVerification();
10+
Future result = account.createPhoneVerification();
1411

15-
result
16-
.then((response) {
17-
print(response);
18-
}).catchError((error) {
19-
print(error.response);
20-
});
21-
}}
12+
result.then((response) {
13+
print(response);
14+
}).catchError((error) {
15+
print(error.response);
16+
});
+14-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
import 'package:dart_appwrite/dart_appwrite.dart';
22

3-
void main() { // Init SDK
4-
Client client = Client();
5-
Account account = Account(client);
3+
Client client = Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('5df5acd0d48c2') // Your project ID
6+
.setSession(''); // The user session to authenticate with
67

7-
client
8-
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9-
.setProject('5df5acd0d48c2') // Your project ID
10-
.setSession('') // The user session to authenticate with
11-
;
8+
Account account = Account(client);
129

13-
Future result = account.createRecovery(
14-
15-
url:'https://example.com' ,
16-
);
10+
Future result = account.createRecovery(
11+
12+
url: 'https://example.com',
13+
);
1714

18-
result
19-
.then((response) {
20-
print(response);
21-
}).catchError((error) {
22-
print(error.response);
23-
});
24-
}}
15+
result.then((response) {
16+
print(response);
17+
}).catchError((error) {
18+
print(error.response);
19+
});

0 commit comments

Comments
 (0)