Skip to content

Commit ac0fc40

Browse files
committed
Upgraded to support Appwrite 0.7.0
1 parent 876a3c0 commit ac0fc40

27 files changed

+224
-77
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2021 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:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1)
5-
![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1)
5+
![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1)
66

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

99
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.
1010
Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
@@ -20,7 +20,7 @@ Add this to your package's `pubspec.yaml` file:
2020

2121
```yml
2222
dependencies:
23-
appwrite: ^0.3.0-dev.2
23+
appwrite: ^0.3.0
2424
```
2525
2626
You can install packages from the command line:

docs/examples/account/delete-sessions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
Future result = account.deleteSessions( );
12+
Future result = account.deleteSessions();
1313

1414
result
1515
.then((response) {

docs/examples/account/delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
Future result = account.delete( );
12+
Future result = account.delete();
1313

1414
result
1515
.then((response) {

docs/examples/account/get-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
Future result = account.getLogs( );
12+
Future result = account.getLogs();
1313

1414
result
1515
.then((response) {

docs/examples/account/get-prefs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
Future result = account.getPrefs( );
12+
Future result = account.getPrefs();
1313

1414
result
1515
.then((response) {

docs/examples/account/get-sessions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
Future result = account.getSessions( );
12+
Future result = account.getSessions();
1313

1414
result
1515
.then((response) {

docs/examples/account/get.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111

12-
Future result = account.get( );
12+
Future result = account.get();
1313

1414
result
1515
.then((response) {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import 'package:appwrite/appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Functions functions = Functions(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = functions.createExecution(
13+
functionId: '[FUNCTION_ID]',
14+
);
15+
16+
result
17+
.then((response) {
18+
print(response);
19+
}).catchError((error) {
20+
print(error.response);
21+
});
22+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:appwrite/appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Functions functions = Functions(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
12+
Future result = functions.getExecution(
13+
functionId: '[FUNCTION_ID]',
14+
executionId: '[EXECUTION_ID]',
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}

0 commit comments

Comments
 (0)