Skip to content

Commit 6c19c54

Browse files
committed
fix: remove content-type from GET requests
1 parent 7debaae commit 6c19c54

File tree

145 files changed

+10735
-11674
lines changed

Some content is hidden

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

145 files changed

+10735
-11674
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^14.0.0
26+
dart_appwrite: ^14.0.1
2727
```
2828
2929
You can install packages from the command line:

docs/examples/databases/update-float-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ AttributeFloat result = await databases.updateFloatAttribute(
1212
collectionId: '<COLLECTION_ID>',
1313
key: '',
1414
xrequired: false,
15-
min: 0,
16-
max: 0,
1715
xdefault: 0,
16+
min: 0, // (optional)
17+
max: 0, // (optional)
1818
newKey: '', // (optional)
1919
);

docs/examples/databases/update-integer-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ AttributeInteger result = await databases.updateIntegerAttribute(
1212
collectionId: '<COLLECTION_ID>',
1313
key: '',
1414
xrequired: false,
15-
min: 0,
16-
max: 0,
1715
xdefault: 0,
16+
min: 0, // (optional)
17+
max: 0, // (optional)
1818
newKey: '', // (optional)
1919
);

docs/examples/health/get-queue-usage-dump.md renamed to docs/examples/health/get-queue-stats-resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Client client = Client()
77

88
Health health = Health(client);
99

10-
HealthQueue result = await health.getQueueUsageDump(
10+
HealthQueue result = await health.getQueueStatsResources(
1111
threshold: 0, // (optional)
1212
);

docs/examples/health/get-queue.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/client_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/client_browser.dart';
1+
export 'src/client_browser.dart';

lib/client_io.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/client_io.dart';
1+
export 'src/client_io.dart';

lib/dart_appwrite.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Appwrite Dart SDK
22
///
3-
/// This SDK is compatible with Appwrite server version 1.6.x.
3+
/// This SDK is compatible with Appwrite server version 1.6.x.
44
/// For older versions, please check
55
/// [previous releases](https://github.com/appwrite/sdk-for-dart/releases).
66
library dart_appwrite;

lib/id.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class ID {
1010
final now = DateTime.now();
1111
final sec = (now.millisecondsSinceEpoch / 1000).floor();
1212
final usec = now.microsecondsSinceEpoch - (sec * 1000000);
13-
return sec.toRadixString(16) + usec.toRadixString(16).padLeft(5, '0');
13+
return sec.toRadixString(16) +
14+
usec.toRadixString(16).padLeft(5, '0');
1415
}
1516

1617
// Generate a unique ID with padding to have a longer ID

lib/query.dart

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
part of 'dart_appwrite.dart';
22

3+
34
/// Helper class to generate query strings.
45
class Query {
56
final String method;
@@ -9,13 +10,15 @@ class Query {
910
Query._(this.method, [this.attribute = null, this.values = null]);
1011

1112
Map<String, dynamic> toJson() {
12-
final map = <String, dynamic>{'method': method};
13+
final map = <String, dynamic>{
14+
'method': method,
15+
};
1316

14-
if (attribute != null) {
17+
if(attribute != null) {
1518
map['attribute'] = attribute;
1619
}
17-
18-
if (values != null) {
20+
21+
if(values != null) {
1922
map['values'] = values is List ? values : [values];
2023
}
2124

@@ -26,7 +29,7 @@ class Query {
2629
String toString() => jsonEncode(toJson());
2730

2831
/// Filter resources where [attribute] is equal to [value].
29-
///
32+
///
3033
/// [value] can be a single value or a list. If a list is used
3134
/// the query will return resources where [attribute] is equal
3235
/// to any of the values in the list.
@@ -58,12 +61,10 @@ class Query {
5861
Query._('search', attribute, value).toString();
5962

6063
/// Filter resources where [attribute] is null.
61-
static String isNull(String attribute) =>
62-
Query._('isNull', attribute).toString();
64+
static String isNull(String attribute) => Query._('isNull', attribute).toString();
6365

6466
/// Filter resources where [attribute] is not null.
65-
static String isNotNull(String attribute) =>
66-
Query._('isNotNull', attribute).toString();
67+
static String isNotNull(String attribute) => Query._('isNotNull', attribute).toString();
6768

6869
/// Filter resources where [attribute] is between [start] and [end] (inclusive).
6970
static String between(String attribute, dynamic start, dynamic end) =>
@@ -83,52 +84,40 @@ class Query {
8384
Query._('contains', attribute, value).toString();
8485

8586
static String or(List<String> queries) =>
86-
Query._(
87-
'or',
88-
null,
89-
queries.map((query) => jsonDecode(query)).toList(),
90-
).toString();
87+
Query._('or', null, queries.map((query) => jsonDecode(query)).toList()).toString();
9188

9289
static String and(List<String> queries) =>
93-
Query._(
94-
'and',
95-
null,
96-
queries.map((query) => jsonDecode(query)).toList(),
97-
).toString();
90+
Query._('and', null, queries.map((query) => jsonDecode(query)).toList()).toString();
9891

9992
/// Specify which attributes should be returned by the API call.
10093
static String select(List<String> attributes) =>
10194
Query._('select', null, attributes).toString();
10295

10396
/// Sort results by [attribute] ascending.
104-
static String orderAsc(String attribute) =>
105-
Query._('orderAsc', attribute).toString();
97+
static String orderAsc(String attribute) => Query._('orderAsc', attribute).toString();
10698

10799
/// Sort results by [attribute] descending.
108-
static String orderDesc(String attribute) =>
109-
Query._('orderDesc', attribute).toString();
100+
static String orderDesc(String attribute) => Query._('orderDesc', attribute).toString();
110101

111102
/// Return results before [id].
112-
///
103+
///
113104
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
114105
/// docs for more information.
115-
static String cursorBefore(String id) =>
116-
Query._('cursorBefore', null, id).toString();
106+
static String cursorBefore(String id) => Query._('cursorBefore', null, id).toString();
117107

118108
/// Return results after [id].
119-
///
109+
///
120110
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
121111
/// docs for more information.
122-
static String cursorAfter(String id) =>
123-
Query._('cursorAfter', null, id).toString();
112+
static String cursorAfter(String id) => Query._('cursorAfter', null, id).toString();
124113

125114
/// Return only [limit] results.
126115
static String limit(int limit) => Query._('limit', null, limit).toString();
127116

128117
/// Return results from [offset].
129-
///
118+
///
130119
/// Refer to the [Offset Pagination](https://appwrite.io/docs/pagination#offset-pagination)
131120
/// docs for more information.
132-
static String offset(int offset) =>
133-
Query._('offset', null, offset).toString();
134-
}
121+
static String offset(int offset) => Query._('offset', null, offset).toString();
122+
123+
}

0 commit comments

Comments
 (0)