Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tests #158

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.3.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.3.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: ^9.0.0
appwrite: ^9.0.1
```

You can install packages from the command line:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createAnonymousSession();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-email-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createEmailSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createJWT();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-magic-u-r-l-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createMagicURLSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createOAuth2Session(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createPhoneSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createPhoneVerification();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createRecovery(
Expand Down
22 changes: 22 additions & 0 deletions docs/examples/account/create-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'package:appwrite/appwrite.dart';

void main() { // Init SDK
Client client = Client();
Account account = Account(client);

client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createSession(
email: 'email@example.com',
password: 'password',
);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
2 changes: 1 addition & 1 deletion docs/examples/account/create-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.createVerification(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.create(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/delete-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.deleteSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.deleteSessions();
Expand Down
19 changes: 19 additions & 0 deletions docs/examples/account/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:appwrite/appwrite.dart';

void main() { // Init SDK
Client client = Client();
Account account = Account(client);

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

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
20 changes: 20 additions & 0 deletions docs/examples/account/get-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:appwrite/appwrite.dart';

void main() { // Init SDK
Client client = Client();
Account account = Account(client);

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

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
2 changes: 1 addition & 1 deletion docs/examples/account/get-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.getPrefs();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.getSession(
Expand Down
19 changes: 19 additions & 0 deletions docs/examples/account/get-sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:appwrite/appwrite.dart';

void main() { // Init SDK
Client client = Client();
Account account = Account(client);

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

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
2 changes: 1 addition & 1 deletion docs/examples/account/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.get();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.listLogs(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.listSessions();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateEmail(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-magic-u-r-l-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateMagicURLSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateName(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-password.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePassword(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-phone-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePhoneSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePhoneVerification(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-phone.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePhone(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updatePrefs(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateRecovery(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateSession(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateStatus();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Account account = Account(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
Future result = account.updateVerification(
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Avatars avatars = Avatars(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
// downloading file
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-credit-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Avatars avatars = Avatars(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
// downloading file
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-favicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Avatars avatars = Avatars(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
// downloading file
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/avatars/get-flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void main() { // Init SDK
Avatars avatars = Avatars(client);

client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
// downloading file
Expand Down
Loading