Skip to content

Commit f181e11

Browse files
committed
Release candidate for 1.5.x
1 parent 0f63e3e commit f181e11

File tree

324 files changed

+7881
-712
lines changed

Some content is hidden

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

324 files changed

+7881
-712
lines changed

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2024 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:

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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)
99

10-
**This SDK is compatible with Appwrite server version 1.4.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-dart/releases).**
10+
**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-dart/releases).**
1111

1212
> This is the Dart SDK for integrating with Appwrite from your Dart server-side code. If you're looking for the Flutter SDK you should check [appwrite/sdk-for-flutter](https://github.com/appwrite/sdk-for-flutter)
1313
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^10.1.0
26+
dart_appwrite: ^11.0.0-rc.1
2727
```
2828
2929
You can install packages from the command line:

Diff for: docs/examples/account/add-authenticator.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
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+
;
12+
13+
Future result = account.addAuthenticator(
14+
factor: AuthenticatorFactor.totp,
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}}

Diff for: docs/examples/account/create-anonymous-session.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createAnonymousSession();
13+
14+
result
15+
.then((response) {
16+
print(response);
17+
}).catchError((error) {
18+
print(error.response);
19+
});
20+
}}

Diff for: docs/examples/account/create-challenge.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createChallenge(
13+
provider: AuthenticatorProvider.totp,
14+
);
15+
16+
result
17+
.then((response) {
18+
print(response);
19+
}).catchError((error) {
20+
print(error.response);
21+
});
22+
}}
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createEmailPasswordSession(
13+
14+
password:'password' ,
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}}

Diff for: docs/examples/account/create-email-token.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createEmailToken(
13+
userId:'[USER_ID]' ,
14+
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}}

Diff for: docs/examples/account/create-j-w-t.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createJWT();
13+
14+
result
15+
.then((response) {
16+
print(response);
17+
}).catchError((error) {
18+
print(error.response);
19+
});
20+
}}

Diff for: docs/examples/account/create-magic-u-r-l-token.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createMagicURLToken(
13+
userId:'[USER_ID]' ,
14+
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}}

Diff for: docs/examples/account/create-o-auth2session.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createOAuth2Session(
13+
provider: OAuthProvider.amazon,
14+
);
15+
16+
result
17+
.then((response) {
18+
print(response);
19+
}).catchError((error) {
20+
print(error.response);
21+
});
22+
}}

Diff for: docs/examples/account/create-phone-token.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createPhoneToken(
13+
userId:'[USER_ID]' ,
14+
phone:'+12065550100' ,
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}}

Diff for: docs/examples/account/create-phone-verification.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void main() { // Init SDK
77
client
88
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
10-
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
10+
.setSession('') // The user session to authenticate with
1111
;
1212

1313
Future result = account.createPhoneVerification();
@@ -18,4 +18,4 @@ void main() { // Init SDK
1818
}).catchError((error) {
1919
print(error.response);
2020
});
21-
}
21+
}}

Diff for: docs/examples/account/create-recovery.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ void main() { // Init SDK
77
client
88
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
10-
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
10+
.setSession('') // The user session to authenticate with
1111
;
1212

1313
Future result = account.createRecovery(
14-
15-
url: 'https://example.com',
14+
15+
url:'https://example.com' ,
1616
);
1717

1818
result
@@ -21,4 +21,4 @@ void main() { // Init SDK
2121
}).catchError((error) {
2222
print(error.response);
2323
});
24-
}
24+
}}

Diff for: docs/examples/account/create-session.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.createSession(
13+
userId:'[USER_ID]' ,
14+
secret:'[SECRET]' ,
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}}

Diff for: docs/examples/account/create-verification.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ void main() { // Init SDK
77
client
88
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
99
.setProject('5df5acd0d48c2') // Your project ID
10-
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
10+
.setSession('') // The user session to authenticate with
1111
;
1212

1313
Future result = account.createVerification(
14-
url: 'https://example.com',
14+
url:'https://example.com' ,
1515
);
1616

1717
result
@@ -20,4 +20,4 @@ void main() { // Init SDK
2020
}).catchError((error) {
2121
print(error.response);
2222
});
23-
}
23+
}}

Diff for: docs/examples/account/create.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = account.create(
13+
userId:'[USER_ID]' ,
14+
15+
password:'' ,
16+
);
17+
18+
result
19+
.then((response) {
20+
print(response);
21+
}).catchError((error) {
22+
print(error.response);
23+
});
24+
}}

Diff for: docs/examples/account/delete-authenticator.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
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+
;
12+
13+
Future result = account.deleteAuthenticator(
14+
provider: AuthenticatorProvider.totp,
15+
otp:'[OTP]' ,
16+
);
17+
18+
result
19+
.then((response) {
20+
print(response);
21+
}).catchError((error) {
22+
print(error.response);
23+
});
24+
}}

0 commit comments

Comments
 (0)