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 8168bc0 commit 319aae7
Show file tree
Hide file tree
Showing 98 changed files with 1,431 additions and 1,602 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/appwrite?style=flat-square)](https://pub.dartlang.org/packages/appwrite)
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.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 @@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:

```yml
dependencies:
appwrite: ^12.0.0-rc.3
appwrite: ^12.0.0-rc.4
```
You can install packages from the command line:
Expand Down
31 changes: 14 additions & 17 deletions docs/examples/account/add-authenticator.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import 'package:appwrite/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
;
Future result = account.addAuthenticator(
type: AuthenticatorType.totp.value,
);
Account account = Account(client);

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);
});
}
27 changes: 12 additions & 15 deletions docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import 'package:appwrite/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
;
Future result = account.createAnonymousSession();
Account account = Account(client);

Future result = account.createAnonymousSession();

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-email-password-session.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import 'package:appwrite/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
;
Future result = account.createEmailPasswordSession(
email:'email@example.com' ,
password:'password' ,
);
Account account = Account(client);

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);
});
}
34 changes: 16 additions & 18 deletions docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import 'package:appwrite/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
;
Future result = account.createEmailToken(
userId:'[USER_ID]' ,
email:'email@example.com' ,
);
Account account = Account(client);

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);
});
}
27 changes: 12 additions & 15 deletions docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import 'package:appwrite/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
;
Future result = account.createJWT();
Account account = Account(client);

Future result = account.createJWT();

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

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
35 changes: 17 additions & 18 deletions docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import 'package:appwrite/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
;
Future result = account.createMagicURLToken(
userId:'[USER_ID]' ,
email:'email@example.com' ,
);
Account account = Account(client);

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);
});
}
35 changes: 18 additions & 17 deletions docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import 'package:appwrite/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
;
Future result = account.createOAuth2Session(
provider: OAuthProvider.amazon.value,
);
Account account = Account(client);

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);
});
}
33 changes: 15 additions & 18 deletions docs/examples/account/create-phone-token.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import 'package:appwrite/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
;
Future result = account.createPhoneToken(
userId:'[USER_ID]' ,
phone:'+12065550100' ,
);
Account account = Account(client);

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: 12 additions & 15 deletions docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import 'package:appwrite/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
;
Future result = account.createPhoneVerification();
Account account = Account(client);

Future result = account.createPhoneVerification();

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

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
34 changes: 16 additions & 18 deletions docs/examples/account/create-push-target.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import 'package:appwrite/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
;
Future result = account.createPushTarget(
targetId:'[TARGET_ID]' ,
identifier:'[IDENTIFIER]' ,
);
Account account = Account(client);

Future result = account.createPushTarget(
targetId: '[TARGET_ID]',
identifier: '[IDENTIFIER]',
providerId: '[PROVIDER_ID]', // (optional)
);

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

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

0 comments on commit 319aae7

Please sign in to comment.