Skip to content

Commit c4b7901

Browse files
committed
update to appwrite 1.3.0
1 parent 47c8ba1 commit c4b7901

32 files changed

+840
-132
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
## 7.3.0
2-
* Inprove helper classes
3-
* Deprecated `InputFile` default constructor and introduced `InputFile.fromPath` and `InputFile.fromBytes` for consistency with other SDKs
4-
51
## 7.2.0
62

73
* Support for GraphQL

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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
@@ -29,7 +29,7 @@ dependencies:
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

Lines changed: 1 addition & 1 deletion
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
Lines changed: 26 additions & 0 deletions
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+
}
Lines changed: 27 additions & 0 deletions
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+
}
Lines changed: 27 additions & 0 deletions
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+
}
Lines changed: 27 additions & 0 deletions
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@example.com',
19+
);
20+
21+
result
22+
.then((response) {
23+
print(response);
24+
}).catchError((error) {
25+
print(error.response);
26+
});
27+
}
Lines changed: 28 additions & 0 deletions
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+
}
Lines changed: 29 additions & 0 deletions
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+
}
Lines changed: 29 additions & 0 deletions
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+
}

0 commit comments

Comments
 (0)