Skip to content

Commit 610fcf3

Browse files
feat: support for 0.13.0
1 parent 7428b8e commit 610fcf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+525
-248
lines changed

README.md

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

33
[![pub package](https://img.shields.io/pub/v/appwrite?style=flat-square)](https://pub.dartlang.org/packages/appwrite)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-0.12.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-0.13.0-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
99

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

1212
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)
1313

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import 'package:appwrite/appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Account account = Account(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
;
11+
Future result = account.updateSession(
12+
sessionId: '[SESSION_ID]',
13+
);
14+
15+
result
16+
.then((response) {
17+
print(response);
18+
}).catchError((error) {
19+
print(error.response);
20+
});
21+
}
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+
Future result = functions.retryBuild(
12+
functionId: '[FUNCTION_ID]',
13+
deploymentId: '[DEPLOYMENT_ID]',
14+
buildId: '[BUILD_ID]',
15+
);
16+
17+
result
18+
.then((response) {
19+
print(response);
20+
}).catchError((error) {
21+
print(error.response);
22+
});
23+
}

docs/examples/storage/create-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ void main() { // Init SDK
1010
.setProject('5df5acd0d48c2') // Your project ID
1111
;
1212
Future result = storage.createFile(
13+
bucketId: '[BUCKET_ID]',
1314
fileId: '[FILE_ID]',
1415
file: await MultipartFile.fromPath('file', './path-to-files/image.jpg', 'image.jpg'),
1516
);

docs/examples/storage/delete-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111
Future result = storage.deleteFile(
12+
bucketId: '[BUCKET_ID]',
1213
fileId: '[FILE_ID]',
1314
);
1415

docs/examples/storage/get-file-download.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ void main() { // Init SDK
1313
//displaying image
1414
FutureBuilder(
1515
future: storage.getFileDownload(
16+
bucketId: '[BUCKET_ID]',
1617
fileId: '[FILE_ID]',
1718
), //works for both public file and private file, for private files you need to be logged in
1819
builder: (context, snapshot) {

docs/examples/storage/get-file-preview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ void main() { // Init SDK
1313
//displaying image
1414
FutureBuilder(
1515
future: storage.getFilePreview(
16+
bucketId: '[BUCKET_ID]',
1617
fileId: '[FILE_ID]',
1718
), //works for both public file and private file, for private files you need to be logged in
1819
builder: (context, snapshot) {

docs/examples/storage/get-file-view.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ void main() { // Init SDK
1313
//displaying image
1414
FutureBuilder(
1515
future: storage.getFileView(
16+
bucketId: '[BUCKET_ID]',
1617
fileId: '[FILE_ID]',
1718
), //works for both public file and private file, for private files you need to be logged in
1819
builder: (context, snapshot) {

docs/examples/storage/get-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111
Future result = storage.getFile(
12+
bucketId: '[BUCKET_ID]',
1213
fileId: '[FILE_ID]',
1314
);
1415

docs/examples/storage/list-files.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void main() { // Init SDK
99
.setProject('5df5acd0d48c2') // Your project ID
1010
;
1111
Future result = storage.listFiles(
12+
bucketId: '[BUCKET_ID]',
1213
);
1314

1415
result

0 commit comments

Comments
 (0)