Skip to content

Commit 51f9a3b

Browse files
committed
Appwrite 1.5 support
1 parent e9799f6 commit 51f9a3b

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Health;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('5df5acd0d48c2') // Your project ID
9+
->setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
10+
11+
$health = new Health($client);
12+
13+
$result = $health->getQueueUsageDump(
14+
threshold: null // optional
15+
);

src/Appwrite/Services/Health.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public function getQueueUsage(int $threshold = null): array
528528
* @return array
529529
530530
*/
531-
public function getQueueUsage(int $threshold = null): array
531+
public function getQueueUsageDump(int $threshold = null): array
532532
{
533533
$apiPath = str_replace([], [], '/health/queue/usage-dump');
534534

tests/Appwrite/Services/HealthTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public function testMethodGetQueueUsage(): void {
321321
$this->assertSame($data, $response);
322322
}
323323

324-
public function testMethodGetQueueUsage(): void {
324+
public function testMethodGetQueueUsageDump(): void {
325325

326326
$data = array(
327327
"size" => 8,);
@@ -331,7 +331,7 @@ public function testMethodGetQueueUsage(): void {
331331
->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any())
332332
->andReturn($data);
333333

334-
$response = $this->health->getQueueUsage(
334+
$response = $this->health->getQueueUsageDump(
335335
);
336336

337337
$this->assertSame($data, $response);

0 commit comments

Comments
 (0)