diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index e9721dd..d767459 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -12,10 +12,10 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v2
- - name: Set up JDK 11
+ - name: Set up JDK 17
uses: actions/setup-java@v1
with:
- java-version: 11
+ java-version: 17
# Base64 decodes and pipes the GPG key content into the secret file
- name: Prepare environment
env:
@@ -35,7 +35,7 @@ jobs:
# Runs upload, and then closes & releases the repository
- name: Publish Release Version to MavenCentral
run: |
- if ${{ endswith(github.event.release.tag_name, '-SNAPSHOT') }}; then
+ if ${{ contains(github.event.release.tag_name, '-rc') }}; then
echo "Publising Snapshot Version ${{ github.event.release.tag_name}} to Snapshot repository"
./gradlew publishToSonatype
else
diff --git a/LICENSE.md b/LICENSE.md
index 47cfdfb..5479bb8 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
+Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
diff --git a/README.md b/README.md
index c611a49..6e62098 100644
--- a/README.md
+++ b/README.md
@@ -2,17 +2,17 @@


-
+
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
-**This SDK is compatible with Appwrite server version 1.4.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**
+**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**
> This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Kotlin SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
-
+
## Installation
@@ -39,7 +39,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
-implementation("io.appwrite:sdk-for-kotlin:4.1.0")
+implementation("io.appwrite:sdk-for-kotlin:5.0.0")
```
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
io.appwrite
sdk-for-kotlin
- 4.1.0
+ 5.0.0
```
@@ -84,7 +84,9 @@ val users = Users(client)
val user = users.create(
user = ID.unique(),
email = "email@example.com",
+ phone = "+123456789",
password = "password",
+ name = "Walter O'Brien"
)
```
@@ -106,7 +108,9 @@ suspend fun main() {
val user = users.create(
user = ID.unique(),
email = "email@example.com",
+ phone = "+123456789",
password = "password",
+ name = "Walter O'Brien"
)
}
```
@@ -126,7 +130,9 @@ suspend fun main() {
val user = users.create(
user = ID.unique(),
email = "email@example.com",
+ phone = "+123456789",
password = "password",
+ name = "Walter O'Brien"
)
} catch (e: AppwriteException) {
e.printStackTrace()
diff --git a/build.gradle b/build.gradle
index 181fbfb..ac355f3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
plugins {
- id "org.jetbrains.kotlin.jvm" version '1.8.0'
+ id "org.jetbrains.kotlin.jvm" version '1.9.10'
id "java-library"
- id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
+ id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}
apply from: "${rootDir}/scripts/configure.gradle"
@@ -29,14 +29,16 @@ repositories {
}
dependencies {
- api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
- api(platform("com.squareup.okhttp3:okhttp-bom:4.9.3"))
+ api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1")
+
+ api(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
api("com.squareup.okhttp3:okhttp")
+
implementation("com.squareup.okhttp3:okhttp-urlconnection")
implementation("com.squareup.okhttp3:logging-interceptor")
implementation("com.google.code.gson:gson:2.9.0")
- testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
+ testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
}
test {
diff --git a/docs/examples/java/account/create-anonymous-session.md b/docs/examples/java/account/create-anonymous-session.md
new file mode 100644
index 0000000..ba83373
--- /dev/null
+++ b/docs/examples/java/account/create-anonymous-session.md
@@ -0,0 +1,18 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createAnonymousSession(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/account/create-email-password-session.md b/docs/examples/java/account/create-email-password-session.md
new file mode 100644
index 0000000..0af4269
--- /dev/null
+++ b/docs/examples/java/account/create-email-password-session.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createEmailPasswordSession(
+ "email@example.com", // email
+ "password", // password
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-email-token.md b/docs/examples/java/account/create-email-token.md
new file mode 100644
index 0000000..040b59b
--- /dev/null
+++ b/docs/examples/java/account/create-email-token.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createEmailToken(
+ "", // userId
+ "email@example.com", // email
+ false, // phrase (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-j-w-t.md b/docs/examples/java/account/create-j-w-t.md
new file mode 100644
index 0000000..1e223e4
--- /dev/null
+++ b/docs/examples/java/account/create-j-w-t.md
@@ -0,0 +1,18 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createJWT(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/account/create-magic-u-r-l-token.md b/docs/examples/java/account/create-magic-u-r-l-token.md
new file mode 100644
index 0000000..71a318c
--- /dev/null
+++ b/docs/examples/java/account/create-magic-u-r-l-token.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createMagicURLToken(
+ "", // userId
+ "email@example.com", // email
+ "https://example.com", // url (optional)
+ false, // phrase (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-mfa-authenticator.md b/docs/examples/java/account/create-mfa-authenticator.md
new file mode 100644
index 0000000..9cf177f
--- /dev/null
+++ b/docs/examples/java/account/create-mfa-authenticator.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+import io.appwrite.enums.AuthenticatorType;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.createMfaAuthenticator(
+ AuthenticatorType.TOTP, // type
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-mfa-challenge.md b/docs/examples/java/account/create-mfa-challenge.md
new file mode 100644
index 0000000..6a3d9ce
--- /dev/null
+++ b/docs/examples/java/account/create-mfa-challenge.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+import io.appwrite.enums.AuthenticationFactor;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createMfaChallenge(
+ AuthenticationFactor.EMAIL, // factor
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-mfa-recovery-codes.md b/docs/examples/java/account/create-mfa-recovery-codes.md
new file mode 100644
index 0000000..6a9342d
--- /dev/null
+++ b/docs/examples/java/account/create-mfa-recovery-codes.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/account/create-o-auth2token.md b/docs/examples/java/account/create-o-auth2token.md
new file mode 100644
index 0000000..4c92629
--- /dev/null
+++ b/docs/examples/java/account/create-o-auth2token.md
@@ -0,0 +1,26 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+import io.appwrite.enums.OAuthProvider;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createOAuth2Token(
+ OAuthProvider.AMAZON, // provider
+ "https://example.com", // success (optional)
+ "https://example.com", // failure (optional)
+ listOf(), // scopes (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-phone-token.md b/docs/examples/java/account/create-phone-token.md
new file mode 100644
index 0000000..022eaa4
--- /dev/null
+++ b/docs/examples/java/account/create-phone-token.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createPhoneToken(
+ "", // userId
+ "+12065550100", // phone
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-phone-verification.md b/docs/examples/java/account/create-phone-verification.md
index 013b357..bfe3722 100644
--- a/docs/examples/java/account/create-phone-verification.md
+++ b/docs/examples/java/account/create-phone-verification.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
diff --git a/docs/examples/java/account/create-recovery.md b/docs/examples/java/account/create-recovery.md
index 284efc8..590fee3 100644
--- a/docs/examples/java/account/create-recovery.md
+++ b/docs/examples/java/account/create-recovery.md
@@ -5,13 +5,13 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.createRecovery(
- "email@example.com",
- "https://example.com"
+ "email@example.com", // email
+ "https://example.com", // url
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ account.createRecovery(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/create-session.md b/docs/examples/java/account/create-session.md
new file mode 100644
index 0000000..0a9606e
--- /dev/null
+++ b/docs/examples/java/account/create-session.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.createSession(
+ "", // userId
+ "", // secret
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/create-verification.md b/docs/examples/java/account/create-verification.md
index 0280b4b..d38067b 100644
--- a/docs/examples/java/account/create-verification.md
+++ b/docs/examples/java/account/create-verification.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.createVerification(
- "https://example.com"
+ "https://example.com", // url
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.createVerification(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/create.md b/docs/examples/java/account/create.md
new file mode 100644
index 0000000..f0d3a51
--- /dev/null
+++ b/docs/examples/java/account/create.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.create(
+ "", // userId
+ "email@example.com", // email
+ "", // password
+ "", // name (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/delete-identity.md b/docs/examples/java/account/delete-identity.md
index 54bad5a..9417083 100644
--- a/docs/examples/java/account/delete-identity.md
+++ b/docs/examples/java/account/delete-identity.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.deleteIdentity(
- "[IDENTITY_ID]"
+ "", // identityId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.deleteIdentity(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/delete-mfa-authenticator.md b/docs/examples/java/account/delete-mfa-authenticator.md
new file mode 100644
index 0000000..c335161
--- /dev/null
+++ b/docs/examples/java/account/delete-mfa-authenticator.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+import io.appwrite.enums.AuthenticatorType;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.deleteMfaAuthenticator(
+ AuthenticatorType.TOTP, // type
+ "", // otp
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/delete-session.md b/docs/examples/java/account/delete-session.md
index 2cd069e..b77ac28 100644
--- a/docs/examples/java/account/delete-session.md
+++ b/docs/examples/java/account/delete-session.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.deleteSession(
- "[SESSION_ID]"
+ "", // sessionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.deleteSession(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/delete-sessions.md b/docs/examples/java/account/delete-sessions.md
index 7a9999d..80103a4 100644
--- a/docs/examples/java/account/delete-sessions.md
+++ b/docs/examples/java/account/delete-sessions.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
diff --git a/docs/examples/java/account/get-mfa-recovery-codes.md b/docs/examples/java/account/get-mfa-recovery-codes.md
new file mode 100644
index 0000000..7298699
--- /dev/null
+++ b/docs/examples/java/account/get-mfa-recovery-codes.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/account/get-prefs.md b/docs/examples/java/account/get-prefs.md
index 3f6cd20..fd05e63 100644
--- a/docs/examples/java/account/get-prefs.md
+++ b/docs/examples/java/account/get-prefs.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
diff --git a/docs/examples/java/account/get-session.md b/docs/examples/java/account/get-session.md
index 17229e2..60c4312 100644
--- a/docs/examples/java/account/get-session.md
+++ b/docs/examples/java/account/get-session.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.getSession(
- "[SESSION_ID]"
+ "", // sessionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.getSession(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/get.md b/docs/examples/java/account/get.md
index 80a4988..f492881 100644
--- a/docs/examples/java/account/get.md
+++ b/docs/examples/java/account/get.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
diff --git a/docs/examples/java/account/list-identities.md b/docs/examples/java/account/list-identities.md
index d6fcb68..4b07399 100644
--- a/docs/examples/java/account/list-identities.md
+++ b/docs/examples/java/account/list-identities.md
@@ -5,11 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.listIdentities(
+ listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ account.listIdentities(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/list-logs.md b/docs/examples/java/account/list-logs.md
index 971ac86..b33b55a 100644
--- a/docs/examples/java/account/list-logs.md
+++ b/docs/examples/java/account/list-logs.md
@@ -5,11 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.listLogs(
+ listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ account.listLogs(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/list-mfa-factors.md b/docs/examples/java/account/list-mfa-factors.md
new file mode 100644
index 0000000..9232cdf
--- /dev/null
+++ b/docs/examples/java/account/list-mfa-factors.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/account/list-sessions.md b/docs/examples/java/account/list-sessions.md
index 9d7e630..c1fd540 100644
--- a/docs/examples/java/account/list-sessions.md
+++ b/docs/examples/java/account/list-sessions.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
diff --git a/docs/examples/java/account/update-email.md b/docs/examples/java/account/update-email.md
index 67ab31a..453e1da 100644
--- a/docs/examples/java/account/update-email.md
+++ b/docs/examples/java/account/update-email.md
@@ -5,13 +5,13 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updateEmail(
- "email@example.com",
- "password"
+ "email@example.com", // email
+ "password", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ account.updateEmail(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-m-f-a.md b/docs/examples/java/account/update-m-f-a.md
new file mode 100644
index 0000000..28780ae
--- /dev/null
+++ b/docs/examples/java/account/update-m-f-a.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.updateMFA(
+ false, // mfa
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/update-magic-u-r-l-session.md b/docs/examples/java/account/update-magic-u-r-l-session.md
new file mode 100644
index 0000000..f11d09a
--- /dev/null
+++ b/docs/examples/java/account/update-magic-u-r-l-session.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.updateMagicURLSession(
+ "", // userId
+ "", // secret
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/update-mfa-authenticator.md b/docs/examples/java/account/update-mfa-authenticator.md
new file mode 100644
index 0000000..cc6b774
--- /dev/null
+++ b/docs/examples/java/account/update-mfa-authenticator.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+import io.appwrite.enums.AuthenticatorType;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.updateMfaAuthenticator(
+ AuthenticatorType.TOTP, // type
+ "", // otp
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/update-mfa-challenge.md b/docs/examples/java/account/update-mfa-challenge.md
new file mode 100644
index 0000000..8b907b1
--- /dev/null
+++ b/docs/examples/java/account/update-mfa-challenge.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.updateMfaChallenge(
+ "", // challengeId
+ "", // otp
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/update-mfa-recovery-codes.md b/docs/examples/java/account/update-mfa-recovery-codes.md
new file mode 100644
index 0000000..c00cd9e
--- /dev/null
+++ b/docs/examples/java/account/update-mfa-recovery-codes.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setSession(""); // The user session to authenticate with
+
+Account account = new Account(client);
+
+account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/account/update-name.md b/docs/examples/java/account/update-name.md
index 6900f12..4880522 100644
--- a/docs/examples/java/account/update-name.md
+++ b/docs/examples/java/account/update-name.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updateName(
- "[NAME]"
+ "", // name
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.updateName(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-password.md b/docs/examples/java/account/update-password.md
index ace01fc..078301a 100644
--- a/docs/examples/java/account/update-password.md
+++ b/docs/examples/java/account/update-password.md
@@ -5,12 +5,13 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updatePassword(
- "",
+ "", // password
+ "password", // oldPassword (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +21,4 @@ account.updatePassword(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-phone-session.md b/docs/examples/java/account/update-phone-session.md
new file mode 100644
index 0000000..b4fdb3c
--- /dev/null
+++ b/docs/examples/java/account/update-phone-session.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Account;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2"); // Your project ID
+
+Account account = new Account(client);
+
+account.updatePhoneSession(
+ "", // userId
+ "", // secret
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/account/update-phone-verification.md b/docs/examples/java/account/update-phone-verification.md
index 8c3c975..509f220 100644
--- a/docs/examples/java/account/update-phone-verification.md
+++ b/docs/examples/java/account/update-phone-verification.md
@@ -5,13 +5,13 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updatePhoneVerification(
- "[USER_ID]",
- "[SECRET]"
+ "", // userId
+ "", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ account.updatePhoneVerification(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-phone.md b/docs/examples/java/account/update-phone.md
index 9365a0f..1808767 100644
--- a/docs/examples/java/account/update-phone.md
+++ b/docs/examples/java/account/update-phone.md
@@ -5,13 +5,13 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updatePhone(
- "+12065550100",
- "password"
+ "+12065550100", // phone
+ "password", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ account.updatePhone(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-prefs.md b/docs/examples/java/account/update-prefs.md
index 24a3625..0ff1116 100644
--- a/docs/examples/java/account/update-prefs.md
+++ b/docs/examples/java/account/update-prefs.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updatePrefs(
- mapOf( "a" to "b" )
+ mapOf( "a" to "b" ), // prefs
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.updatePrefs(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-recovery.md b/docs/examples/java/account/update-recovery.md
index bc3251d..11cd3e7 100644
--- a/docs/examples/java/account/update-recovery.md
+++ b/docs/examples/java/account/update-recovery.md
@@ -5,15 +5,14 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updateRecovery(
- "[USER_ID]",
- "[SECRET]",
- "password",
- "password"
+ "", // userId
+ "", // secret
+ "", // password
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +22,4 @@ account.updateRecovery(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-session.md b/docs/examples/java/account/update-session.md
index 62d77e1..a944695 100644
--- a/docs/examples/java/account/update-session.md
+++ b/docs/examples/java/account/update-session.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updateSession(
- "[SESSION_ID]"
+ "", // sessionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ account.updateSession(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/account/update-status.md b/docs/examples/java/account/update-status.md
index 4af2cf1..888bd31 100644
--- a/docs/examples/java/account/update-status.md
+++ b/docs/examples/java/account/update-status.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
diff --git a/docs/examples/java/account/update-verification.md b/docs/examples/java/account/update-verification.md
index 2190daf..3b2db93 100644
--- a/docs/examples/java/account/update-verification.md
+++ b/docs/examples/java/account/update-verification.md
@@ -5,13 +5,13 @@ import io.appwrite.services.Account;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+ .setSession(""); // The user session to authenticate with
Account account = new Account(client);
account.updateVerification(
- "[USER_ID]",
- "[SECRET]"
+ "", // userId
+ "", // secret
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ account.updateVerification(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-browser.md b/docs/examples/java/avatars/get-browser.md
index 42e8e57..7e89188 100644
--- a/docs/examples/java/avatars/get-browser.md
+++ b/docs/examples/java/avatars/get-browser.md
@@ -1,16 +1,20 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
+import io.appwrite.enums.Browser;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getBrowser(
- "aa",
+ Browser.AVANT_BROWSER, // code
+ 0, // width (optional)
+ 0, // height (optional)
+ 0, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +24,4 @@ avatars.getBrowser(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-credit-card.md b/docs/examples/java/avatars/get-credit-card.md
index 5e3b32b..e6e6004 100644
--- a/docs/examples/java/avatars/get-credit-card.md
+++ b/docs/examples/java/avatars/get-credit-card.md
@@ -1,16 +1,20 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
+import io.appwrite.enums.CreditCard;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getCreditCard(
- "amex",
+ CreditCard.AMERICAN_EXPRESS, // code
+ 0, // width (optional)
+ 0, // height (optional)
+ 0, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +24,4 @@ avatars.getCreditCard(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-favicon.md b/docs/examples/java/avatars/get-favicon.md
index 109f88f..3819896 100644
--- a/docs/examples/java/avatars/get-favicon.md
+++ b/docs/examples/java/avatars/get-favicon.md
@@ -5,12 +5,12 @@ import io.appwrite.services.Avatars;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getFavicon(
- "https://example.com"
+ "https://example.com", // url
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ avatars.getFavicon(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-flag.md b/docs/examples/java/avatars/get-flag.md
index 6ad820a..b5dc08a 100644
--- a/docs/examples/java/avatars/get-flag.md
+++ b/docs/examples/java/avatars/get-flag.md
@@ -1,16 +1,20 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
+import io.appwrite.enums.Flag;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getFlag(
- "af",
+ Flag.AFGHANISTAN, // code
+ 0, // width (optional)
+ 0, // height (optional)
+ 0, // quality (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +24,4 @@ avatars.getFlag(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-image.md b/docs/examples/java/avatars/get-image.md
index 2680544..f1d0d29 100644
--- a/docs/examples/java/avatars/get-image.md
+++ b/docs/examples/java/avatars/get-image.md
@@ -5,12 +5,14 @@ import io.appwrite.services.Avatars;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getImage(
- "https://example.com",
+ "https://example.com", // url
+ 0, // width (optional)
+ 0, // height (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +22,4 @@ avatars.getImage(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md
index 8a86e7a..8d69379 100644
--- a/docs/examples/java/avatars/get-initials.md
+++ b/docs/examples/java/avatars/get-initials.md
@@ -5,11 +5,15 @@ import io.appwrite.services.Avatars;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getInitials(
+ "", // name (optional)
+ 0, // width (optional)
+ 0, // height (optional)
+ "", // background (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +23,4 @@ avatars.getInitials(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/avatars/get-q-r.md b/docs/examples/java/avatars/get-q-r.md
index c57d70a..8a34781 100644
--- a/docs/examples/java/avatars/get-q-r.md
+++ b/docs/examples/java/avatars/get-q-r.md
@@ -5,12 +5,15 @@ import io.appwrite.services.Avatars;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Avatars avatars = new Avatars(client);
avatars.getQR(
- "[TEXT]",
+ "", // text
+ 1, // size (optional)
+ 0, // margin (optional)
+ false, // download (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +23,4 @@ avatars.getQR(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-boolean-attribute.md b/docs/examples/java/databases/create-boolean-attribute.md
index 6e79f0a..c1325cf 100644
--- a/docs/examples/java/databases/create-boolean-attribute.md
+++ b/docs/examples/java/databases/create-boolean-attribute.md
@@ -10,10 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createBooleanAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ false, // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +25,4 @@ databases.createBooleanAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-collection.md b/docs/examples/java/databases/create-collection.md
index 96b5d9b..4be7245 100644
--- a/docs/examples/java/databases/create-collection.md
+++ b/docs/examples/java/databases/create-collection.md
@@ -10,9 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createCollection(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[NAME]",
+ "", // databaseId
+ "", // collectionId
+ "", // name
+ listOf("read("any")"), // permissions (optional)
+ false, // documentSecurity (optional)
+ false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +25,4 @@ databases.createCollection(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-datetime-attribute.md b/docs/examples/java/databases/create-datetime-attribute.md
index 307a8ff..514933c 100644
--- a/docs/examples/java/databases/create-datetime-attribute.md
+++ b/docs/examples/java/databases/create-datetime-attribute.md
@@ -10,10 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createDatetimeAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "", // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +25,4 @@ databases.createDatetimeAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md
index 029c3f7..73f2c5a 100644
--- a/docs/examples/java/databases/create-document.md
+++ b/docs/examples/java/databases/create-document.md
@@ -5,15 +5,16 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.createDocument(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[DOCUMENT_ID]",
- mapOf( "a" to "b" ),
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ mapOf( "a" to "b" ), // data
+ listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +24,4 @@ databases.createDocument(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-email-attribute.md b/docs/examples/java/databases/create-email-attribute.md
index 8774c55..375ca5c 100644
--- a/docs/examples/java/databases/create-email-attribute.md
+++ b/docs/examples/java/databases/create-email-attribute.md
@@ -10,10 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createEmailAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "email@example.com", // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +25,4 @@ databases.createEmailAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-enum-attribute.md b/docs/examples/java/databases/create-enum-attribute.md
index e2cf6a2..c0190bc 100644
--- a/docs/examples/java/databases/create-enum-attribute.md
+++ b/docs/examples/java/databases/create-enum-attribute.md
@@ -10,11 +10,13 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createEnumAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- listOf(),
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ listOf(), // elements
+ false, // required
+ "", // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +26,4 @@ databases.createEnumAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-float-attribute.md b/docs/examples/java/databases/create-float-attribute.md
index 0fba6ac..844ae50 100644
--- a/docs/examples/java/databases/create-float-attribute.md
+++ b/docs/examples/java/databases/create-float-attribute.md
@@ -10,10 +10,14 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createFloatAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ 0, // min (optional)
+ 0, // max (optional)
+ 0, // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +27,4 @@ databases.createFloatAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md
index 5dbdce8..bcfb327 100644
--- a/docs/examples/java/databases/create-index.md
+++ b/docs/examples/java/databases/create-index.md
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
+import io.appwrite.enums.IndexType;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -10,11 +11,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createIndex(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- "key",
- listOf(),
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ IndexType.KEY, // type
+ listOf(), // attributes
+ listOf(), // orders (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +26,4 @@ databases.createIndex(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-integer-attribute.md b/docs/examples/java/databases/create-integer-attribute.md
index 5446862..feab244 100644
--- a/docs/examples/java/databases/create-integer-attribute.md
+++ b/docs/examples/java/databases/create-integer-attribute.md
@@ -10,10 +10,14 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createIntegerAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ 0, // min (optional)
+ 0, // max (optional)
+ 0, // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +27,4 @@ databases.createIntegerAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-ip-attribute.md b/docs/examples/java/databases/create-ip-attribute.md
index fe37da9..f624212 100644
--- a/docs/examples/java/databases/create-ip-attribute.md
+++ b/docs/examples/java/databases/create-ip-attribute.md
@@ -10,10 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createIpAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "", // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +25,4 @@ databases.createIpAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-relationship-attribute.md b/docs/examples/java/databases/create-relationship-attribute.md
index 0b7e5f9..ed998b4 100644
--- a/docs/examples/java/databases/create-relationship-attribute.md
+++ b/docs/examples/java/databases/create-relationship-attribute.md
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
+import io.appwrite.enums.RelationshipType;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -10,10 +11,14 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createRelationshipAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[RELATED_COLLECTION_ID]",
- "oneToOne",
+ "", // databaseId
+ "", // collectionId
+ "", // relatedCollectionId
+ RelationshipType.ONETOONE, // type
+ false, // twoWay (optional)
+ "", // key (optional)
+ "", // twoWayKey (optional)
+ RelationMutate.CASCADE, // onDelete (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +28,4 @@ databases.createRelationshipAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-string-attribute.md b/docs/examples/java/databases/create-string-attribute.md
index a9b1916..70257ea 100644
--- a/docs/examples/java/databases/create-string-attribute.md
+++ b/docs/examples/java/databases/create-string-attribute.md
@@ -10,11 +10,14 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createStringAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- 1,
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ 1, // size
+ false, // required
+ "", // default (optional)
+ false, // array (optional)
+ false, // encrypt (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +27,4 @@ databases.createStringAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create-url-attribute.md b/docs/examples/java/databases/create-url-attribute.md
index 9c504d8..706db3f 100644
--- a/docs/examples/java/databases/create-url-attribute.md
+++ b/docs/examples/java/databases/create-url-attribute.md
@@ -10,10 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.createUrlAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "https://example.com", // default (optional)
+ false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +25,4 @@ databases.createUrlAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/create.md b/docs/examples/java/databases/create.md
index a323434..3700e18 100644
--- a/docs/examples/java/databases/create.md
+++ b/docs/examples/java/databases/create.md
@@ -10,8 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.create(
- "[DATABASE_ID]",
- "[NAME]",
+ "", // databaseId
+ "", // name
+ false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +22,4 @@ databases.create(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/delete-attribute.md b/docs/examples/java/databases/delete-attribute.md
index 68aeecd..ee14deb 100644
--- a/docs/examples/java/databases/delete-attribute.md
+++ b/docs/examples/java/databases/delete-attribute.md
@@ -10,9 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.deleteAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- ""
+ "", // databaseId
+ "", // collectionId
+ "", // key
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ databases.deleteAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/delete-collection.md b/docs/examples/java/databases/delete-collection.md
index cd328b4..de17e07 100644
--- a/docs/examples/java/databases/delete-collection.md
+++ b/docs/examples/java/databases/delete-collection.md
@@ -10,8 +10,8 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.deleteCollection(
- "[DATABASE_ID]",
- "[COLLECTION_ID]"
+ "", // databaseId
+ "", // collectionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ databases.deleteCollection(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/delete-document.md b/docs/examples/java/databases/delete-document.md
index 4f4c849..722bb4f 100644
--- a/docs/examples/java/databases/delete-document.md
+++ b/docs/examples/java/databases/delete-document.md
@@ -5,14 +5,14 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.deleteDocument(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[DOCUMENT_ID]"
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ databases.deleteDocument(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/delete-index.md b/docs/examples/java/databases/delete-index.md
index 640bd0f..ed36408 100644
--- a/docs/examples/java/databases/delete-index.md
+++ b/docs/examples/java/databases/delete-index.md
@@ -10,9 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.deleteIndex(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- ""
+ "", // databaseId
+ "", // collectionId
+ "", // key
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ databases.deleteIndex(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/delete.md b/docs/examples/java/databases/delete.md
index 897a450..aa323b2 100644
--- a/docs/examples/java/databases/delete.md
+++ b/docs/examples/java/databases/delete.md
@@ -10,7 +10,7 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.delete(
- "[DATABASE_ID]"
+ "", // databaseId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ databases.delete(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/get-attribute.md b/docs/examples/java/databases/get-attribute.md
index 79c1d2b..be2dc5d 100644
--- a/docs/examples/java/databases/get-attribute.md
+++ b/docs/examples/java/databases/get-attribute.md
@@ -10,9 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.getAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- ""
+ "", // databaseId
+ "", // collectionId
+ "", // key
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ databases.getAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/get-collection.md b/docs/examples/java/databases/get-collection.md
index 3ecfa0c..75701bd 100644
--- a/docs/examples/java/databases/get-collection.md
+++ b/docs/examples/java/databases/get-collection.md
@@ -10,8 +10,8 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.getCollection(
- "[DATABASE_ID]",
- "[COLLECTION_ID]"
+ "", // databaseId
+ "", // collectionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ databases.getCollection(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/get-document.md b/docs/examples/java/databases/get-document.md
index 2061bed..7b6d043 100644
--- a/docs/examples/java/databases/get-document.md
+++ b/docs/examples/java/databases/get-document.md
@@ -5,14 +5,15 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.getDocument(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[DOCUMENT_ID]",
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +23,4 @@ databases.getDocument(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/get-index.md b/docs/examples/java/databases/get-index.md
index 2bf036a..1c5dec7 100644
--- a/docs/examples/java/databases/get-index.md
+++ b/docs/examples/java/databases/get-index.md
@@ -10,9 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.getIndex(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- ""
+ "", // databaseId
+ "", // collectionId
+ "", // key
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ databases.getIndex(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/get.md b/docs/examples/java/databases/get.md
index 066ec4d..f21ee37 100644
--- a/docs/examples/java/databases/get.md
+++ b/docs/examples/java/databases/get.md
@@ -10,7 +10,7 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.get(
- "[DATABASE_ID]"
+ "", // databaseId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ databases.get(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/list-attributes.md b/docs/examples/java/databases/list-attributes.md
index f42baa0..3f5b659 100644
--- a/docs/examples/java/databases/list-attributes.md
+++ b/docs/examples/java/databases/list-attributes.md
@@ -10,8 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.listAttributes(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
+ "", // databaseId
+ "", // collectionId
+ listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +22,4 @@ databases.listAttributes(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/list-collections.md b/docs/examples/java/databases/list-collections.md
index 67c343f..cdb807f 100644
--- a/docs/examples/java/databases/list-collections.md
+++ b/docs/examples/java/databases/list-collections.md
@@ -10,7 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.listCollections(
- "[DATABASE_ID]",
+ "", // databaseId
+ listOf(), // queries (optional)
+ "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +22,4 @@ databases.listCollections(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md
index 7a4a1b7..3dd929d 100644
--- a/docs/examples/java/databases/list-documents.md
+++ b/docs/examples/java/databases/list-documents.md
@@ -5,13 +5,14 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.listDocuments(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
+ "", // databaseId
+ "", // collectionId
+ listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +22,4 @@ databases.listDocuments(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/list-indexes.md b/docs/examples/java/databases/list-indexes.md
index be50cdd..5d59dfa 100644
--- a/docs/examples/java/databases/list-indexes.md
+++ b/docs/examples/java/databases/list-indexes.md
@@ -10,8 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.listIndexes(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
+ "", // databaseId
+ "", // collectionId
+ listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +22,4 @@ databases.listIndexes(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/list.md b/docs/examples/java/databases/list.md
index 04f8186..19334f3 100644
--- a/docs/examples/java/databases/list.md
+++ b/docs/examples/java/databases/list.md
@@ -10,6 +10,8 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.list(
+ listOf(), // queries (optional)
+ "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +21,4 @@ databases.list(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-boolean-attribute.md b/docs/examples/java/databases/update-boolean-attribute.md
index 97cee2d..8b47913 100644
--- a/docs/examples/java/databases/update-boolean-attribute.md
+++ b/docs/examples/java/databases/update-boolean-attribute.md
@@ -10,11 +10,11 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateBooleanAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- false
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ false, // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +24,4 @@ databases.updateBooleanAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-collection.md b/docs/examples/java/databases/update-collection.md
index 3f25c50..f3cdf9a 100644
--- a/docs/examples/java/databases/update-collection.md
+++ b/docs/examples/java/databases/update-collection.md
@@ -10,9 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateCollection(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[NAME]",
+ "", // databaseId
+ "", // collectionId
+ "", // name
+ listOf("read("any")"), // permissions (optional)
+ false, // documentSecurity (optional)
+ false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +25,4 @@ databases.updateCollection(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-datetime-attribute.md b/docs/examples/java/databases/update-datetime-attribute.md
index 503f2de..bc6bee4 100644
--- a/docs/examples/java/databases/update-datetime-attribute.md
+++ b/docs/examples/java/databases/update-datetime-attribute.md
@@ -10,11 +10,11 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateDatetimeAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- ""
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "", // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +24,4 @@ databases.updateDatetimeAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-document.md b/docs/examples/java/databases/update-document.md
index e9a596d..246a900 100644
--- a/docs/examples/java/databases/update-document.md
+++ b/docs/examples/java/databases/update-document.md
@@ -5,14 +5,16 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.updateDocument(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "[DOCUMENT_ID]",
+ "", // databaseId
+ "", // collectionId
+ "", // documentId
+ mapOf( "a" to "b" ), // data (optional)
+ listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +24,4 @@ databases.updateDocument(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-email-attribute.md b/docs/examples/java/databases/update-email-attribute.md
index 39ea153..a62447d 100644
--- a/docs/examples/java/databases/update-email-attribute.md
+++ b/docs/examples/java/databases/update-email-attribute.md
@@ -10,11 +10,11 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateEmailAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- "email@example.com"
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "email@example.com", // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +24,4 @@ databases.updateEmailAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-enum-attribute.md b/docs/examples/java/databases/update-enum-attribute.md
index 969ea4e..b78fb88 100644
--- a/docs/examples/java/databases/update-enum-attribute.md
+++ b/docs/examples/java/databases/update-enum-attribute.md
@@ -10,12 +10,12 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateEnumAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- listOf(),
- false,
- "[DEFAULT]"
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ listOf(), // elements
+ false, // required
+ "", // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -25,3 +25,4 @@ databases.updateEnumAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-float-attribute.md b/docs/examples/java/databases/update-float-attribute.md
index 67d76e4..89e6c61 100644
--- a/docs/examples/java/databases/update-float-attribute.md
+++ b/docs/examples/java/databases/update-float-attribute.md
@@ -10,13 +10,13 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateFloatAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- 0,
- 0,
- 0
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ 0, // min
+ 0, // max
+ 0, // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -26,3 +26,4 @@ databases.updateFloatAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-integer-attribute.md b/docs/examples/java/databases/update-integer-attribute.md
index b9308dc..1e90bdc 100644
--- a/docs/examples/java/databases/update-integer-attribute.md
+++ b/docs/examples/java/databases/update-integer-attribute.md
@@ -10,13 +10,13 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateIntegerAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- 0,
- 0,
- 0
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ 0, // min
+ 0, // max
+ 0, // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -26,3 +26,4 @@ databases.updateIntegerAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-ip-attribute.md b/docs/examples/java/databases/update-ip-attribute.md
index 6a936a5..8df90b5 100644
--- a/docs/examples/java/databases/update-ip-attribute.md
+++ b/docs/examples/java/databases/update-ip-attribute.md
@@ -10,11 +10,11 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateIpAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- ""
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "", // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +24,4 @@ databases.updateIpAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-relationship-attribute.md b/docs/examples/java/databases/update-relationship-attribute.md
index 272952b..1fd638f 100644
--- a/docs/examples/java/databases/update-relationship-attribute.md
+++ b/docs/examples/java/databases/update-relationship-attribute.md
@@ -10,9 +10,10 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateRelationshipAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ RelationMutate.CASCADE, // onDelete (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +23,4 @@ databases.updateRelationshipAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-string-attribute.md b/docs/examples/java/databases/update-string-attribute.md
index aba0d0e..b5cf75a 100644
--- a/docs/examples/java/databases/update-string-attribute.md
+++ b/docs/examples/java/databases/update-string-attribute.md
@@ -10,11 +10,11 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateStringAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- "[DEFAULT]"
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "", // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +24,4 @@ databases.updateStringAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update-url-attribute.md b/docs/examples/java/databases/update-url-attribute.md
index 87ab384..c93f509 100644
--- a/docs/examples/java/databases/update-url-attribute.md
+++ b/docs/examples/java/databases/update-url-attribute.md
@@ -10,11 +10,11 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.updateUrlAttribute(
- "[DATABASE_ID]",
- "[COLLECTION_ID]",
- "",
- false,
- "https://example.com"
+ "", // databaseId
+ "", // collectionId
+ "", // key
+ false, // required
+ "https://example.com", // default
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -24,3 +24,4 @@ databases.updateUrlAttribute(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/databases/update.md b/docs/examples/java/databases/update.md
index b706df6..2d9695b 100644
--- a/docs/examples/java/databases/update.md
+++ b/docs/examples/java/databases/update.md
@@ -10,8 +10,9 @@ Client client = new Client()
Databases databases = new Databases(client);
databases.update(
- "[DATABASE_ID]",
- "[NAME]",
+ "", // databaseId
+ "", // name
+ false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +22,4 @@ databases.update(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/create-build.md b/docs/examples/java/functions/create-build.md
index 10c8d2f..097587f 100644
--- a/docs/examples/java/functions/create-build.md
+++ b/docs/examples/java/functions/create-build.md
@@ -10,9 +10,9 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.createBuild(
- "[FUNCTION_ID]",
- "[DEPLOYMENT_ID]",
- "[BUILD_ID]"
+ "", // functionId
+ "", // deploymentId
+ "", // buildId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ functions.createBuild(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/create-deployment.md b/docs/examples/java/functions/create-deployment.md
index 4e6da33..25ca118 100644
--- a/docs/examples/java/functions/create-deployment.md
+++ b/docs/examples/java/functions/create-deployment.md
@@ -11,9 +11,11 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.createDeployment(
- "[FUNCTION_ID]",
- InputFile.fromPath("file.png"),
- false,
+ "", // functionId
+ InputFile.fromPath("file.png"), // code
+ false, // activate
+ "", // entrypoint (optional)
+ "", // commands (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -23,3 +25,4 @@ functions.createDeployment(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md
index 315f57d..f3507f3 100644
--- a/docs/examples/java/functions/create-execution.md
+++ b/docs/examples/java/functions/create-execution.md
@@ -5,12 +5,17 @@ import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Functions functions = new Functions(client);
functions.createExecution(
- "[FUNCTION_ID]",
+ "", // functionId
+ "", // body (optional)
+ false, // async (optional)
+ "", // path (optional)
+ ExecutionMethod.GET, // method (optional)
+ mapOf( "a" to "b" ), // headers (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +25,4 @@ functions.createExecution(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/create-variable.md b/docs/examples/java/functions/create-variable.md
index 5e9c5a6..f833f34 100644
--- a/docs/examples/java/functions/create-variable.md
+++ b/docs/examples/java/functions/create-variable.md
@@ -10,9 +10,9 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.createVariable(
- "[FUNCTION_ID]",
- "[KEY]",
- "[VALUE]"
+ "", // functionId
+ "", // key
+ "", // value
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +22,4 @@ functions.createVariable(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md
index aac8169..edaaa11 100644
--- a/docs/examples/java/functions/create.md
+++ b/docs/examples/java/functions/create.md
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
+import io.appwrite.enums.Runtime;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -10,9 +11,26 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.create(
- "[FUNCTION_ID]",
- "[NAME]",
- "node-18.0",
+ "", // functionId
+ "", // name
+ .NODE_14_5, // runtime
+ listOf("any"), // execute (optional)
+ listOf(), // events (optional)
+ "", // schedule (optional)
+ 1, // timeout (optional)
+ false, // enabled (optional)
+ false, // logging (optional)
+ "", // entrypoint (optional)
+ "", // commands (optional)
+ "", // installationId (optional)
+ "", // providerRepositoryId (optional)
+ "", // providerBranch (optional)
+ false, // providerSilentMode (optional)
+ "", // providerRootDirectory (optional)
+ "", // templateRepository (optional)
+ "", // templateOwner (optional)
+ "", // templateRootDirectory (optional)
+ "", // templateBranch (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +40,4 @@ functions.create(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/delete-deployment.md b/docs/examples/java/functions/delete-deployment.md
index 703dce6..83de970 100644
--- a/docs/examples/java/functions/delete-deployment.md
+++ b/docs/examples/java/functions/delete-deployment.md
@@ -10,8 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.deleteDeployment(
- "[FUNCTION_ID]",
- "[DEPLOYMENT_ID]"
+ "", // functionId
+ "", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.deleteDeployment(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/delete-variable.md b/docs/examples/java/functions/delete-variable.md
index d366150..6d91f50 100644
--- a/docs/examples/java/functions/delete-variable.md
+++ b/docs/examples/java/functions/delete-variable.md
@@ -10,8 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.deleteVariable(
- "[FUNCTION_ID]",
- "[VARIABLE_ID]"
+ "", // functionId
+ "", // variableId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.deleteVariable(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/delete.md b/docs/examples/java/functions/delete.md
index 8f39896..647da6e 100644
--- a/docs/examples/java/functions/delete.md
+++ b/docs/examples/java/functions/delete.md
@@ -10,7 +10,7 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.delete(
- "[FUNCTION_ID]"
+ "", // functionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ functions.delete(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/download-deployment.md b/docs/examples/java/functions/download-deployment.md
index 91898dc..e241481 100644
--- a/docs/examples/java/functions/download-deployment.md
+++ b/docs/examples/java/functions/download-deployment.md
@@ -10,8 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.downloadDeployment(
- "[FUNCTION_ID]",
- "[DEPLOYMENT_ID]"
+ "", // functionId
+ "", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.downloadDeployment(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/get-deployment.md b/docs/examples/java/functions/get-deployment.md
index 5b539d2..12575ad 100644
--- a/docs/examples/java/functions/get-deployment.md
+++ b/docs/examples/java/functions/get-deployment.md
@@ -10,8 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.getDeployment(
- "[FUNCTION_ID]",
- "[DEPLOYMENT_ID]"
+ "", // functionId
+ "", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.getDeployment(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/get-execution.md b/docs/examples/java/functions/get-execution.md
index b1ff948..1f0d01b 100644
--- a/docs/examples/java/functions/get-execution.md
+++ b/docs/examples/java/functions/get-execution.md
@@ -5,13 +5,13 @@ import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Functions functions = new Functions(client);
functions.getExecution(
- "[FUNCTION_ID]",
- "[EXECUTION_ID]"
+ "", // functionId
+ "", // executionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.getExecution(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/get-variable.md b/docs/examples/java/functions/get-variable.md
index 2be25a5..6b89b16 100644
--- a/docs/examples/java/functions/get-variable.md
+++ b/docs/examples/java/functions/get-variable.md
@@ -10,8 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.getVariable(
- "[FUNCTION_ID]",
- "[VARIABLE_ID]"
+ "", // functionId
+ "", // variableId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.getVariable(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/get.md b/docs/examples/java/functions/get.md
index 8ad5ea3..777bf83 100644
--- a/docs/examples/java/functions/get.md
+++ b/docs/examples/java/functions/get.md
@@ -10,7 +10,7 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.get(
- "[FUNCTION_ID]"
+ "", // functionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ functions.get(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/list-deployments.md b/docs/examples/java/functions/list-deployments.md
index 61f48c8..bee24c9 100644
--- a/docs/examples/java/functions/list-deployments.md
+++ b/docs/examples/java/functions/list-deployments.md
@@ -10,7 +10,9 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.listDeployments(
- "[FUNCTION_ID]",
+ "", // functionId
+ listOf(), // queries (optional)
+ "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +22,4 @@ functions.listDeployments(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md
index 392e9c8..d8632aa 100644
--- a/docs/examples/java/functions/list-executions.md
+++ b/docs/examples/java/functions/list-executions.md
@@ -5,12 +5,14 @@ import io.appwrite.services.Functions;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Functions functions = new Functions(client);
functions.listExecutions(
- "[FUNCTION_ID]",
+ "", // functionId
+ listOf(), // queries (optional)
+ "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +22,4 @@ functions.listExecutions(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/list-variables.md b/docs/examples/java/functions/list-variables.md
index 4fa47e8..df66fd7 100644
--- a/docs/examples/java/functions/list-variables.md
+++ b/docs/examples/java/functions/list-variables.md
@@ -10,7 +10,7 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.listVariables(
- "[FUNCTION_ID]"
+ "", // functionId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ functions.listVariables(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/list.md b/docs/examples/java/functions/list.md
index 4224cf5..2276e55 100644
--- a/docs/examples/java/functions/list.md
+++ b/docs/examples/java/functions/list.md
@@ -10,6 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.list(
+ listOf(), // queries (optional)
+ "", // search (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +21,4 @@ functions.list(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/update-deployment.md b/docs/examples/java/functions/update-deployment.md
index 2af0637..b0a9c15 100644
--- a/docs/examples/java/functions/update-deployment.md
+++ b/docs/examples/java/functions/update-deployment.md
@@ -10,8 +10,8 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.updateDeployment(
- "[FUNCTION_ID]",
- "[DEPLOYMENT_ID]"
+ "", // functionId
+ "", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +21,4 @@ functions.updateDeployment(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/update-variable.md b/docs/examples/java/functions/update-variable.md
index f30bbf8..20610d9 100644
--- a/docs/examples/java/functions/update-variable.md
+++ b/docs/examples/java/functions/update-variable.md
@@ -10,9 +10,10 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.updateVariable(
- "[FUNCTION_ID]",
- "[VARIABLE_ID]",
- "[KEY]",
+ "", // functionId
+ "", // variableId
+ "", // key
+ "", // value (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,3 +23,4 @@ functions.updateVariable(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/functions/update.md b/docs/examples/java/functions/update.md
index 8a53d75..dca9943 100644
--- a/docs/examples/java/functions/update.md
+++ b/docs/examples/java/functions/update.md
@@ -10,8 +10,22 @@ Client client = new Client()
Functions functions = new Functions(client);
functions.update(
- "[FUNCTION_ID]",
- "[NAME]",
+ "", // functionId
+ "", // name
+ .NODE_14_5, // runtime (optional)
+ listOf("any"), // execute (optional)
+ listOf(), // events (optional)
+ "", // schedule (optional)
+ 1, // timeout (optional)
+ false, // enabled (optional)
+ false, // logging (optional)
+ "", // entrypoint (optional)
+ "", // commands (optional)
+ "", // installationId (optional)
+ "", // providerRepositoryId (optional)
+ "", // providerBranch (optional)
+ false, // providerSilentMode (optional)
+ "", // providerRootDirectory (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,3 +35,4 @@ functions.update(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/graphql/mutation.md b/docs/examples/java/graphql/mutation.md
index d689c62..3b45db7 100644
--- a/docs/examples/java/graphql/mutation.md
+++ b/docs/examples/java/graphql/mutation.md
@@ -10,7 +10,7 @@ Client client = new Client()
Graphql graphql = new Graphql(client);
graphql.mutation(
- mapOf( "a" to "b" )
+ mapOf( "a" to "b" ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ graphql.mutation(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/graphql/query.md b/docs/examples/java/graphql/query.md
index e4b8693..508b326 100644
--- a/docs/examples/java/graphql/query.md
+++ b/docs/examples/java/graphql/query.md
@@ -10,7 +10,7 @@ Client client = new Client()
Graphql graphql = new Graphql(client);
graphql.query(
- mapOf( "a" to "b" )
+ mapOf( "a" to "b" ), // query
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,3 +20,4 @@ graphql.query(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-certificate.md b/docs/examples/java/health/get-certificate.md
new file mode 100644
index 0000000..73120ec
--- /dev/null
+++ b/docs/examples/java/health/get-certificate.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Health;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Health health = new Health(client);
+
+health.getCertificate(
+ "", // domain (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/health/get-failed-jobs.md b/docs/examples/java/health/get-failed-jobs.md
new file mode 100644
index 0000000..7fa35ae
--- /dev/null
+++ b/docs/examples/java/health/get-failed-jobs.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Health;
+import io.appwrite.enums.Name;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Health health = new Health(client);
+
+health.getFailedJobs(
+ .V1_DATABASE, // name
+ 0, // threshold (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/health/get-queue-builds.md b/docs/examples/java/health/get-queue-builds.md
index ff8a54f..e7289a7 100644
--- a/docs/examples/java/health/get-queue-builds.md
+++ b/docs/examples/java/health/get-queue-builds.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueBuilds(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueBuilds(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-certificates.md b/docs/examples/java/health/get-queue-certificates.md
index e3247d5..14722d1 100644
--- a/docs/examples/java/health/get-queue-certificates.md
+++ b/docs/examples/java/health/get-queue-certificates.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueCertificates(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueCertificates(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-databases.md b/docs/examples/java/health/get-queue-databases.md
index 79b4897..c504a84 100644
--- a/docs/examples/java/health/get-queue-databases.md
+++ b/docs/examples/java/health/get-queue-databases.md
@@ -10,6 +10,8 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueDatabases(
+ "", // name (optional)
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +21,4 @@ health.getQueueDatabases(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-deletes.md b/docs/examples/java/health/get-queue-deletes.md
index 4152092..83a4862 100644
--- a/docs/examples/java/health/get-queue-deletes.md
+++ b/docs/examples/java/health/get-queue-deletes.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueDeletes(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueDeletes(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-functions.md b/docs/examples/java/health/get-queue-functions.md
index 9643108..1984d81 100644
--- a/docs/examples/java/health/get-queue-functions.md
+++ b/docs/examples/java/health/get-queue-functions.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueFunctions(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueFunctions(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-logs.md b/docs/examples/java/health/get-queue-logs.md
index 8e81796..fa7fa7e 100644
--- a/docs/examples/java/health/get-queue-logs.md
+++ b/docs/examples/java/health/get-queue-logs.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueLogs(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueLogs(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-mails.md b/docs/examples/java/health/get-queue-mails.md
index 812273e..3962d94 100644
--- a/docs/examples/java/health/get-queue-mails.md
+++ b/docs/examples/java/health/get-queue-mails.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueMails(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueMails(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-messaging.md b/docs/examples/java/health/get-queue-messaging.md
index 1e0c8f5..01b7e5a 100644
--- a/docs/examples/java/health/get-queue-messaging.md
+++ b/docs/examples/java/health/get-queue-messaging.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueMessaging(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueMessaging(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-migrations.md b/docs/examples/java/health/get-queue-migrations.md
index eaf4a89..7272a6f 100644
--- a/docs/examples/java/health/get-queue-migrations.md
+++ b/docs/examples/java/health/get-queue-migrations.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueMigrations(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueMigrations(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-queue-usage-dump.md b/docs/examples/java/health/get-queue-usage-dump.md
new file mode 100644
index 0000000..8083af8
--- /dev/null
+++ b/docs/examples/java/health/get-queue-usage-dump.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Health;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Health health = new Health(client);
+
+health.getQueueUsageDump(
+ 0, // threshold (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/health/get-queue-usage.md b/docs/examples/java/health/get-queue-usage.md
new file mode 100644
index 0000000..ad4a163
--- /dev/null
+++ b/docs/examples/java/health/get-queue-usage.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Health;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Health health = new Health(client);
+
+health.getQueueUsage(
+ 0, // threshold (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/health/get-queue-webhooks.md b/docs/examples/java/health/get-queue-webhooks.md
index e400824..06dba93 100644
--- a/docs/examples/java/health/get-queue-webhooks.md
+++ b/docs/examples/java/health/get-queue-webhooks.md
@@ -10,6 +10,7 @@ Client client = new Client()
Health health = new Health(client);
health.getQueueWebhooks(
+ 0, // threshold (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,3 +20,4 @@ health.getQueueWebhooks(
System.out.println(result);
})
);
+
diff --git a/docs/examples/java/health/get-storage.md b/docs/examples/java/health/get-storage.md
new file mode 100644
index 0000000..c011ba5
--- /dev/null
+++ b/docs/examples/java/health/get-storage.md
@@ -0,0 +1,19 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Health;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Health health = new Health(client);
+
+health.getStorage(new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+}));
diff --git a/docs/examples/java/locale/get.md b/docs/examples/java/locale/get.md
index 4fb6be9..de09960 100644
--- a/docs/examples/java/locale/get.md
+++ b/docs/examples/java/locale/get.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-codes.md b/docs/examples/java/locale/list-codes.md
index a3feffe..55e7503 100644
--- a/docs/examples/java/locale/list-codes.md
+++ b/docs/examples/java/locale/list-codes.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-continents.md b/docs/examples/java/locale/list-continents.md
index 661fcc3..793c863 100644
--- a/docs/examples/java/locale/list-continents.md
+++ b/docs/examples/java/locale/list-continents.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-countries-e-u.md b/docs/examples/java/locale/list-countries-e-u.md
index 6164ca0..8d45317 100644
--- a/docs/examples/java/locale/list-countries-e-u.md
+++ b/docs/examples/java/locale/list-countries-e-u.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-countries-phones.md b/docs/examples/java/locale/list-countries-phones.md
index 2cb41c1..bad8ff2 100644
--- a/docs/examples/java/locale/list-countries-phones.md
+++ b/docs/examples/java/locale/list-countries-phones.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-countries.md b/docs/examples/java/locale/list-countries.md
index 74d3b5d..96aac66 100644
--- a/docs/examples/java/locale/list-countries.md
+++ b/docs/examples/java/locale/list-countries.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-currencies.md b/docs/examples/java/locale/list-currencies.md
index 54a0e4d..55365ef 100644
--- a/docs/examples/java/locale/list-currencies.md
+++ b/docs/examples/java/locale/list-currencies.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/locale/list-languages.md b/docs/examples/java/locale/list-languages.md
index 54976c5..fbf5565 100644
--- a/docs/examples/java/locale/list-languages.md
+++ b/docs/examples/java/locale/list-languages.md
@@ -5,7 +5,7 @@ import io.appwrite.services.Locale;
Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
- .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+ .setSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
diff --git a/docs/examples/java/messaging/create-apns-provider.md b/docs/examples/java/messaging/create-apns-provider.md
new file mode 100644
index 0000000..2941fc6
--- /dev/null
+++ b/docs/examples/java/messaging/create-apns-provider.md
@@ -0,0 +1,30 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createApnsProvider(
+ "", // providerId
+ "", // name
+ "", // authKey (optional)
+ "", // authKeyId (optional)
+ "", // teamId (optional)
+ "", // bundleId (optional)
+ false, // sandbox (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-email.md b/docs/examples/java/messaging/create-email.md
new file mode 100644
index 0000000..4bf3a7c
--- /dev/null
+++ b/docs/examples/java/messaging/create-email.md
@@ -0,0 +1,34 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createEmail(
+ "", // messageId
+ "", // subject
+ "", // content
+ listOf(), // topics (optional)
+ listOf(), // users (optional)
+ listOf(), // targets (optional)
+ listOf(), // cc (optional)
+ listOf(), // bcc (optional)
+ listOf(), // attachments (optional)
+ false, // draft (optional)
+ false, // html (optional)
+ "", // scheduledAt (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-fcm-provider.md b/docs/examples/java/messaging/create-fcm-provider.md
new file mode 100644
index 0000000..8a0211c
--- /dev/null
+++ b/docs/examples/java/messaging/create-fcm-provider.md
@@ -0,0 +1,26 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createFcmProvider(
+ "", // providerId
+ "", // name
+ mapOf( "a" to "b" ), // serviceAccountJSON (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-mailgun-provider.md b/docs/examples/java/messaging/create-mailgun-provider.md
new file mode 100644
index 0000000..946729b
--- /dev/null
+++ b/docs/examples/java/messaging/create-mailgun-provider.md
@@ -0,0 +1,32 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createMailgunProvider(
+ "", // providerId
+ "", // name
+ "", // apiKey (optional)
+ "", // domain (optional)
+ false, // isEuRegion (optional)
+ "", // fromName (optional)
+ "email@example.com", // fromEmail (optional)
+ "", // replyToName (optional)
+ "email@example.com", // replyToEmail (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-msg91provider.md b/docs/examples/java/messaging/create-msg91provider.md
new file mode 100644
index 0000000..2f4ef83
--- /dev/null
+++ b/docs/examples/java/messaging/create-msg91provider.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createMsg91Provider(
+ "", // providerId
+ "", // name
+ "+12065550100", // from (optional)
+ "", // senderId (optional)
+ "", // authKey (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-push.md b/docs/examples/java/messaging/create-push.md
new file mode 100644
index 0000000..904b436
--- /dev/null
+++ b/docs/examples/java/messaging/create-push.md
@@ -0,0 +1,38 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createPush(
+ "", // messageId
+ "", // title
+ "", // body
+ listOf(), // topics (optional)
+ listOf(), // users (optional)
+ listOf(), // targets (optional)
+ mapOf( "a" to "b" ), // data (optional)
+ "", // action (optional)
+ "[ID1:ID2]", // image (optional)
+ "", // icon (optional)
+ "", // sound (optional)
+ "", // color (optional)
+ "", // tag (optional)
+ "", // badge (optional)
+ false, // draft (optional)
+ "", // scheduledAt (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-sendgrid-provider.md b/docs/examples/java/messaging/create-sendgrid-provider.md
new file mode 100644
index 0000000..9da521e
--- /dev/null
+++ b/docs/examples/java/messaging/create-sendgrid-provider.md
@@ -0,0 +1,30 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createSendgridProvider(
+ "", // providerId
+ "", // name
+ "", // apiKey (optional)
+ "", // fromName (optional)
+ "email@example.com", // fromEmail (optional)
+ "", // replyToName (optional)
+ "email@example.com", // replyToEmail (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-sms.md b/docs/examples/java/messaging/create-sms.md
new file mode 100644
index 0000000..2bde3b6
--- /dev/null
+++ b/docs/examples/java/messaging/create-sms.md
@@ -0,0 +1,29 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createSms(
+ "", // messageId
+ "", // content
+ listOf(), // topics (optional)
+ listOf(), // users (optional)
+ listOf(), // targets (optional)
+ false, // draft (optional)
+ "", // scheduledAt (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-smtp-provider.md b/docs/examples/java/messaging/create-smtp-provider.md
new file mode 100644
index 0000000..05a9ab1
--- /dev/null
+++ b/docs/examples/java/messaging/create-smtp-provider.md
@@ -0,0 +1,36 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createSmtpProvider(
+ "", // providerId
+ "", // name
+ "", // host
+ 1, // port (optional)
+ "", // username (optional)
+ "", // password (optional)
+ SmtpEncryption.NONE, // encryption (optional)
+ false, // autoTLS (optional)
+ "", // mailer (optional)
+ "", // fromName (optional)
+ "email@example.com", // fromEmail (optional)
+ "", // replyToName (optional)
+ "email@example.com", // replyToEmail (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-subscriber.md b/docs/examples/java/messaging/create-subscriber.md
new file mode 100644
index 0000000..1aa89e1
--- /dev/null
+++ b/docs/examples/java/messaging/create-subscriber.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+
+Messaging messaging = new Messaging(client);
+
+messaging.createSubscriber(
+ "", // topicId
+ "", // subscriberId
+ "", // targetId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-telesign-provider.md b/docs/examples/java/messaging/create-telesign-provider.md
new file mode 100644
index 0000000..738f1fd
--- /dev/null
+++ b/docs/examples/java/messaging/create-telesign-provider.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createTelesignProvider(
+ "", // providerId
+ "", // name
+ "+12065550100", // from (optional)
+ "", // customerId (optional)
+ "", // apiKey (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-textmagic-provider.md b/docs/examples/java/messaging/create-textmagic-provider.md
new file mode 100644
index 0000000..f78362d
--- /dev/null
+++ b/docs/examples/java/messaging/create-textmagic-provider.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createTextmagicProvider(
+ "", // providerId
+ "", // name
+ "+12065550100", // from (optional)
+ "", // username (optional)
+ "", // apiKey (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-topic.md b/docs/examples/java/messaging/create-topic.md
new file mode 100644
index 0000000..fa314c4
--- /dev/null
+++ b/docs/examples/java/messaging/create-topic.md
@@ -0,0 +1,25 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createTopic(
+ "", // topicId
+ "", // name
+ listOf("any"), // subscribe (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-twilio-provider.md b/docs/examples/java/messaging/create-twilio-provider.md
new file mode 100644
index 0000000..896e4a3
--- /dev/null
+++ b/docs/examples/java/messaging/create-twilio-provider.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createTwilioProvider(
+ "", // providerId
+ "", // name
+ "+12065550100", // from (optional)
+ "", // accountSid (optional)
+ "", // authToken (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/create-vonage-provider.md b/docs/examples/java/messaging/create-vonage-provider.md
new file mode 100644
index 0000000..e7ee86b
--- /dev/null
+++ b/docs/examples/java/messaging/create-vonage-provider.md
@@ -0,0 +1,28 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.createVonageProvider(
+ "", // providerId
+ "", // name
+ "+12065550100", // from (optional)
+ "", // apiKey (optional)
+ "", // apiSecret (optional)
+ false, // enabled (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/delete-provider.md b/docs/examples/java/messaging/delete-provider.md
new file mode 100644
index 0000000..f980650
--- /dev/null
+++ b/docs/examples/java/messaging/delete-provider.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.deleteProvider(
+ "", // providerId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/delete-subscriber.md b/docs/examples/java/messaging/delete-subscriber.md
new file mode 100644
index 0000000..ba02c12
--- /dev/null
+++ b/docs/examples/java/messaging/delete-subscriber.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token
+
+Messaging messaging = new Messaging(client);
+
+messaging.deleteSubscriber(
+ "", // topicId
+ "", // subscriberId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/delete-topic.md b/docs/examples/java/messaging/delete-topic.md
new file mode 100644
index 0000000..17aefe1
--- /dev/null
+++ b/docs/examples/java/messaging/delete-topic.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.deleteTopic(
+ "", // topicId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/delete.md b/docs/examples/java/messaging/delete.md
new file mode 100644
index 0000000..1565f8b
--- /dev/null
+++ b/docs/examples/java/messaging/delete.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.delete(
+ "", // messageId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/get-message.md b/docs/examples/java/messaging/get-message.md
new file mode 100644
index 0000000..9129a20
--- /dev/null
+++ b/docs/examples/java/messaging/get-message.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.getMessage(
+ "", // messageId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/get-provider.md b/docs/examples/java/messaging/get-provider.md
new file mode 100644
index 0000000..704a2b2
--- /dev/null
+++ b/docs/examples/java/messaging/get-provider.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.getProvider(
+ "", // providerId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/get-subscriber.md b/docs/examples/java/messaging/get-subscriber.md
new file mode 100644
index 0000000..53638ef
--- /dev/null
+++ b/docs/examples/java/messaging/get-subscriber.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.getSubscriber(
+ "", // topicId
+ "", // subscriberId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/get-topic.md b/docs/examples/java/messaging/get-topic.md
new file mode 100644
index 0000000..3e8ad4c
--- /dev/null
+++ b/docs/examples/java/messaging/get-topic.md
@@ -0,0 +1,23 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.getTopic(
+ "", // topicId
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/list-message-logs.md b/docs/examples/java/messaging/list-message-logs.md
new file mode 100644
index 0000000..224c2ef
--- /dev/null
+++ b/docs/examples/java/messaging/list-message-logs.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.listMessageLogs(
+ "", // messageId
+ listOf(), // queries (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/list-messages.md b/docs/examples/java/messaging/list-messages.md
new file mode 100644
index 0000000..7b31e16
--- /dev/null
+++ b/docs/examples/java/messaging/list-messages.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.listMessages(
+ listOf(), // queries (optional)
+ "", // search (optional)
+ new CoroutineCallback<>((result, error) -> {
+ if (error != null) {
+ error.printStackTrace();
+ return;
+ }
+
+ System.out.println(result);
+ })
+);
+
diff --git a/docs/examples/java/messaging/list-provider-logs.md b/docs/examples/java/messaging/list-provider-logs.md
new file mode 100644
index 0000000..1cda4d1
--- /dev/null
+++ b/docs/examples/java/messaging/list-provider-logs.md
@@ -0,0 +1,24 @@
+import io.appwrite.Client;
+import io.appwrite.coroutines.CoroutineCallback;
+import io.appwrite.services.Messaging;
+
+Client client = new Client()
+ .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
+ .setProject("5df5acd0d48c2") // Your project ID
+ .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
+
+Messaging messaging = new Messaging(client);
+
+messaging.listProviderLogs(
+ "