Skip to content

Commit 5812082

Browse files
Merge pull request #40 from appwrite/dev
update to appwrite 1.3.0
2 parents 47c8ba1 + 53189f0 commit 5812082

34 files changed

+864
-141
lines changed

CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
## 8.0.0
2+
3+
* Added relationships support
4+
* Added support for new queries: `isNull`, `isNotNull`, `startsWith`, `notStartsWith`, `endsWith`, `between` and `select`.
5+
* Added update attribute support
6+
* Added team prefs support
7+
* Changed function create/update `execute` parameter to optional
8+
* Changed team `update` to `updateName`
9+
* Changed `Account` service to use the `User` model instead of `Account`
10+
111
## 7.3.0
2-
* Inprove helper classes
12+
13+
* Improve helper classes
314
* Deprecated `InputFile` default constructor and introduced `InputFile.fromPath` and `InputFile.fromBytes` for consistency with other SDKs
415

516
## 7.2.0

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[![pub package](https://img.shields.io/pub/v/dart_appwrite.svg?style=flat-square)](https://pub.dartlang.org/packages/dart_appwrite)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.2.1-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.3.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 1.2.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-dart/releases).**
10+
**This SDK is compatible with Appwrite server version 1.3.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-dart/releases).**
1111

1212
> This is the Dart SDK for integrating with Appwrite from your Dart server-side code. If you're looking for the Flutter SDK you should check [appwrite/sdk-for-flutter](https://github.com/appwrite/sdk-for-flutter)
1313
@@ -23,13 +23,13 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^7.3.0
26+
dart_appwrite: ^8.0.0
2727
```
2828
2929
You can install packages from the command line:
3030
3131
```bash
32-
pub get dart_appwrite
32+
dart pub add dart_appwrite
3333
```
3434

3535

docs/examples/account/update-password.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void main() { // Init SDK
1111
;
1212

1313
Future result = account.updatePassword(
14-
password: 'password',
14+
password: '',
1515
);
1616

1717
result
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.createRelationshipAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
relatedCollectionId: '[RELATED_COLLECTION_ID]',
17+
type: 'oneToOne',
18+
);
19+
20+
result
21+
.then((response) {
22+
print(response);
23+
}).catchError((error) {
24+
print(error.response);
25+
});
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateBooleanAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
xdefault: false,
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateDatetimeAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
xdefault: '',
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateEmailAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
xdefault: '[email protected]',
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateEnumAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
elements: [],
18+
xrequired: false,
19+
xdefault: '[DEFAULT]',
20+
);
21+
22+
result
23+
.then((response) {
24+
print(response);
25+
}).catchError((error) {
26+
print(error.response);
27+
});
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateFloatAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
min: 0,
19+
max: 0,
20+
xdefault: 0,
21+
);
22+
23+
result
24+
.then((response) {
25+
print(response);
26+
}).catchError((error) {
27+
print(error.response);
28+
});
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateIntegerAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
min: 0,
19+
max: 0,
20+
xdefault: 0,
21+
);
22+
23+
result
24+
.then((response) {
25+
print(response);
26+
}).catchError((error) {
27+
print(error.response);
28+
});
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateIpAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
xdefault: '',
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateRelationshipAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
);
18+
19+
result
20+
.then((response) {
21+
print(response);
22+
}).catchError((error) {
23+
print(error.response);
24+
});
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateStringAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
xdefault: '[DEFAULT]',
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:dart_appwrite/dart_appwrite.dart';
2+
3+
void main() { // Init SDK
4+
Client client = Client();
5+
Databases databases = Databases(client);
6+
7+
client
8+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
9+
.setProject('5df5acd0d48c2') // Your project ID
10+
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
Future result = databases.updateUrlAttribute(
14+
databaseId: '[DATABASE_ID]',
15+
collectionId: '[COLLECTION_ID]',
16+
key: '',
17+
xrequired: false,
18+
xdefault: 'https://example.com',
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}

docs/examples/functions/create.md

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void main() { // Init SDK
1313
Future result = functions.create(
1414
functionId: '[FUNCTION_ID]',
1515
name: '[NAME]',
16-
execute: ["any"],
1716
runtime: 'node-14.5',
1817
);
1918

docs/examples/functions/update.md

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void main() { // Init SDK
1313
Future result = functions.update(
1414
functionId: '[FUNCTION_ID]',
1515
name: '[NAME]',
16-
execute: ["any"],
1716
);
1817

1918
result

0 commit comments

Comments
 (0)