Skip to content

Commit 5eb1e71

Browse files
committed
Appwrite 1.5 support
1 parent 4b0ffa6 commit 5eb1e71

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Health;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueUsageDump(
13+
0, // threshold (optional)
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
System.out.println(result);
21+
})
22+
);
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import io.appwrite.Client
2+
import io.appwrite.coroutines.CoroutineCallback
3+
import io.appwrite.services.Health
4+
5+
val client = Client()
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
9+
10+
val health = Health(client)
11+
12+
val response = health.getQueueUsageDump(
13+
threshold = 0 // optional
14+
)

src/main/kotlin/io/appwrite/services/Health.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ class Health(client: Client) : Service(client) {
617617
*/
618618
@JvmOverloads
619619
@Throws(AppwriteException::class)
620-
suspend fun getQueueUsage(
620+
suspend fun getQueueUsageDump(
621621
threshold: Long? = null,
622622
): io.appwrite.models.HealthQueue {
623623
val apiPath = "/health/queue/usage-dump"

0 commit comments

Comments
 (0)