Skip to content

Commit

Permalink
Merge pull request #189 from appwrite/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
abnegate authored Mar 8, 2024
2 parents cab0a13 + d803cef commit 12b0f52
Show file tree
Hide file tree
Showing 157 changed files with 3,195 additions and 1,791 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ install:
deploy:
provider: script
skip_cleanup: true
script: cd $TRAVIS_BUILD_DIR && dart format ./lib/ && flutter pub publish -f
script: cd $TRAVIS_BUILD_DIR && dart format ./lib/ && dart format ./test/ && flutter pub publish -f
on:
tags: true
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 12.0.0

* Added enum support
* Added SSR support
* Added messaging service support
* Added contains query support
* Added or query support

## 11.0.1

* Fix between queries
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

[![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)

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

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)



![Appwrite](https://appwrite.io/images/github.png)
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)

## Installation

Add this to your package's `pubspec.yaml` file:

```yml
dependencies:
appwrite: ^11.0.1
appwrite: ^12.0.0
```
You can install packages from the command line:
Expand Down Expand Up @@ -138,10 +138,7 @@ When trying to connect to Appwrite from an emulator or a mobile device, localhos
Account account = Account(client);
final user = await account
.create(
userId: ID.unique(),
email: '[email protected]',
password: 'password',
name: 'My Name'
userId: ID.unique(), email: "[email protected]", password: "password", name: "Walter O'Brien"
);
```

Expand All @@ -166,10 +163,7 @@ void main() {
final user = await account
.create(
userId: ID.unique(),
email: '[email protected]',
password: 'password',
name: 'My Name'
userId: ID.unique(), email: "[email protected]", password: "password", name: "Walter O'Brien"
);
}
```
Expand All @@ -181,7 +175,7 @@ The Appwrite Flutter SDK raises `AppwriteException` object with `message`, `type
Account account = Account(client);
try {
final user = await account.create(userId: ID.unique(), email: [email protected]’,password: password, name: ‘name’);
final user = await account.create(userId: ID.unique(), email: "[email protected]", password: "password", name: "Walter O'Brien");
print(user.toMap());
} on AppwriteException catch(e) {
//show message to user or do other operation based on error as required
Expand Down
20 changes: 5 additions & 15 deletions docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import 'package:appwrite/appwrite.dart';

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

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

Account account = Account(client);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
Session result = await account.createAnonymousSession();
12 changes: 12 additions & 0 deletions docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Session result = await account.createEmailPasswordSession(
email: '[email protected]',
password: 'password',
);
22 changes: 0 additions & 22 deletions docs/examples/account/create-email-session.md

This file was deleted.

13 changes: 13 additions & 0 deletions docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Token result = await account.createEmailToken(
userId: '<USER_ID>',
email: '[email protected]',
phrase: false, // optional
);
20 changes: 5 additions & 15 deletions docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import 'package:appwrite/appwrite.dart';

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

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

Account account = Account(client);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
Jwt result = await account.createJWT();
22 changes: 0 additions & 22 deletions docs/examples/account/create-magic-u-r-l-session.md

This file was deleted.

14 changes: 14 additions & 0 deletions docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Token result = await account.createMagicURLToken(
userId: '<USER_ID>',
email: '[email protected]',
url: 'https://example.com', // optional
phrase: false, // optional
);
11 changes: 11 additions & 0 deletions docs/examples/account/create-mfa-authenticator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

MfaType result = await account.createMfaAuthenticator(
type: AuthenticatorType.totp,
);
11 changes: 11 additions & 0 deletions docs/examples/account/create-mfa-challenge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

MfaChallenge result = await account.createMfaChallenge(
factor: AuthenticationFactor.email,
);
9 changes: 9 additions & 0 deletions docs/examples/account/create-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

MfaRecoveryCodes result = await account.createMfaRecoveryCodes();
27 changes: 10 additions & 17 deletions docs/examples/account/create-o-auth2session.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import 'package:appwrite/appwrite.dart';

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

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

Account account = Account(client);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
await account.createOAuth2Session(
provider: OAuthProvider.amazon,
success: 'https://example.com', // optional
failure: 'https://example.com', // optional
scopes: [], // optional
);
14 changes: 14 additions & 0 deletions docs/examples/account/create-o-auth2token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

await account.createOAuth2Token(
provider: OAuthProvider.amazon,
success: 'https://example.com', // optional
failure: 'https://example.com', // optional
scopes: [], // optional
);
22 changes: 0 additions & 22 deletions docs/examples/account/create-phone-session.md

This file was deleted.

12 changes: 12 additions & 0 deletions docs/examples/account/create-phone-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Token result = await account.createPhoneToken(
userId: '<USER_ID>',
phone: '+12065550100',
);
20 changes: 5 additions & 15 deletions docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import 'package:appwrite/appwrite.dart';

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

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

Account account = Account(client);

result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
Token result = await account.createPhoneVerification();
13 changes: 13 additions & 0 deletions docs/examples/account/create-push-target.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Target result = await account.createPushTarget(
targetId: '<TARGET_ID>',
identifier: '<IDENTIFIER>',
providerId: '<PROVIDER_ID>', // optional
);
Loading

0 comments on commit 12b0f52

Please sign in to comment.