Skip to content

Commit

Permalink
Appwrite 1.5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Mar 8, 2024
1 parent ae73f63 commit 0c07cab
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 11.0.0

* Added enum support
* Added SSR support
* Added messaging service support
* Added contains query support
* Added or query support

## 10.1.0

* Add new queue health endpoints
Expand Down
12 changes: 12 additions & 0 deletions docs/examples/health/get-queue-usage-dump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:dart_appwrite/dart_appwrite.dart';

Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key

Health health = Health(client);

HealthQueue result = await health.getQueueUsageDump(
threshold: 0, // (optional)
);
2 changes: 1 addition & 1 deletion lib/services/health.dart
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ class Health extends Service {
///
/// Get the number of projects containing metrics that are waiting to be
/// processed in the Appwrite internal queue server.
Future<models.HealthQueue> getQueueUsage({int? threshold}) async {
Future<models.HealthQueue> getQueueUsageDump({int? threshold}) async {
final String apiPath = '/health/queue/usage-dump';

final Map<String, dynamic> apiParams = {
Expand Down
4 changes: 2 additions & 2 deletions test/services/health_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void main() {

});

test('test method getQueueUsage()', () async {
test('test method getQueueUsageDump()', () async {
final Map<String, dynamic> data = {
'size': 8,};

Expand All @@ -369,7 +369,7 @@ void main() {
)).thenAnswer((_) async => Response(data: data));


final response = await health.getQueueUsage(
final response = await health.getQueueUsageDump(
);
expect(response, isA<models.HealthQueue>());

Expand Down

0 comments on commit 0c07cab

Please sign in to comment.