Skip to content

Commit

Permalink
Release candidate 4 for 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Feb 21, 2024
1 parent 43a7762 commit 729f4ab
Show file tree
Hide file tree
Showing 270 changed files with 3,943 additions and 4,711 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

```yml
dependencies:
dart_appwrite: ^11.0.0-rc.3
dart_appwrite: ^11.0.0-rc.4
```

You can install packages from the command line:
Expand Down
31 changes: 13 additions & 18 deletions docs/examples/account/add-authenticator.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

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

Future result = account.addAuthenticator(
type: AuthenticatorType.totp,
);
Future result = account.addAuthenticator(
type: AuthenticatorType.totp,
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
25 changes: 10 additions & 15 deletions docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createAnonymousSession();
Future result = account.createAnonymousSession();

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
31 changes: 13 additions & 18 deletions docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createEmailPasswordSession(
email:'email@example.com' ,
password:'password' ,
);
Future result = account.createEmailPasswordSession(
email: 'email@example.com',
password: 'password',
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
32 changes: 14 additions & 18 deletions docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createEmailToken(
userId:'[USER_ID]' ,
email:'email@example.com' ,
);
Future result = account.createEmailToken(
userId: '[USER_ID]',
email: 'email@example.com',
phrase: false, // (optional)
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
25 changes: 10 additions & 15 deletions docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createJWT();
Future result = account.createJWT();

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
33 changes: 15 additions & 18 deletions docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createMagicURLToken(
userId:'[USER_ID]' ,
email:'email@example.com' ,
);
Future result = account.createMagicURLToken(
userId: '[USER_ID]',
email: 'email@example.com',
url: 'https://example.com', // (optional)
phrase: false, // (optional)
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
33 changes: 16 additions & 17 deletions docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createOAuth2Session(
provider: OAuthProvider.amazon,
);
Future result = account.createOAuth2Session(
provider: OAuthProvider.amazon,
success: 'https://example.com', // (optional)
failure: 'https://example.com', // (optional)
token: false, // (optional)
scopes: [], // (optional)
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
31 changes: 13 additions & 18 deletions docs/examples/account/create-phone-token.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Account account = Account(client);

Future result = account.createPhoneToken(
userId:'[USER_ID]' ,
phone:'+12065550100' ,
);
Future result = account.createPhoneToken(
userId: '[USER_ID]',
phone: '+12065550100',
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
27 changes: 11 additions & 16 deletions docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

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

Future result = account.createPhoneVerification();
Future result = account.createPhoneVerification();

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
33 changes: 14 additions & 19 deletions docs/examples/account/create-recovery.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
import 'package:dart_appwrite/dart_appwrite.dart';

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

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

Future result = account.createRecovery(
email:'email@example.com' ,
url:'https://example.com' ,
);
Future result = account.createRecovery(
email: 'email@example.com',
url: 'https://example.com',
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}}
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});

0 comments on commit 729f4ab

Please sign in to comment.