diff --git a/CHANGELOG.md b/CHANGELOG.md index d3fbbdc7..8b3298eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 12.1.0 + +* Add `queries` parameter to Realtime subscriptions for filtering events +* Add `subscriptions` field to `RealtimeCallback` and `RealtimeResponseEvent` types +* Fix `Roles` enum removed from Teams service; `roles` parameter now accepts `List` + ## 12.0.0 * Add array-based enum parameters (e.g., `permissions: List`). diff --git a/README.md b/README.md index f1d6b762..7e98220f 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-android:12.0.0") +implementation("io.appwrite:sdk-for-android:12.1.0") ``` ### Maven @@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file: io.appwrite sdk-for-android - 12.0.0 + 12.1.0 ``` diff --git a/docs/examples/java/account/create-anonymous-session.md b/docs/examples/java/account/create-anonymous-session.md index 9d805882..a48b8ea0 100644 --- a/docs/examples/java/account/create-anonymous-session.md +++ b/docs/examples/java/account/create-anonymous-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/create-email-password-session.md b/docs/examples/java/account/create-email-password-session.md index 428b6fdd..be91e8ef 100644 --- a/docs/examples/java/account/create-email-password-session.md +++ b/docs/examples/java/account/create-email-password-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.createEmailPasswordSession( }) ); +``` diff --git a/docs/examples/java/account/create-email-token.md b/docs/examples/java/account/create-email-token.md index 869f4a89..d1acde23 100644 --- a/docs/examples/java/account/create-email-token.md +++ b/docs/examples/java/account/create-email-token.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -22,3 +23,4 @@ account.createEmailToken( }) ); +``` diff --git a/docs/examples/java/account/create-email-verification.md b/docs/examples/java/account/create-email-verification.md index dfbf059d..c7f559a8 100644 --- a/docs/examples/java/account/create-email-verification.md +++ b/docs/examples/java/account/create-email-verification.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.createEmailVerification( }) ); +``` diff --git a/docs/examples/java/account/create-jwt.md b/docs/examples/java/account/create-jwt.md index 56c31eee..f05bbcaf 100644 --- a/docs/examples/java/account/create-jwt.md +++ b/docs/examples/java/account/create-jwt.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.createJWT( }) ); +``` diff --git a/docs/examples/java/account/create-magic-url-token.md b/docs/examples/java/account/create-magic-url-token.md index 6253e00d..6a18e65c 100644 --- a/docs/examples/java/account/create-magic-url-token.md +++ b/docs/examples/java/account/create-magic-url-token.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -23,3 +24,4 @@ account.createMagicURLToken( }) ); +``` diff --git a/docs/examples/java/account/create-mfa-authenticator.md b/docs/examples/java/account/create-mfa-authenticator.md index d236f46c..404e0420 100644 --- a/docs/examples/java/account/create-mfa-authenticator.md +++ b/docs/examples/java/account/create-mfa-authenticator.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.createMFAAuthenticator( }) ); +``` diff --git a/docs/examples/java/account/create-mfa-challenge.md b/docs/examples/java/account/create-mfa-challenge.md index 222c0bda..2cb46fdc 100644 --- a/docs/examples/java/account/create-mfa-challenge.md +++ b/docs/examples/java/account/create-mfa-challenge.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.createMFAChallenge( }) ); +``` diff --git a/docs/examples/java/account/create-mfa-recovery-codes.md b/docs/examples/java/account/create-mfa-recovery-codes.md index 792e0860..e97714c6 100644 --- a/docs/examples/java/account/create-mfa-recovery-codes.md +++ b/docs/examples/java/account/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/create-o-auth-2-session.md b/docs/examples/java/account/create-o-auth-2-session.md index 5ada9368..b34bcf76 100644 --- a/docs/examples/java/account/create-o-auth-2-session.md +++ b/docs/examples/java/account/create-o-auth-2-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -24,3 +25,4 @@ account.createOAuth2Session( }) ); +``` diff --git a/docs/examples/java/account/create-o-auth-2-token.md b/docs/examples/java/account/create-o-auth-2-token.md index f1122dc8..a6966654 100644 --- a/docs/examples/java/account/create-o-auth-2-token.md +++ b/docs/examples/java/account/create-o-auth-2-token.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -24,3 +25,4 @@ account.createOAuth2Token( }) ); +``` diff --git a/docs/examples/java/account/create-phone-token.md b/docs/examples/java/account/create-phone-token.md index 19d90b34..0808373d 100644 --- a/docs/examples/java/account/create-phone-token.md +++ b/docs/examples/java/account/create-phone-token.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.createPhoneToken( }) ); +``` diff --git a/docs/examples/java/account/create-phone-verification.md b/docs/examples/java/account/create-phone-verification.md index 8c16b6c2..fa6bf74c 100644 --- a/docs/examples/java/account/create-phone-verification.md +++ b/docs/examples/java/account/create-phone-verification.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/create-push-target.md b/docs/examples/java/account/create-push-target.md index d434a5c6..6842e5ba 100644 --- a/docs/examples/java/account/create-push-target.md +++ b/docs/examples/java/account/create-push-target.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -22,3 +23,4 @@ account.createPushTarget( }) ); +``` diff --git a/docs/examples/java/account/create-recovery.md b/docs/examples/java/account/create-recovery.md index 5592c6eb..5647bac4 100644 --- a/docs/examples/java/account/create-recovery.md +++ b/docs/examples/java/account/create-recovery.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.createRecovery( }) ); +``` diff --git a/docs/examples/java/account/create-session.md b/docs/examples/java/account/create-session.md index 0c59a802..e8bb63e2 100644 --- a/docs/examples/java/account/create-session.md +++ b/docs/examples/java/account/create-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.createSession( }) ); +``` diff --git a/docs/examples/java/account/create-verification.md b/docs/examples/java/account/create-verification.md index e91acc85..ab3d3939 100644 --- a/docs/examples/java/account/create-verification.md +++ b/docs/examples/java/account/create-verification.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.createVerification( }) ); +``` diff --git a/docs/examples/java/account/create.md b/docs/examples/java/account/create.md index ad04805c..333b1f36 100644 --- a/docs/examples/java/account/create.md +++ b/docs/examples/java/account/create.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -23,3 +24,4 @@ account.create( }) ); +``` diff --git a/docs/examples/java/account/delete-identity.md b/docs/examples/java/account/delete-identity.md index d5567227..807f11a3 100644 --- a/docs/examples/java/account/delete-identity.md +++ b/docs/examples/java/account/delete-identity.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.deleteIdentity( }) ); +``` diff --git a/docs/examples/java/account/delete-mfa-authenticator.md b/docs/examples/java/account/delete-mfa-authenticator.md index b5ff26cb..d0409339 100644 --- a/docs/examples/java/account/delete-mfa-authenticator.md +++ b/docs/examples/java/account/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.deleteMFAAuthenticator( }) ); +``` diff --git a/docs/examples/java/account/delete-push-target.md b/docs/examples/java/account/delete-push-target.md index 00ab9027..75afef20 100644 --- a/docs/examples/java/account/delete-push-target.md +++ b/docs/examples/java/account/delete-push-target.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.deletePushTarget( }) ); +``` diff --git a/docs/examples/java/account/delete-session.md b/docs/examples/java/account/delete-session.md index 99d2f8e8..6536a7d7 100644 --- a/docs/examples/java/account/delete-session.md +++ b/docs/examples/java/account/delete-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.deleteSession( }) ); +``` diff --git a/docs/examples/java/account/delete-sessions.md b/docs/examples/java/account/delete-sessions.md index e93f3e33..391d701b 100644 --- a/docs/examples/java/account/delete-sessions.md +++ b/docs/examples/java/account/delete-sessions.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.deleteSessions(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/get-mfa-recovery-codes.md b/docs/examples/java/account/get-mfa-recovery-codes.md index 22bc1c16..5aa0df20 100644 --- a/docs/examples/java/account/get-mfa-recovery-codes.md +++ b/docs/examples/java/account/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/get-prefs.md b/docs/examples/java/account/get-prefs.md index 5bb11a4a..8c08a847 100644 --- a/docs/examples/java/account/get-prefs.md +++ b/docs/examples/java/account/get-prefs.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.getPrefs(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/get-session.md b/docs/examples/java/account/get-session.md index 288cd3b3..a499beae 100644 --- a/docs/examples/java/account/get-session.md +++ b/docs/examples/java/account/get-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.getSession( }) ); +``` diff --git a/docs/examples/java/account/get.md b/docs/examples/java/account/get.md index 6b5eb3b7..6d649b99 100644 --- a/docs/examples/java/account/get.md +++ b/docs/examples/java/account/get.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.get(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/list-identities.md b/docs/examples/java/account/list-identities.md index e5dd44d9..78848d43 100644 --- a/docs/examples/java/account/list-identities.md +++ b/docs/examples/java/account/list-identities.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.listIdentities( }) ); +``` diff --git a/docs/examples/java/account/list-logs.md b/docs/examples/java/account/list-logs.md index 8b6ec850..e4114920 100644 --- a/docs/examples/java/account/list-logs.md +++ b/docs/examples/java/account/list-logs.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.listLogs( }) ); +``` diff --git a/docs/examples/java/account/list-mfa-factors.md b/docs/examples/java/account/list-mfa-factors.md index 06f20e1a..869701dd 100644 --- a/docs/examples/java/account/list-mfa-factors.md +++ b/docs/examples/java/account/list-mfa-factors.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.listMFAFactors(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/list-sessions.md b/docs/examples/java/account/list-sessions.md index 8946d96e..44b453f5 100644 --- a/docs/examples/java/account/list-sessions.md +++ b/docs/examples/java/account/list-sessions.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.listSessions(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/update-email-verification.md b/docs/examples/java/account/update-email-verification.md index 9d157c8e..f3563cfc 100644 --- a/docs/examples/java/account/update-email-verification.md +++ b/docs/examples/java/account/update-email-verification.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updateEmailVerification( }) ); +``` diff --git a/docs/examples/java/account/update-email.md b/docs/examples/java/account/update-email.md index ac80e451..d9a42148 100644 --- a/docs/examples/java/account/update-email.md +++ b/docs/examples/java/account/update-email.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updateEmail( }) ); +``` diff --git a/docs/examples/java/account/update-magic-url-session.md b/docs/examples/java/account/update-magic-url-session.md index 5893aa6e..666d0b01 100644 --- a/docs/examples/java/account/update-magic-url-session.md +++ b/docs/examples/java/account/update-magic-url-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updateMagicURLSession( }) ); +``` diff --git a/docs/examples/java/account/update-mfa-authenticator.md b/docs/examples/java/account/update-mfa-authenticator.md index 00ddd46b..492a12bd 100644 --- a/docs/examples/java/account/update-mfa-authenticator.md +++ b/docs/examples/java/account/update-mfa-authenticator.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -22,3 +23,4 @@ account.updateMFAAuthenticator( }) ); +``` diff --git a/docs/examples/java/account/update-mfa-challenge.md b/docs/examples/java/account/update-mfa-challenge.md index 10b5db49..857009ad 100644 --- a/docs/examples/java/account/update-mfa-challenge.md +++ b/docs/examples/java/account/update-mfa-challenge.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updateMFAChallenge( }) ); +``` diff --git a/docs/examples/java/account/update-mfa-recovery-codes.md b/docs/examples/java/account/update-mfa-recovery-codes.md index c0d6c69f..bf2818d5 100644 --- a/docs/examples/java/account/update-mfa-recovery-codes.md +++ b/docs/examples/java/account/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/update-mfa.md b/docs/examples/java/account/update-mfa.md index b765cda9..c1937c0c 100644 --- a/docs/examples/java/account/update-mfa.md +++ b/docs/examples/java/account/update-mfa.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.updateMFA( }) ); +``` diff --git a/docs/examples/java/account/update-name.md b/docs/examples/java/account/update-name.md index 47582c2b..a64dd6ed 100644 --- a/docs/examples/java/account/update-name.md +++ b/docs/examples/java/account/update-name.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.updateName( }) ); +``` diff --git a/docs/examples/java/account/update-password.md b/docs/examples/java/account/update-password.md index 09f572eb..075a869b 100644 --- a/docs/examples/java/account/update-password.md +++ b/docs/examples/java/account/update-password.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updatePassword( }) ); +``` diff --git a/docs/examples/java/account/update-phone-session.md b/docs/examples/java/account/update-phone-session.md index 2e1b8800..d15a5c49 100644 --- a/docs/examples/java/account/update-phone-session.md +++ b/docs/examples/java/account/update-phone-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updatePhoneSession( }) ); +``` diff --git a/docs/examples/java/account/update-phone-verification.md b/docs/examples/java/account/update-phone-verification.md index f93ae690..8f1b4153 100644 --- a/docs/examples/java/account/update-phone-verification.md +++ b/docs/examples/java/account/update-phone-verification.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updatePhoneVerification( }) ); +``` diff --git a/docs/examples/java/account/update-phone.md b/docs/examples/java/account/update-phone.md index fae9bfaa..da17d4b8 100644 --- a/docs/examples/java/account/update-phone.md +++ b/docs/examples/java/account/update-phone.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updatePhone( }) ); +``` diff --git a/docs/examples/java/account/update-prefs.md b/docs/examples/java/account/update-prefs.md index 2682fe3a..1996e605 100644 --- a/docs/examples/java/account/update-prefs.md +++ b/docs/examples/java/account/update-prefs.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -24,3 +25,4 @@ account.updatePrefs( }) ); +``` diff --git a/docs/examples/java/account/update-push-target.md b/docs/examples/java/account/update-push-target.md index 197a9095..67acc1bc 100644 --- a/docs/examples/java/account/update-push-target.md +++ b/docs/examples/java/account/update-push-target.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updatePushTarget( }) ); +``` diff --git a/docs/examples/java/account/update-recovery.md b/docs/examples/java/account/update-recovery.md index 953bde4f..2ea21c97 100644 --- a/docs/examples/java/account/update-recovery.md +++ b/docs/examples/java/account/update-recovery.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -22,3 +23,4 @@ account.updateRecovery( }) ); +``` diff --git a/docs/examples/java/account/update-session.md b/docs/examples/java/account/update-session.md index ed828408..978d7a44 100644 --- a/docs/examples/java/account/update-session.md +++ b/docs/examples/java/account/update-session.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -20,3 +21,4 @@ account.updateSession( }) ); +``` diff --git a/docs/examples/java/account/update-status.md b/docs/examples/java/account/update-status.md index 9a283c09..308df116 100644 --- a/docs/examples/java/account/update-status.md +++ b/docs/examples/java/account/update-status.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -16,3 +17,4 @@ account.updateStatus(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/account/update-verification.md b/docs/examples/java/account/update-verification.md index caa3869e..e1819262 100644 --- a/docs/examples/java/account/update-verification.md +++ b/docs/examples/java/account/update-verification.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Account; @@ -21,3 +22,4 @@ account.updateVerification( }) ); +``` diff --git a/docs/examples/java/avatars/get-browser.md b/docs/examples/java/avatars/get-browser.md index 1b6632f3..f107aee6 100644 --- a/docs/examples/java/avatars/get-browser.md +++ b/docs/examples/java/avatars/get-browser.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -24,3 +25,4 @@ avatars.getBrowser( }) ); +``` diff --git a/docs/examples/java/avatars/get-credit-card.md b/docs/examples/java/avatars/get-credit-card.md index e2ac2c26..40fb5660 100644 --- a/docs/examples/java/avatars/get-credit-card.md +++ b/docs/examples/java/avatars/get-credit-card.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -24,3 +25,4 @@ avatars.getCreditCard( }) ); +``` diff --git a/docs/examples/java/avatars/get-favicon.md b/docs/examples/java/avatars/get-favicon.md index 70373a60..3427b59d 100644 --- a/docs/examples/java/avatars/get-favicon.md +++ b/docs/examples/java/avatars/get-favicon.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -20,3 +21,4 @@ avatars.getFavicon( }) ); +``` diff --git a/docs/examples/java/avatars/get-flag.md b/docs/examples/java/avatars/get-flag.md index 689e27fe..812282ff 100644 --- a/docs/examples/java/avatars/get-flag.md +++ b/docs/examples/java/avatars/get-flag.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -24,3 +25,4 @@ avatars.getFlag( }) ); +``` diff --git a/docs/examples/java/avatars/get-image.md b/docs/examples/java/avatars/get-image.md index 71a90dd1..1289ec1f 100644 --- a/docs/examples/java/avatars/get-image.md +++ b/docs/examples/java/avatars/get-image.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -22,3 +23,4 @@ avatars.getImage( }) ); +``` diff --git a/docs/examples/java/avatars/get-initials.md b/docs/examples/java/avatars/get-initials.md index ca16ee7e..419ca5e5 100644 --- a/docs/examples/java/avatars/get-initials.md +++ b/docs/examples/java/avatars/get-initials.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -23,3 +24,4 @@ avatars.getInitials( }) ); +``` diff --git a/docs/examples/java/avatars/get-qr.md b/docs/examples/java/avatars/get-qr.md index 781acf67..be4d11c3 100644 --- a/docs/examples/java/avatars/get-qr.md +++ b/docs/examples/java/avatars/get-qr.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -23,3 +24,4 @@ avatars.getQR( }) ); +``` diff --git a/docs/examples/java/avatars/get-screenshot.md b/docs/examples/java/avatars/get-screenshot.md index 24c4998e..2f261c5f 100644 --- a/docs/examples/java/avatars/get-screenshot.md +++ b/docs/examples/java/avatars/get-screenshot.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Avatars; @@ -46,3 +47,4 @@ avatars.getScreenshot( }) ); +``` diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index d95db8a9..44ff1d27 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -33,3 +34,4 @@ databases.createDocument( }) ); +``` diff --git a/docs/examples/java/databases/create-operations.md b/docs/examples/java/databases/create-operations.md index a8635d81..e7e0a7f5 100644 --- a/docs/examples/java/databases/create-operations.md +++ b/docs/examples/java/databases/create-operations.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -29,3 +30,4 @@ databases.createOperations( }) ); +``` diff --git a/docs/examples/java/databases/create-transaction.md b/docs/examples/java/databases/create-transaction.md index 871d1907..253e9650 100644 --- a/docs/examples/java/databases/create-transaction.md +++ b/docs/examples/java/databases/create-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -20,3 +21,4 @@ databases.createTransaction( }) ); +``` diff --git a/docs/examples/java/databases/decrement-document-attribute.md b/docs/examples/java/databases/decrement-document-attribute.md index 86694945..2c881a6a 100644 --- a/docs/examples/java/databases/decrement-document-attribute.md +++ b/docs/examples/java/databases/decrement-document-attribute.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -26,3 +27,4 @@ databases.decrementDocumentAttribute( }) ); +``` diff --git a/docs/examples/java/databases/delete-document.md b/docs/examples/java/databases/delete-document.md index 27956708..a1a0e11b 100644 --- a/docs/examples/java/databases/delete-document.md +++ b/docs/examples/java/databases/delete-document.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -23,3 +24,4 @@ databases.deleteDocument( }) ); +``` diff --git a/docs/examples/java/databases/delete-transaction.md b/docs/examples/java/databases/delete-transaction.md index ac1121e9..e6f8ee20 100644 --- a/docs/examples/java/databases/delete-transaction.md +++ b/docs/examples/java/databases/delete-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -20,3 +21,4 @@ databases.deleteTransaction( }) ); +``` diff --git a/docs/examples/java/databases/get-document.md b/docs/examples/java/databases/get-document.md index 85f9bb9b..cb3d6bb9 100644 --- a/docs/examples/java/databases/get-document.md +++ b/docs/examples/java/databases/get-document.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -24,3 +25,4 @@ databases.getDocument( }) ); +``` diff --git a/docs/examples/java/databases/get-transaction.md b/docs/examples/java/databases/get-transaction.md index 5dee8503..812dcc21 100644 --- a/docs/examples/java/databases/get-transaction.md +++ b/docs/examples/java/databases/get-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -20,3 +21,4 @@ databases.getTransaction( }) ); +``` diff --git a/docs/examples/java/databases/increment-document-attribute.md b/docs/examples/java/databases/increment-document-attribute.md index 5928b455..38ab4fa3 100644 --- a/docs/examples/java/databases/increment-document-attribute.md +++ b/docs/examples/java/databases/increment-document-attribute.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -26,3 +27,4 @@ databases.incrementDocumentAttribute( }) ); +``` diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md index 5440f786..26e7a52d 100644 --- a/docs/examples/java/databases/list-documents.md +++ b/docs/examples/java/databases/list-documents.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -24,3 +25,4 @@ databases.listDocuments( }) ); +``` diff --git a/docs/examples/java/databases/list-transactions.md b/docs/examples/java/databases/list-transactions.md index 899a3ea1..73bdb050 100644 --- a/docs/examples/java/databases/list-transactions.md +++ b/docs/examples/java/databases/list-transactions.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -20,3 +21,4 @@ databases.listTransactions( }) ); +``` diff --git a/docs/examples/java/databases/update-document.md b/docs/examples/java/databases/update-document.md index 74e4244c..fc9dae29 100644 --- a/docs/examples/java/databases/update-document.md +++ b/docs/examples/java/databases/update-document.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -33,3 +34,4 @@ databases.updateDocument( }) ); +``` diff --git a/docs/examples/java/databases/update-transaction.md b/docs/examples/java/databases/update-transaction.md index c5f586fc..6260ebc2 100644 --- a/docs/examples/java/databases/update-transaction.md +++ b/docs/examples/java/databases/update-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; @@ -22,3 +23,4 @@ databases.updateTransaction( }) ); +``` diff --git a/docs/examples/java/databases/upsert-document.md b/docs/examples/java/databases/upsert-document.md index 9e04ef54..f69223cf 100644 --- a/docs/examples/java/databases/upsert-document.md +++ b/docs/examples/java/databases/upsert-document.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -33,3 +34,4 @@ databases.upsertDocument( }) ); +``` diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md index 4aea0929..14e1a5c4 100644 --- a/docs/examples/java/functions/create-execution.md +++ b/docs/examples/java/functions/create-execution.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; @@ -27,3 +28,4 @@ functions.createExecution( }) ); +``` diff --git a/docs/examples/java/functions/get-execution.md b/docs/examples/java/functions/get-execution.md index f3195fa1..276f048c 100644 --- a/docs/examples/java/functions/get-execution.md +++ b/docs/examples/java/functions/get-execution.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; @@ -21,3 +22,4 @@ functions.getExecution( }) ); +``` diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md index 893d0989..d1244a51 100644 --- a/docs/examples/java/functions/list-executions.md +++ b/docs/examples/java/functions/list-executions.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; @@ -22,3 +23,4 @@ functions.listExecutions( }) ); +``` diff --git a/docs/examples/java/graphql/mutation.md b/docs/examples/java/graphql/mutation.md index 44519527..0e932f14 100644 --- a/docs/examples/java/graphql/mutation.md +++ b/docs/examples/java/graphql/mutation.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Graphql; @@ -20,3 +21,4 @@ graphql.mutation( }) ); +``` diff --git a/docs/examples/java/graphql/query.md b/docs/examples/java/graphql/query.md index b39f1281..17d19ee1 100644 --- a/docs/examples/java/graphql/query.md +++ b/docs/examples/java/graphql/query.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Graphql; @@ -20,3 +21,4 @@ graphql.query( }) ); +``` diff --git a/docs/examples/java/locale/get.md b/docs/examples/java/locale/get.md index 89e1e88b..2416447b 100644 --- a/docs/examples/java/locale/get.md +++ b/docs/examples/java/locale/get.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.get(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-codes.md b/docs/examples/java/locale/list-codes.md index 85a96fce..c27f9ef2 100644 --- a/docs/examples/java/locale/list-codes.md +++ b/docs/examples/java/locale/list-codes.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listCodes(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-continents.md b/docs/examples/java/locale/list-continents.md index 6f4572d5..64debed3 100644 --- a/docs/examples/java/locale/list-continents.md +++ b/docs/examples/java/locale/list-continents.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listContinents(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-countries-eu.md b/docs/examples/java/locale/list-countries-eu.md index 51458a92..768cc906 100644 --- a/docs/examples/java/locale/list-countries-eu.md +++ b/docs/examples/java/locale/list-countries-eu.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-countries-phones.md b/docs/examples/java/locale/list-countries-phones.md index 93438d21..90622f1a 100644 --- a/docs/examples/java/locale/list-countries-phones.md +++ b/docs/examples/java/locale/list-countries-phones.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-countries.md b/docs/examples/java/locale/list-countries.md index 5cd5525e..0ba92127 100644 --- a/docs/examples/java/locale/list-countries.md +++ b/docs/examples/java/locale/list-countries.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listCountries(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-currencies.md b/docs/examples/java/locale/list-currencies.md index d3ef02c8..10b53124 100644 --- a/docs/examples/java/locale/list-currencies.md +++ b/docs/examples/java/locale/list-currencies.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listCurrencies(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/locale/list-languages.md b/docs/examples/java/locale/list-languages.md index 0d724943..35687ab6 100644 --- a/docs/examples/java/locale/list-languages.md +++ b/docs/examples/java/locale/list-languages.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Locale; @@ -16,3 +17,4 @@ locale.listLanguages(new CoroutineCallback<>((result, error) -> { Log.d("Appwrite", result.toString()); })); +``` diff --git a/docs/examples/java/messaging/create-subscriber.md b/docs/examples/java/messaging/create-subscriber.md index 5616435a..be1bfc57 100644 --- a/docs/examples/java/messaging/create-subscriber.md +++ b/docs/examples/java/messaging/create-subscriber.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; @@ -22,3 +23,4 @@ messaging.createSubscriber( }) ); +``` diff --git a/docs/examples/java/messaging/delete-subscriber.md b/docs/examples/java/messaging/delete-subscriber.md index 9adae5e7..c8c089f4 100644 --- a/docs/examples/java/messaging/delete-subscriber.md +++ b/docs/examples/java/messaging/delete-subscriber.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; @@ -21,3 +22,4 @@ messaging.deleteSubscriber( }) ); +``` diff --git a/docs/examples/java/storage/create-file.md b/docs/examples/java/storage/create-file.md index 518bbc9d..3b73523b 100644 --- a/docs/examples/java/storage/create-file.md +++ b/docs/examples/java/storage/create-file.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.models.InputFile; @@ -26,3 +27,4 @@ storage.createFile( }) ); +``` diff --git a/docs/examples/java/storage/delete-file.md b/docs/examples/java/storage/delete-file.md index 5c63ae7c..fdd9e8ba 100644 --- a/docs/examples/java/storage/delete-file.md +++ b/docs/examples/java/storage/delete-file.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; @@ -21,3 +22,4 @@ storage.deleteFile( }) ); +``` diff --git a/docs/examples/java/storage/get-file-download.md b/docs/examples/java/storage/get-file-download.md index 73a8617f..91d91b7d 100644 --- a/docs/examples/java/storage/get-file-download.md +++ b/docs/examples/java/storage/get-file-download.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; @@ -22,3 +23,4 @@ storage.getFileDownload( }) ); +``` diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md index 392ef116..9355dc68 100644 --- a/docs/examples/java/storage/get-file-preview.md +++ b/docs/examples/java/storage/get-file-preview.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; @@ -35,3 +36,4 @@ storage.getFilePreview( }) ); +``` diff --git a/docs/examples/java/storage/get-file-view.md b/docs/examples/java/storage/get-file-view.md index b042b1f4..66762c2b 100644 --- a/docs/examples/java/storage/get-file-view.md +++ b/docs/examples/java/storage/get-file-view.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; @@ -22,3 +23,4 @@ storage.getFileView( }) ); +``` diff --git a/docs/examples/java/storage/get-file.md b/docs/examples/java/storage/get-file.md index c9cc00d8..17362657 100644 --- a/docs/examples/java/storage/get-file.md +++ b/docs/examples/java/storage/get-file.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; @@ -21,3 +22,4 @@ storage.getFile( }) ); +``` diff --git a/docs/examples/java/storage/list-files.md b/docs/examples/java/storage/list-files.md index 05292a64..3b4288ff 100644 --- a/docs/examples/java/storage/list-files.md +++ b/docs/examples/java/storage/list-files.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; @@ -23,3 +24,4 @@ storage.listFiles( }) ); +``` diff --git a/docs/examples/java/storage/update-file.md b/docs/examples/java/storage/update-file.md index 40cc61b1..a8ff797d 100644 --- a/docs/examples/java/storage/update-file.md +++ b/docs/examples/java/storage/update-file.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -25,3 +26,4 @@ storage.updateFile( }) ); +``` diff --git a/docs/examples/java/tablesdb/create-operations.md b/docs/examples/java/tablesdb/create-operations.md index 0e8cb4b0..8ab0f41f 100644 --- a/docs/examples/java/tablesdb/create-operations.md +++ b/docs/examples/java/tablesdb/create-operations.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -29,3 +30,4 @@ tablesDB.createOperations( }) ); +``` diff --git a/docs/examples/java/tablesdb/create-row.md b/docs/examples/java/tablesdb/create-row.md index b3e4f310..772a4e07 100644 --- a/docs/examples/java/tablesdb/create-row.md +++ b/docs/examples/java/tablesdb/create-row.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -33,3 +34,4 @@ tablesDB.createRow( }) ); +``` diff --git a/docs/examples/java/tablesdb/create-transaction.md b/docs/examples/java/tablesdb/create-transaction.md index c232c569..abf0aba1 100644 --- a/docs/examples/java/tablesdb/create-transaction.md +++ b/docs/examples/java/tablesdb/create-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -20,3 +21,4 @@ tablesDB.createTransaction( }) ); +``` diff --git a/docs/examples/java/tablesdb/decrement-row-column.md b/docs/examples/java/tablesdb/decrement-row-column.md index 2252564e..50225726 100644 --- a/docs/examples/java/tablesdb/decrement-row-column.md +++ b/docs/examples/java/tablesdb/decrement-row-column.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -26,3 +27,4 @@ tablesDB.decrementRowColumn( }) ); +``` diff --git a/docs/examples/java/tablesdb/delete-row.md b/docs/examples/java/tablesdb/delete-row.md index 66801004..146f97f9 100644 --- a/docs/examples/java/tablesdb/delete-row.md +++ b/docs/examples/java/tablesdb/delete-row.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -23,3 +24,4 @@ tablesDB.deleteRow( }) ); +``` diff --git a/docs/examples/java/tablesdb/delete-transaction.md b/docs/examples/java/tablesdb/delete-transaction.md index 18cb2357..aa649862 100644 --- a/docs/examples/java/tablesdb/delete-transaction.md +++ b/docs/examples/java/tablesdb/delete-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -20,3 +21,4 @@ tablesDB.deleteTransaction( }) ); +``` diff --git a/docs/examples/java/tablesdb/get-row.md b/docs/examples/java/tablesdb/get-row.md index 2bf84728..df07780e 100644 --- a/docs/examples/java/tablesdb/get-row.md +++ b/docs/examples/java/tablesdb/get-row.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -24,3 +25,4 @@ tablesDB.getRow( }) ); +``` diff --git a/docs/examples/java/tablesdb/get-transaction.md b/docs/examples/java/tablesdb/get-transaction.md index fb519162..086c9f17 100644 --- a/docs/examples/java/tablesdb/get-transaction.md +++ b/docs/examples/java/tablesdb/get-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -20,3 +21,4 @@ tablesDB.getTransaction( }) ); +``` diff --git a/docs/examples/java/tablesdb/increment-row-column.md b/docs/examples/java/tablesdb/increment-row-column.md index a1194a67..1cad7857 100644 --- a/docs/examples/java/tablesdb/increment-row-column.md +++ b/docs/examples/java/tablesdb/increment-row-column.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -26,3 +27,4 @@ tablesDB.incrementRowColumn( }) ); +``` diff --git a/docs/examples/java/tablesdb/list-rows.md b/docs/examples/java/tablesdb/list-rows.md index 0833929e..48caad98 100644 --- a/docs/examples/java/tablesdb/list-rows.md +++ b/docs/examples/java/tablesdb/list-rows.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -24,3 +25,4 @@ tablesDB.listRows( }) ); +``` diff --git a/docs/examples/java/tablesdb/list-transactions.md b/docs/examples/java/tablesdb/list-transactions.md index ce0147b0..81c41237 100644 --- a/docs/examples/java/tablesdb/list-transactions.md +++ b/docs/examples/java/tablesdb/list-transactions.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -20,3 +21,4 @@ tablesDB.listTransactions( }) ); +``` diff --git a/docs/examples/java/tablesdb/update-row.md b/docs/examples/java/tablesdb/update-row.md index c41cc09f..96cb1b9e 100644 --- a/docs/examples/java/tablesdb/update-row.md +++ b/docs/examples/java/tablesdb/update-row.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -33,3 +34,4 @@ tablesDB.updateRow( }) ); +``` diff --git a/docs/examples/java/tablesdb/update-transaction.md b/docs/examples/java/tablesdb/update-transaction.md index 804b5d50..ef6783e0 100644 --- a/docs/examples/java/tablesdb/update-transaction.md +++ b/docs/examples/java/tablesdb/update-transaction.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; @@ -22,3 +23,4 @@ tablesDB.updateTransaction( }) ); +``` diff --git a/docs/examples/java/tablesdb/upsert-row.md b/docs/examples/java/tablesdb/upsert-row.md index 0b40f6b9..e4d7228e 100644 --- a/docs/examples/java/tablesdb/upsert-row.md +++ b/docs/examples/java/tablesdb/upsert-row.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; @@ -33,3 +34,4 @@ tablesDB.upsertRow( }) ); +``` diff --git a/docs/examples/java/teams/create-membership.md b/docs/examples/java/teams/create-membership.md index 161e65eb..8ec9e0fa 100644 --- a/docs/examples/java/teams/create-membership.md +++ b/docs/examples/java/teams/create-membership.md @@ -1,7 +1,7 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; -import io.appwrite.enums.Roles; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,7 +11,7 @@ Teams teams = new Teams(client); teams.createMembership( "", // teamId - Roles.ADMIN, // roles + List.of(), // roles "email@example.com", // email (optional) "", // userId (optional) "+12065550100", // phone (optional) @@ -27,3 +27,4 @@ teams.createMembership( }) ); +``` diff --git a/docs/examples/java/teams/create.md b/docs/examples/java/teams/create.md index 232d3b38..b31554ce 100644 --- a/docs/examples/java/teams/create.md +++ b/docs/examples/java/teams/create.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -22,3 +23,4 @@ teams.create( }) ); +``` diff --git a/docs/examples/java/teams/delete-membership.md b/docs/examples/java/teams/delete-membership.md index c8bb088c..8680f127 100644 --- a/docs/examples/java/teams/delete-membership.md +++ b/docs/examples/java/teams/delete-membership.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -21,3 +22,4 @@ teams.deleteMembership( }) ); +``` diff --git a/docs/examples/java/teams/delete.md b/docs/examples/java/teams/delete.md index 74f6a4f9..2055157f 100644 --- a/docs/examples/java/teams/delete.md +++ b/docs/examples/java/teams/delete.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -20,3 +21,4 @@ teams.delete( }) ); +``` diff --git a/docs/examples/java/teams/get-membership.md b/docs/examples/java/teams/get-membership.md index e9dc5786..04f90637 100644 --- a/docs/examples/java/teams/get-membership.md +++ b/docs/examples/java/teams/get-membership.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -21,3 +22,4 @@ teams.getMembership( }) ); +``` diff --git a/docs/examples/java/teams/get-prefs.md b/docs/examples/java/teams/get-prefs.md index 8ba14355..ff7dc426 100644 --- a/docs/examples/java/teams/get-prefs.md +++ b/docs/examples/java/teams/get-prefs.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -20,3 +21,4 @@ teams.getPrefs( }) ); +``` diff --git a/docs/examples/java/teams/get.md b/docs/examples/java/teams/get.md index f00057a8..cfa9242e 100644 --- a/docs/examples/java/teams/get.md +++ b/docs/examples/java/teams/get.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -20,3 +21,4 @@ teams.get( }) ); +``` diff --git a/docs/examples/java/teams/list-memberships.md b/docs/examples/java/teams/list-memberships.md index c8d3b610..ed9b2744 100644 --- a/docs/examples/java/teams/list-memberships.md +++ b/docs/examples/java/teams/list-memberships.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -23,3 +24,4 @@ teams.listMemberships( }) ); +``` diff --git a/docs/examples/java/teams/list.md b/docs/examples/java/teams/list.md index 1db3e67a..07acaf8d 100644 --- a/docs/examples/java/teams/list.md +++ b/docs/examples/java/teams/list.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -22,3 +23,4 @@ teams.list( }) ); +``` diff --git a/docs/examples/java/teams/update-membership-status.md b/docs/examples/java/teams/update-membership-status.md index 4b31ed55..bcb46d81 100644 --- a/docs/examples/java/teams/update-membership-status.md +++ b/docs/examples/java/teams/update-membership-status.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -23,3 +24,4 @@ teams.updateMembershipStatus( }) ); +``` diff --git a/docs/examples/java/teams/update-membership.md b/docs/examples/java/teams/update-membership.md index 83675d7a..c2a0b980 100644 --- a/docs/examples/java/teams/update-membership.md +++ b/docs/examples/java/teams/update-membership.md @@ -1,7 +1,7 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; -import io.appwrite.enums.Roles; Client client = new Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +12,7 @@ Teams teams = new Teams(client); teams.updateMembership( "", // teamId "", // membershipId - Roles.ADMIN, // roles + List.of(), // roles new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); @@ -23,3 +23,4 @@ teams.updateMembership( }) ); +``` diff --git a/docs/examples/java/teams/update-name.md b/docs/examples/java/teams/update-name.md index 207bcc81..6a49b27c 100644 --- a/docs/examples/java/teams/update-name.md +++ b/docs/examples/java/teams/update-name.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -21,3 +22,4 @@ teams.updateName( }) ); +``` diff --git a/docs/examples/java/teams/update-prefs.md b/docs/examples/java/teams/update-prefs.md index 9ea1487b..bedb83b3 100644 --- a/docs/examples/java/teams/update-prefs.md +++ b/docs/examples/java/teams/update-prefs.md @@ -1,3 +1,4 @@ +```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Teams; @@ -21,3 +22,4 @@ teams.updatePrefs( }) ); +``` diff --git a/docs/examples/kotlin/account/create-anonymous-session.md b/docs/examples/kotlin/account/create-anonymous-session.md index d2966a18..0cc36e1f 100644 --- a/docs/examples/kotlin/account/create-anonymous-session.md +++ b/docs/examples/kotlin/account/create-anonymous-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.createAnonymousSession() +``` diff --git a/docs/examples/kotlin/account/create-email-password-session.md b/docs/examples/kotlin/account/create-email-password-session.md index a327cf28..b3f63d8a 100644 --- a/docs/examples/kotlin/account/create-email-password-session.md +++ b/docs/examples/kotlin/account/create-email-password-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.createEmailPasswordSession( email = "email@example.com", password = "password", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-email-token.md b/docs/examples/kotlin/account/create-email-token.md index 37c9e1b3..f78bb74e 100644 --- a/docs/examples/kotlin/account/create-email-token.md +++ b/docs/examples/kotlin/account/create-email-token.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -12,4 +13,4 @@ val result = account.createEmailToken( userId = "", email = "email@example.com", phrase = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-email-verification.md b/docs/examples/kotlin/account/create-email-verification.md index dc87901e..3912e3b6 100644 --- a/docs/examples/kotlin/account/create-email-verification.md +++ b/docs/examples/kotlin/account/create-email-verification.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.createEmailVerification( url = "https://example.com", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-jwt.md b/docs/examples/kotlin/account/create-jwt.md index 1c72fa8e..d90c10e5 100644 --- a/docs/examples/kotlin/account/create-jwt.md +++ b/docs/examples/kotlin/account/create-jwt.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.createJWT( duration = 0, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-magic-url-token.md b/docs/examples/kotlin/account/create-magic-url-token.md index 76f4c918..0965f214 100644 --- a/docs/examples/kotlin/account/create-magic-url-token.md +++ b/docs/examples/kotlin/account/create-magic-url-token.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -13,4 +14,4 @@ val result = account.createMagicURLToken( email = "email@example.com", url = "https://example.com", // (optional) phrase = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-mfa-authenticator.md b/docs/examples/kotlin/account/create-mfa-authenticator.md index 934de1cc..c8f8d9a4 100644 --- a/docs/examples/kotlin/account/create-mfa-authenticator.md +++ b/docs/examples/kotlin/account/create-mfa-authenticator.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.createMFAAuthenticator( type = AuthenticatorType.TOTP, -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-mfa-challenge.md b/docs/examples/kotlin/account/create-mfa-challenge.md index f79c4989..c40512dd 100644 --- a/docs/examples/kotlin/account/create-mfa-challenge.md +++ b/docs/examples/kotlin/account/create-mfa-challenge.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.createMFAChallenge( factor = AuthenticationFactor.EMAIL, -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/kotlin/account/create-mfa-recovery-codes.md index cc569664..d91a3eb3 100644 --- a/docs/examples/kotlin/account/create-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.createMFARecoveryCodes() +``` diff --git a/docs/examples/kotlin/account/create-o-auth-2-session.md b/docs/examples/kotlin/account/create-o-auth-2-session.md index 61ea634a..18cb2361 100644 --- a/docs/examples/kotlin/account/create-o-auth-2-session.md +++ b/docs/examples/kotlin/account/create-o-auth-2-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -14,4 +15,4 @@ account.createOAuth2Session( success = "https://example.com", // (optional) failure = "https://example.com", // (optional) scopes = listOf(), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-o-auth-2-token.md b/docs/examples/kotlin/account/create-o-auth-2-token.md index cdd2ef34..52c0eea0 100644 --- a/docs/examples/kotlin/account/create-o-auth-2-token.md +++ b/docs/examples/kotlin/account/create-o-auth-2-token.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -14,4 +15,4 @@ account.createOAuth2Token( success = "https://example.com", // (optional) failure = "https://example.com", // (optional) scopes = listOf(), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-phone-token.md b/docs/examples/kotlin/account/create-phone-token.md index 4eb1a9ac..8ee75ceb 100644 --- a/docs/examples/kotlin/account/create-phone-token.md +++ b/docs/examples/kotlin/account/create-phone-token.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.createPhoneToken( userId = "", phone = "+12065550100", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-phone-verification.md b/docs/examples/kotlin/account/create-phone-verification.md index f7594668..77705b8f 100644 --- a/docs/examples/kotlin/account/create-phone-verification.md +++ b/docs/examples/kotlin/account/create-phone-verification.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.createPhoneVerification() +``` diff --git a/docs/examples/kotlin/account/create-push-target.md b/docs/examples/kotlin/account/create-push-target.md index 59b252be..b4641017 100644 --- a/docs/examples/kotlin/account/create-push-target.md +++ b/docs/examples/kotlin/account/create-push-target.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -12,4 +13,4 @@ val result = account.createPushTarget( targetId = "", identifier = "", providerId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-recovery.md b/docs/examples/kotlin/account/create-recovery.md index 7e131381..e8448a61 100644 --- a/docs/examples/kotlin/account/create-recovery.md +++ b/docs/examples/kotlin/account/create-recovery.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.createRecovery( email = "email@example.com", url = "https://example.com", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-session.md b/docs/examples/kotlin/account/create-session.md index ab9e20e7..e5273ce9 100644 --- a/docs/examples/kotlin/account/create-session.md +++ b/docs/examples/kotlin/account/create-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.createSession( userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create-verification.md b/docs/examples/kotlin/account/create-verification.md index 669b00ba..4f39b39a 100644 --- a/docs/examples/kotlin/account/create-verification.md +++ b/docs/examples/kotlin/account/create-verification.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.createVerification( url = "https://example.com", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/create.md b/docs/examples/kotlin/account/create.md index 16f3a60d..fccaf308 100644 --- a/docs/examples/kotlin/account/create.md +++ b/docs/examples/kotlin/account/create.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -13,4 +14,4 @@ val result = account.create( email = "email@example.com", password = "", name = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/delete-identity.md b/docs/examples/kotlin/account/delete-identity.md index c8d74636..fc3aba69 100644 --- a/docs/examples/kotlin/account/delete-identity.md +++ b/docs/examples/kotlin/account/delete-identity.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.deleteIdentity( identityId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/delete-mfa-authenticator.md b/docs/examples/kotlin/account/delete-mfa-authenticator.md index b140a11f..0f453183 100644 --- a/docs/examples/kotlin/account/delete-mfa-authenticator.md +++ b/docs/examples/kotlin/account/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.deleteMFAAuthenticator( type = AuthenticatorType.TOTP, -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/delete-push-target.md b/docs/examples/kotlin/account/delete-push-target.md index 8e0b418c..49e33bb3 100644 --- a/docs/examples/kotlin/account/delete-push-target.md +++ b/docs/examples/kotlin/account/delete-push-target.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.deletePushTarget( targetId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/delete-session.md b/docs/examples/kotlin/account/delete-session.md index 6af414be..91013ce9 100644 --- a/docs/examples/kotlin/account/delete-session.md +++ b/docs/examples/kotlin/account/delete-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.deleteSession( sessionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/delete-sessions.md b/docs/examples/kotlin/account/delete-sessions.md index f7e6c71c..ff404dbc 100644 --- a/docs/examples/kotlin/account/delete-sessions.md +++ b/docs/examples/kotlin/account/delete-sessions.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.deleteSessions() +``` diff --git a/docs/examples/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/kotlin/account/get-mfa-recovery-codes.md index f9d36122..5d9e1e4a 100644 --- a/docs/examples/kotlin/account/get-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.getMFARecoveryCodes() +``` diff --git a/docs/examples/kotlin/account/get-prefs.md b/docs/examples/kotlin/account/get-prefs.md index 85dbb18b..8e963ca8 100644 --- a/docs/examples/kotlin/account/get-prefs.md +++ b/docs/examples/kotlin/account/get-prefs.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.getPrefs() +``` diff --git a/docs/examples/kotlin/account/get-session.md b/docs/examples/kotlin/account/get-session.md index 4de64a14..fbf7f104 100644 --- a/docs/examples/kotlin/account/get-session.md +++ b/docs/examples/kotlin/account/get-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.getSession( sessionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/get.md b/docs/examples/kotlin/account/get.md index 3e85e79a..e2dfe542 100644 --- a/docs/examples/kotlin/account/get.md +++ b/docs/examples/kotlin/account/get.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.get() +``` diff --git a/docs/examples/kotlin/account/list-identities.md b/docs/examples/kotlin/account/list-identities.md index 5ca94c6d..0ca7466d 100644 --- a/docs/examples/kotlin/account/list-identities.md +++ b/docs/examples/kotlin/account/list-identities.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.listIdentities( queries = listOf(), // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/list-logs.md b/docs/examples/kotlin/account/list-logs.md index 3d2cc4b2..ce425646 100644 --- a/docs/examples/kotlin/account/list-logs.md +++ b/docs/examples/kotlin/account/list-logs.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.listLogs( queries = listOf(), // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/list-mfa-factors.md b/docs/examples/kotlin/account/list-mfa-factors.md index 56d1c4db..b12f25c8 100644 --- a/docs/examples/kotlin/account/list-mfa-factors.md +++ b/docs/examples/kotlin/account/list-mfa-factors.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.listMFAFactors() +``` diff --git a/docs/examples/kotlin/account/list-sessions.md b/docs/examples/kotlin/account/list-sessions.md index 573dd865..8c261a2d 100644 --- a/docs/examples/kotlin/account/list-sessions.md +++ b/docs/examples/kotlin/account/list-sessions.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.listSessions() +``` diff --git a/docs/examples/kotlin/account/update-email-verification.md b/docs/examples/kotlin/account/update-email-verification.md index 9fb21d2d..a2555642 100644 --- a/docs/examples/kotlin/account/update-email-verification.md +++ b/docs/examples/kotlin/account/update-email-verification.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updateEmailVerification( userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-email.md b/docs/examples/kotlin/account/update-email.md index 0862f112..ff80d07a 100644 --- a/docs/examples/kotlin/account/update-email.md +++ b/docs/examples/kotlin/account/update-email.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updateEmail( email = "email@example.com", password = "password", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-magic-url-session.md b/docs/examples/kotlin/account/update-magic-url-session.md index 2c1a0b0a..c00fbd12 100644 --- a/docs/examples/kotlin/account/update-magic-url-session.md +++ b/docs/examples/kotlin/account/update-magic-url-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updateMagicURLSession( userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-mfa-authenticator.md b/docs/examples/kotlin/account/update-mfa-authenticator.md index 4f6ecd7d..26958a49 100644 --- a/docs/examples/kotlin/account/update-mfa-authenticator.md +++ b/docs/examples/kotlin/account/update-mfa-authenticator.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -12,4 +13,4 @@ val account = Account(client) val result = account.updateMFAAuthenticator( type = AuthenticatorType.TOTP, otp = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-mfa-challenge.md b/docs/examples/kotlin/account/update-mfa-challenge.md index d5cbc1fd..d48e0c22 100644 --- a/docs/examples/kotlin/account/update-mfa-challenge.md +++ b/docs/examples/kotlin/account/update-mfa-challenge.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updateMFAChallenge( challengeId = "", otp = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/kotlin/account/update-mfa-recovery-codes.md index 0277ca75..dfdbd95d 100644 --- a/docs/examples/kotlin/account/update-mfa-recovery-codes.md +++ b/docs/examples/kotlin/account/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.updateMFARecoveryCodes() +``` diff --git a/docs/examples/kotlin/account/update-mfa.md b/docs/examples/kotlin/account/update-mfa.md index f214e78f..246bfe18 100644 --- a/docs/examples/kotlin/account/update-mfa.md +++ b/docs/examples/kotlin/account/update-mfa.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.updateMFA( mfa = false, -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-name.md b/docs/examples/kotlin/account/update-name.md index 2cb5327e..1ada95aa 100644 --- a/docs/examples/kotlin/account/update-name.md +++ b/docs/examples/kotlin/account/update-name.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.updateName( name = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-password.md b/docs/examples/kotlin/account/update-password.md index 140ca8b2..473cd1bf 100644 --- a/docs/examples/kotlin/account/update-password.md +++ b/docs/examples/kotlin/account/update-password.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updatePassword( password = "", oldPassword = "password", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-phone-session.md b/docs/examples/kotlin/account/update-phone-session.md index b3911dd5..0788763a 100644 --- a/docs/examples/kotlin/account/update-phone-session.md +++ b/docs/examples/kotlin/account/update-phone-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updatePhoneSession( userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-phone-verification.md b/docs/examples/kotlin/account/update-phone-verification.md index ad0d5d73..36abe384 100644 --- a/docs/examples/kotlin/account/update-phone-verification.md +++ b/docs/examples/kotlin/account/update-phone-verification.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updatePhoneVerification( userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-phone.md b/docs/examples/kotlin/account/update-phone.md index 84ff5081..078851d3 100644 --- a/docs/examples/kotlin/account/update-phone.md +++ b/docs/examples/kotlin/account/update-phone.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updatePhone( phone = "+12065550100", password = "password", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-prefs.md b/docs/examples/kotlin/account/update-prefs.md index ded80e94..5c3b6911 100644 --- a/docs/examples/kotlin/account/update-prefs.md +++ b/docs/examples/kotlin/account/update-prefs.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -14,4 +15,4 @@ val result = account.updatePrefs( "timezone" to "UTC", "darkTheme" to true ), -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-push-target.md b/docs/examples/kotlin/account/update-push-target.md index 5c381686..3e4abbdb 100644 --- a/docs/examples/kotlin/account/update-push-target.md +++ b/docs/examples/kotlin/account/update-push-target.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updatePushTarget( targetId = "", identifier = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-recovery.md b/docs/examples/kotlin/account/update-recovery.md index d505d1af..5dcb265f 100644 --- a/docs/examples/kotlin/account/update-recovery.md +++ b/docs/examples/kotlin/account/update-recovery.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -12,4 +13,4 @@ val result = account.updateRecovery( userId = "", secret = "", password = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-session.md b/docs/examples/kotlin/account/update-session.md index 6fc9a9f9..343c673a 100644 --- a/docs/examples/kotlin/account/update-session.md +++ b/docs/examples/kotlin/account/update-session.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -10,4 +11,4 @@ val account = Account(client) val result = account.updateSession( sessionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/account/update-status.md b/docs/examples/kotlin/account/update-status.md index b86a25ad..d22c9ce4 100644 --- a/docs/examples/kotlin/account/update-status.md +++ b/docs/examples/kotlin/account/update-status.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -9,3 +10,4 @@ val client = Client(context) val account = Account(client) val result = account.updateStatus() +``` diff --git a/docs/examples/kotlin/account/update-verification.md b/docs/examples/kotlin/account/update-verification.md index 028eb7c4..34a118c6 100644 --- a/docs/examples/kotlin/account/update-verification.md +++ b/docs/examples/kotlin/account/update-verification.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Account @@ -11,4 +12,4 @@ val account = Account(client) val result = account.updateVerification( userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-browser.md b/docs/examples/kotlin/avatars/get-browser.md index d04adfbb..3ac128eb 100644 --- a/docs/examples/kotlin/avatars/get-browser.md +++ b/docs/examples/kotlin/avatars/get-browser.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -14,4 +15,4 @@ val result = avatars.getBrowser( width = 0, // (optional) height = 0, // (optional) quality = -1, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-credit-card.md b/docs/examples/kotlin/avatars/get-credit-card.md index 91c88da5..b61670bf 100644 --- a/docs/examples/kotlin/avatars/get-credit-card.md +++ b/docs/examples/kotlin/avatars/get-credit-card.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -14,4 +15,4 @@ val result = avatars.getCreditCard( width = 0, // (optional) height = 0, // (optional) quality = -1, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-favicon.md b/docs/examples/kotlin/avatars/get-favicon.md index 01df8cb5..71a798c7 100644 --- a/docs/examples/kotlin/avatars/get-favicon.md +++ b/docs/examples/kotlin/avatars/get-favicon.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -10,4 +11,4 @@ val avatars = Avatars(client) val result = avatars.getFavicon( url = "https://example.com", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-flag.md b/docs/examples/kotlin/avatars/get-flag.md index 1dbc1cdf..097143c4 100644 --- a/docs/examples/kotlin/avatars/get-flag.md +++ b/docs/examples/kotlin/avatars/get-flag.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -14,4 +15,4 @@ val result = avatars.getFlag( width = 0, // (optional) height = 0, // (optional) quality = -1, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-image.md b/docs/examples/kotlin/avatars/get-image.md index 64166c0a..f2d01c19 100644 --- a/docs/examples/kotlin/avatars/get-image.md +++ b/docs/examples/kotlin/avatars/get-image.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -12,4 +13,4 @@ val result = avatars.getImage( url = "https://example.com", width = 0, // (optional) height = 0, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-initials.md b/docs/examples/kotlin/avatars/get-initials.md index 883da027..d689eace 100644 --- a/docs/examples/kotlin/avatars/get-initials.md +++ b/docs/examples/kotlin/avatars/get-initials.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -13,4 +14,4 @@ val result = avatars.getInitials( width = 0, // (optional) height = 0, // (optional) background = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-qr.md b/docs/examples/kotlin/avatars/get-qr.md index fa8a38ca..4dca2bba 100644 --- a/docs/examples/kotlin/avatars/get-qr.md +++ b/docs/examples/kotlin/avatars/get-qr.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -13,4 +14,4 @@ val result = avatars.getQR( size = 1, // (optional) margin = 0, // (optional) download = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/avatars/get-screenshot.md b/docs/examples/kotlin/avatars/get-screenshot.md index 4ac6717a..1cc4ef25 100644 --- a/docs/examples/kotlin/avatars/get-screenshot.md +++ b/docs/examples/kotlin/avatars/get-screenshot.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Avatars @@ -36,4 +37,4 @@ val result = avatars.getScreenshot( height = 600, // (optional) quality = 85, // (optional) output = ImageFormat.JPG, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/create-document.md b/docs/examples/kotlin/databases/create-document.md index 3e27c44a..5f4aa352 100644 --- a/docs/examples/kotlin/databases/create-document.md +++ b/docs/examples/kotlin/databases/create-document.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -23,4 +24,4 @@ val result = databases.createDocument( ), permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/create-operations.md b/docs/examples/kotlin/databases/create-operations.md index f3a41944..a988c08c 100644 --- a/docs/examples/kotlin/databases/create-operations.md +++ b/docs/examples/kotlin/databases/create-operations.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -19,4 +20,4 @@ val result = databases.createOperations( "name" to "Walter O'Brien" ) )), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/create-transaction.md b/docs/examples/kotlin/databases/create-transaction.md index 3b953c3b..dd61947f 100644 --- a/docs/examples/kotlin/databases/create-transaction.md +++ b/docs/examples/kotlin/databases/create-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -10,4 +11,4 @@ val databases = Databases(client) val result = databases.createTransaction( ttl = 60, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/decrement-document-attribute.md b/docs/examples/kotlin/databases/decrement-document-attribute.md index 84a4a0ed..8b9cb078 100644 --- a/docs/examples/kotlin/databases/decrement-document-attribute.md +++ b/docs/examples/kotlin/databases/decrement-document-attribute.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -16,4 +17,4 @@ val result = databases.decrementDocumentAttribute( value = 0, // (optional) min = 0, // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/delete-document.md b/docs/examples/kotlin/databases/delete-document.md index 242655ec..99e40c19 100644 --- a/docs/examples/kotlin/databases/delete-document.md +++ b/docs/examples/kotlin/databases/delete-document.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -13,4 +14,4 @@ val result = databases.deleteDocument( collectionId = "", documentId = "", transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/delete-transaction.md b/docs/examples/kotlin/databases/delete-transaction.md index bbce98c6..302c3644 100644 --- a/docs/examples/kotlin/databases/delete-transaction.md +++ b/docs/examples/kotlin/databases/delete-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -10,4 +11,4 @@ val databases = Databases(client) val result = databases.deleteTransaction( transactionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/get-document.md b/docs/examples/kotlin/databases/get-document.md index f21b6f34..9bae4190 100644 --- a/docs/examples/kotlin/databases/get-document.md +++ b/docs/examples/kotlin/databases/get-document.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -14,4 +15,4 @@ val result = databases.getDocument( documentId = "", queries = listOf(), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/get-transaction.md b/docs/examples/kotlin/databases/get-transaction.md index 0a1fda69..25249ecd 100644 --- a/docs/examples/kotlin/databases/get-transaction.md +++ b/docs/examples/kotlin/databases/get-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -10,4 +11,4 @@ val databases = Databases(client) val result = databases.getTransaction( transactionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/increment-document-attribute.md b/docs/examples/kotlin/databases/increment-document-attribute.md index ca32cfcb..78c311e6 100644 --- a/docs/examples/kotlin/databases/increment-document-attribute.md +++ b/docs/examples/kotlin/databases/increment-document-attribute.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -16,4 +17,4 @@ val result = databases.incrementDocumentAttribute( value = 0, // (optional) max = 0, // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/list-documents.md b/docs/examples/kotlin/databases/list-documents.md index e653fc16..dc086332 100644 --- a/docs/examples/kotlin/databases/list-documents.md +++ b/docs/examples/kotlin/databases/list-documents.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -14,4 +15,4 @@ val result = databases.listDocuments( queries = listOf(), // (optional) transactionId = "", // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/list-transactions.md b/docs/examples/kotlin/databases/list-transactions.md index da5cd4ba..43e0aba5 100644 --- a/docs/examples/kotlin/databases/list-transactions.md +++ b/docs/examples/kotlin/databases/list-transactions.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -10,4 +11,4 @@ val databases = Databases(client) val result = databases.listTransactions( queries = listOf(), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/update-document.md b/docs/examples/kotlin/databases/update-document.md index 49f0dbcf..585ae4c0 100644 --- a/docs/examples/kotlin/databases/update-document.md +++ b/docs/examples/kotlin/databases/update-document.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -23,4 +24,4 @@ val result = databases.updateDocument( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/update-transaction.md b/docs/examples/kotlin/databases/update-transaction.md index c9d6a852..c2e38aea 100644 --- a/docs/examples/kotlin/databases/update-transaction.md +++ b/docs/examples/kotlin/databases/update-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -12,4 +13,4 @@ val result = databases.updateTransaction( transactionId = "", commit = false, // (optional) rollback = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/databases/upsert-document.md b/docs/examples/kotlin/databases/upsert-document.md index 42aff0ec..d591f22a 100644 --- a/docs/examples/kotlin/databases/upsert-document.md +++ b/docs/examples/kotlin/databases/upsert-document.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases @@ -23,4 +24,4 @@ val result = databases.upsertDocument( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 8f7b49b8..5037cab5 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions @@ -17,4 +18,4 @@ val result = functions.createExecution( method = ExecutionMethod.GET, // (optional) headers = mapOf( "a" to "b" ), // (optional) scheduledAt = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/functions/get-execution.md b/docs/examples/kotlin/functions/get-execution.md index 267be53c..e39fb7e8 100644 --- a/docs/examples/kotlin/functions/get-execution.md +++ b/docs/examples/kotlin/functions/get-execution.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions @@ -11,4 +12,4 @@ val functions = Functions(client) val result = functions.getExecution( functionId = "", executionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/functions/list-executions.md b/docs/examples/kotlin/functions/list-executions.md index c24a67b2..9d2b0591 100644 --- a/docs/examples/kotlin/functions/list-executions.md +++ b/docs/examples/kotlin/functions/list-executions.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions @@ -12,4 +13,4 @@ val result = functions.listExecutions( functionId = "", queries = listOf(), // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/graphql/mutation.md b/docs/examples/kotlin/graphql/mutation.md index a3a76220..c95aaca2 100644 --- a/docs/examples/kotlin/graphql/mutation.md +++ b/docs/examples/kotlin/graphql/mutation.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Graphql @@ -10,4 +11,4 @@ val graphql = Graphql(client) val result = graphql.mutation( query = mapOf( "a" to "b" ), -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/graphql/query.md b/docs/examples/kotlin/graphql/query.md index 13f149cb..24e2f587 100644 --- a/docs/examples/kotlin/graphql/query.md +++ b/docs/examples/kotlin/graphql/query.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Graphql @@ -10,4 +11,4 @@ val graphql = Graphql(client) val result = graphql.query( query = mapOf( "a" to "b" ), -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/locale/get.md b/docs/examples/kotlin/locale/get.md index a116aed3..15197161 100644 --- a/docs/examples/kotlin/locale/get.md +++ b/docs/examples/kotlin/locale/get.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.get() +``` diff --git a/docs/examples/kotlin/locale/list-codes.md b/docs/examples/kotlin/locale/list-codes.md index 0b63b06e..d7052144 100644 --- a/docs/examples/kotlin/locale/list-codes.md +++ b/docs/examples/kotlin/locale/list-codes.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listCodes() +``` diff --git a/docs/examples/kotlin/locale/list-continents.md b/docs/examples/kotlin/locale/list-continents.md index 98acdc9b..03e917e4 100644 --- a/docs/examples/kotlin/locale/list-continents.md +++ b/docs/examples/kotlin/locale/list-continents.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listContinents() +``` diff --git a/docs/examples/kotlin/locale/list-countries-eu.md b/docs/examples/kotlin/locale/list-countries-eu.md index c0160259..a933ed85 100644 --- a/docs/examples/kotlin/locale/list-countries-eu.md +++ b/docs/examples/kotlin/locale/list-countries-eu.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listCountriesEU() +``` diff --git a/docs/examples/kotlin/locale/list-countries-phones.md b/docs/examples/kotlin/locale/list-countries-phones.md index d95c1c6f..8d4c7534 100644 --- a/docs/examples/kotlin/locale/list-countries-phones.md +++ b/docs/examples/kotlin/locale/list-countries-phones.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listCountriesPhones() +``` diff --git a/docs/examples/kotlin/locale/list-countries.md b/docs/examples/kotlin/locale/list-countries.md index 47751611..e67b5fe7 100644 --- a/docs/examples/kotlin/locale/list-countries.md +++ b/docs/examples/kotlin/locale/list-countries.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listCountries() +``` diff --git a/docs/examples/kotlin/locale/list-currencies.md b/docs/examples/kotlin/locale/list-currencies.md index 6d0a04f8..fb0087d7 100644 --- a/docs/examples/kotlin/locale/list-currencies.md +++ b/docs/examples/kotlin/locale/list-currencies.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listCurrencies() +``` diff --git a/docs/examples/kotlin/locale/list-languages.md b/docs/examples/kotlin/locale/list-languages.md index de588aa0..30fb65bf 100644 --- a/docs/examples/kotlin/locale/list-languages.md +++ b/docs/examples/kotlin/locale/list-languages.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Locale @@ -9,3 +10,4 @@ val client = Client(context) val locale = Locale(client) val result = locale.listLanguages() +``` diff --git a/docs/examples/kotlin/messaging/create-subscriber.md b/docs/examples/kotlin/messaging/create-subscriber.md index b7e244f0..97dc3f62 100644 --- a/docs/examples/kotlin/messaging/create-subscriber.md +++ b/docs/examples/kotlin/messaging/create-subscriber.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging @@ -12,4 +13,4 @@ val result = messaging.createSubscriber( topicId = "", subscriberId = "", targetId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/messaging/delete-subscriber.md b/docs/examples/kotlin/messaging/delete-subscriber.md index 9e102d6f..ffa27b8a 100644 --- a/docs/examples/kotlin/messaging/delete-subscriber.md +++ b/docs/examples/kotlin/messaging/delete-subscriber.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging @@ -11,4 +12,4 @@ val messaging = Messaging(client) val result = messaging.deleteSubscriber( topicId = "", subscriberId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/create-file.md b/docs/examples/kotlin/storage/create-file.md index 8a454b7e..ece44db5 100644 --- a/docs/examples/kotlin/storage/create-file.md +++ b/docs/examples/kotlin/storage/create-file.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.models.InputFile @@ -16,4 +17,4 @@ val result = storage.createFile( fileId = "", file = InputFile.fromPath("file.png"), permissions = listOf(Permission.read(Role.any())), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/delete-file.md b/docs/examples/kotlin/storage/delete-file.md index ca40f41b..6f498896 100644 --- a/docs/examples/kotlin/storage/delete-file.md +++ b/docs/examples/kotlin/storage/delete-file.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -11,4 +12,4 @@ val storage = Storage(client) val result = storage.deleteFile( bucketId = "", fileId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/get-file-download.md b/docs/examples/kotlin/storage/get-file-download.md index 89c6e8a9..3895ab07 100644 --- a/docs/examples/kotlin/storage/get-file-download.md +++ b/docs/examples/kotlin/storage/get-file-download.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -12,4 +13,4 @@ val result = storage.getFileDownload( bucketId = "", fileId = "", token = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index a4841d53..6abf988b 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -25,4 +26,4 @@ val result = storage.getFilePreview( background = "", // (optional) output = ImageFormat.JPG, // (optional) token = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/get-file-view.md b/docs/examples/kotlin/storage/get-file-view.md index 513e1f9a..d7adaf15 100644 --- a/docs/examples/kotlin/storage/get-file-view.md +++ b/docs/examples/kotlin/storage/get-file-view.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -12,4 +13,4 @@ val result = storage.getFileView( bucketId = "", fileId = "", token = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/get-file.md b/docs/examples/kotlin/storage/get-file.md index 1e994305..b5ab55a8 100644 --- a/docs/examples/kotlin/storage/get-file.md +++ b/docs/examples/kotlin/storage/get-file.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -11,4 +12,4 @@ val storage = Storage(client) val result = storage.getFile( bucketId = "", fileId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/list-files.md b/docs/examples/kotlin/storage/list-files.md index f62ba749..ee04acb0 100644 --- a/docs/examples/kotlin/storage/list-files.md +++ b/docs/examples/kotlin/storage/list-files.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -13,4 +14,4 @@ val result = storage.listFiles( queries = listOf(), // (optional) search = "", // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/storage/update-file.md b/docs/examples/kotlin/storage/update-file.md index 32c19a82..23147c03 100644 --- a/docs/examples/kotlin/storage/update-file.md +++ b/docs/examples/kotlin/storage/update-file.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage @@ -15,4 +16,4 @@ val result = storage.updateFile( fileId = "", name = "", // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/create-operations.md b/docs/examples/kotlin/tablesdb/create-operations.md index 7807102f..da84d33a 100644 --- a/docs/examples/kotlin/tablesdb/create-operations.md +++ b/docs/examples/kotlin/tablesdb/create-operations.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -19,4 +20,4 @@ val result = tablesDB.createOperations( "name" to "Walter O'Brien" ) )), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/create-row.md b/docs/examples/kotlin/tablesdb/create-row.md index 5c54cdcd..c1ecee4a 100644 --- a/docs/examples/kotlin/tablesdb/create-row.md +++ b/docs/examples/kotlin/tablesdb/create-row.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -23,4 +24,4 @@ val result = tablesDB.createRow( ), permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/create-transaction.md b/docs/examples/kotlin/tablesdb/create-transaction.md index b011fa05..4b5148eb 100644 --- a/docs/examples/kotlin/tablesdb/create-transaction.md +++ b/docs/examples/kotlin/tablesdb/create-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -10,4 +11,4 @@ val tablesDB = TablesDB(client) val result = tablesDB.createTransaction( ttl = 60, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/decrement-row-column.md b/docs/examples/kotlin/tablesdb/decrement-row-column.md index 1a896407..e9c95ebd 100644 --- a/docs/examples/kotlin/tablesdb/decrement-row-column.md +++ b/docs/examples/kotlin/tablesdb/decrement-row-column.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -16,4 +17,4 @@ val result = tablesDB.decrementRowColumn( value = 0, // (optional) min = 0, // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/delete-row.md b/docs/examples/kotlin/tablesdb/delete-row.md index 6912afa1..60796eb5 100644 --- a/docs/examples/kotlin/tablesdb/delete-row.md +++ b/docs/examples/kotlin/tablesdb/delete-row.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -13,4 +14,4 @@ val result = tablesDB.deleteRow( tableId = "", rowId = "", transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/delete-transaction.md b/docs/examples/kotlin/tablesdb/delete-transaction.md index 92c0074a..8186037e 100644 --- a/docs/examples/kotlin/tablesdb/delete-transaction.md +++ b/docs/examples/kotlin/tablesdb/delete-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -10,4 +11,4 @@ val tablesDB = TablesDB(client) val result = tablesDB.deleteTransaction( transactionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/get-row.md b/docs/examples/kotlin/tablesdb/get-row.md index adea4297..52d50523 100644 --- a/docs/examples/kotlin/tablesdb/get-row.md +++ b/docs/examples/kotlin/tablesdb/get-row.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -14,4 +15,4 @@ val result = tablesDB.getRow( rowId = "", queries = listOf(), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/get-transaction.md b/docs/examples/kotlin/tablesdb/get-transaction.md index 38b7c33e..94a4deb5 100644 --- a/docs/examples/kotlin/tablesdb/get-transaction.md +++ b/docs/examples/kotlin/tablesdb/get-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -10,4 +11,4 @@ val tablesDB = TablesDB(client) val result = tablesDB.getTransaction( transactionId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/increment-row-column.md b/docs/examples/kotlin/tablesdb/increment-row-column.md index 1b679e18..7820d260 100644 --- a/docs/examples/kotlin/tablesdb/increment-row-column.md +++ b/docs/examples/kotlin/tablesdb/increment-row-column.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -16,4 +17,4 @@ val result = tablesDB.incrementRowColumn( value = 0, // (optional) max = 0, // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/list-rows.md b/docs/examples/kotlin/tablesdb/list-rows.md index b075e128..b6a54684 100644 --- a/docs/examples/kotlin/tablesdb/list-rows.md +++ b/docs/examples/kotlin/tablesdb/list-rows.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -14,4 +15,4 @@ val result = tablesDB.listRows( queries = listOf(), // (optional) transactionId = "", // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/list-transactions.md b/docs/examples/kotlin/tablesdb/list-transactions.md index b7764c71..44c824e7 100644 --- a/docs/examples/kotlin/tablesdb/list-transactions.md +++ b/docs/examples/kotlin/tablesdb/list-transactions.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -10,4 +11,4 @@ val tablesDB = TablesDB(client) val result = tablesDB.listTransactions( queries = listOf(), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/update-row.md b/docs/examples/kotlin/tablesdb/update-row.md index 20319e3b..01a8d8c1 100644 --- a/docs/examples/kotlin/tablesdb/update-row.md +++ b/docs/examples/kotlin/tablesdb/update-row.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -23,4 +24,4 @@ val result = tablesDB.updateRow( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/update-transaction.md b/docs/examples/kotlin/tablesdb/update-transaction.md index 791649ff..98c0b816 100644 --- a/docs/examples/kotlin/tablesdb/update-transaction.md +++ b/docs/examples/kotlin/tablesdb/update-transaction.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -12,4 +13,4 @@ val result = tablesDB.updateTransaction( transactionId = "", commit = false, // (optional) rollback = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/tablesdb/upsert-row.md b/docs/examples/kotlin/tablesdb/upsert-row.md index 3af7902c..aa3862d4 100644 --- a/docs/examples/kotlin/tablesdb/upsert-row.md +++ b/docs/examples/kotlin/tablesdb/upsert-row.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB @@ -23,4 +24,4 @@ val result = tablesDB.upsertRow( ), // (optional) permissions = listOf(Permission.read(Role.any())), // (optional) transactionId = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/create-membership.md b/docs/examples/kotlin/teams/create-membership.md index f8500289..5adfe4ea 100644 --- a/docs/examples/kotlin/teams/create-membership.md +++ b/docs/examples/kotlin/teams/create-membership.md @@ -1,7 +1,7 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams -import io.appwrite.enums.Roles val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,10 +11,10 @@ val teams = Teams(client) val result = teams.createMembership( teamId = "", - roles = roles.ADMIN, + roles = listOf(), email = "email@example.com", // (optional) userId = "", // (optional) phone = "+12065550100", // (optional) url = "https://example.com", // (optional) name = "", // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/create.md b/docs/examples/kotlin/teams/create.md index dfa4df44..3249279c 100644 --- a/docs/examples/kotlin/teams/create.md +++ b/docs/examples/kotlin/teams/create.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -12,4 +13,4 @@ val result = teams.create( teamId = "", name = "", roles = listOf(), // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/delete-membership.md b/docs/examples/kotlin/teams/delete-membership.md index adf11197..731e954f 100644 --- a/docs/examples/kotlin/teams/delete-membership.md +++ b/docs/examples/kotlin/teams/delete-membership.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -11,4 +12,4 @@ val teams = Teams(client) val result = teams.deleteMembership( teamId = "", membershipId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/delete.md b/docs/examples/kotlin/teams/delete.md index e144a78e..614ebf11 100644 --- a/docs/examples/kotlin/teams/delete.md +++ b/docs/examples/kotlin/teams/delete.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -10,4 +11,4 @@ val teams = Teams(client) val result = teams.delete( teamId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/get-membership.md b/docs/examples/kotlin/teams/get-membership.md index 8fb8c54c..bee60e9e 100644 --- a/docs/examples/kotlin/teams/get-membership.md +++ b/docs/examples/kotlin/teams/get-membership.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -11,4 +12,4 @@ val teams = Teams(client) val result = teams.getMembership( teamId = "", membershipId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/get-prefs.md b/docs/examples/kotlin/teams/get-prefs.md index 5e892fb4..4f01527b 100644 --- a/docs/examples/kotlin/teams/get-prefs.md +++ b/docs/examples/kotlin/teams/get-prefs.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -10,4 +11,4 @@ val teams = Teams(client) val result = teams.getPrefs( teamId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/get.md b/docs/examples/kotlin/teams/get.md index dbb487d3..7248a02a 100644 --- a/docs/examples/kotlin/teams/get.md +++ b/docs/examples/kotlin/teams/get.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -10,4 +11,4 @@ val teams = Teams(client) val result = teams.get( teamId = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/list-memberships.md b/docs/examples/kotlin/teams/list-memberships.md index fd88be47..928f0dd7 100644 --- a/docs/examples/kotlin/teams/list-memberships.md +++ b/docs/examples/kotlin/teams/list-memberships.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -13,4 +14,4 @@ val result = teams.listMemberships( queries = listOf(), // (optional) search = "", // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/list.md b/docs/examples/kotlin/teams/list.md index 4b092cf3..66c98cdc 100644 --- a/docs/examples/kotlin/teams/list.md +++ b/docs/examples/kotlin/teams/list.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -12,4 +13,4 @@ val result = teams.list( queries = listOf(), // (optional) search = "", // (optional) total = false, // (optional) -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/update-membership-status.md b/docs/examples/kotlin/teams/update-membership-status.md index c3770c7f..53a3b264 100644 --- a/docs/examples/kotlin/teams/update-membership-status.md +++ b/docs/examples/kotlin/teams/update-membership-status.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -13,4 +14,4 @@ val result = teams.updateMembershipStatus( membershipId = "", userId = "", secret = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/update-membership.md b/docs/examples/kotlin/teams/update-membership.md index 8375c77b..1c8b236a 100644 --- a/docs/examples/kotlin/teams/update-membership.md +++ b/docs/examples/kotlin/teams/update-membership.md @@ -1,7 +1,7 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams -import io.appwrite.enums.Roles val client = Client(context) .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,5 +12,5 @@ val teams = Teams(client) val result = teams.updateMembership( teamId = "", membershipId = "", - roles = roles.ADMIN, -) \ No newline at end of file + roles = listOf(), +)``` diff --git a/docs/examples/kotlin/teams/update-name.md b/docs/examples/kotlin/teams/update-name.md index abeb6dc7..760a3b49 100644 --- a/docs/examples/kotlin/teams/update-name.md +++ b/docs/examples/kotlin/teams/update-name.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -11,4 +12,4 @@ val teams = Teams(client) val result = teams.updateName( teamId = "", name = "", -) \ No newline at end of file +)``` diff --git a/docs/examples/kotlin/teams/update-prefs.md b/docs/examples/kotlin/teams/update-prefs.md index d0066a94..854cb2b6 100644 --- a/docs/examples/kotlin/teams/update-prefs.md +++ b/docs/examples/kotlin/teams/update-prefs.md @@ -1,3 +1,4 @@ +```kotlin import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Teams @@ -11,4 +12,4 @@ val teams = Teams(client) val result = teams.updatePrefs( teamId = "", prefs = mapOf( "a" to "b" ), -) \ No newline at end of file +)``` diff --git a/library/src/main/java/io/appwrite/Client.kt b/library/src/main/java/io/appwrite/Client.kt index 5b946697..de33af5a 100644 --- a/library/src/main/java/io/appwrite/Client.kt +++ b/library/src/main/java/io/appwrite/Client.kt @@ -87,7 +87,7 @@ class Client @JvmOverloads constructor( "x-sdk-name" to "Android", "x-sdk-platform" to "client", "x-sdk-language" to "android", - "x-sdk-version" to "12.0.0", + "x-sdk-version" to "12.1.0", "x-appwrite-response-format" to "1.8.0" ) config = mutableMapOf() diff --git a/library/src/main/java/io/appwrite/enums/Roles.kt b/library/src/main/java/io/appwrite/enums/Roles.kt deleted file mode 100644 index 94c6b7aa..00000000 --- a/library/src/main/java/io/appwrite/enums/Roles.kt +++ /dev/null @@ -1,14 +0,0 @@ -package io.appwrite.enums - -import com.google.gson.annotations.SerializedName - -enum class Roles(val value: String) { - @SerializedName("admin") - ADMIN("admin"), - @SerializedName("developer") - DEVELOPER("developer"), - @SerializedName("owner") - OWNER("owner"); - - override fun toString() = value -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/RealtimeModels.kt b/library/src/main/java/io/appwrite/models/RealtimeModels.kt index cc1af635..93131f0c 100644 --- a/library/src/main/java/io/appwrite/models/RealtimeModels.kt +++ b/library/src/main/java/io/appwrite/models/RealtimeModels.kt @@ -10,7 +10,8 @@ data class RealtimeSubscription( } data class RealtimeCallback( - val channels: Collection, + val channels: Set, + val queries: Set, val payloadClass: Class<*>, val callback: (RealtimeResponseEvent<*>) -> Unit ) diff --git a/library/src/main/java/io/appwrite/services/Realtime.kt b/library/src/main/java/io/appwrite/services/Realtime.kt index ee77357c..aee154f9 100644 --- a/library/src/main/java/io/appwrite/services/Realtime.kt +++ b/library/src/main/java/io/appwrite/services/Realtime.kt @@ -3,6 +3,7 @@ package io.appwrite.services import io.appwrite.Service import io.appwrite.Client import io.appwrite.Channel +import io.appwrite.Query import io.appwrite.exceptions.AppwriteException import io.appwrite.extensions.forEachAsync import io.appwrite.extensions.fromJson @@ -17,6 +18,8 @@ import okhttp3.WebSocketListener import okhttp3.internal.concurrent.TaskRunner import okhttp3.internal.ws.RealWebSocket import java.util.* +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.atomic.AtomicInteger import android.util.Log import kotlin.coroutines.CoroutineContext @@ -28,6 +31,7 @@ class Realtime(client: Client) : Service(client), CoroutineScope { get() = Dispatchers.Main + job private companion object { + private const val TYPE_CONNECTED = "connected" private const val TYPE_ERROR = "error" private const val TYPE_EVENT = "event" private const val TYPE_PONG = "pong" @@ -36,33 +40,73 @@ class Realtime(client: Client) : Service(client), CoroutineScope { private const val DEBOUNCE_MILLIS = 1L private var socket: RealWebSocket? = null - private var activeChannels = mutableSetOf() - private var activeSubscriptions = mutableMapOf() + // Slot-centric state: Map + private val activeSubscriptions = ConcurrentHashMap() + // Map slot index -> subscriptionId (from backend) + private val slotToSubscriptionId = ConcurrentHashMap() + // Inverse map: subscriptionId -> slot index (for O(1) lookup) + private val subscriptionIdToSlot = ConcurrentHashMap() private var subCallDepth = 0 private var reconnectAttempts = 0 - private var subscriptionsCounter = 0 + private val subscriptionsCounter = AtomicInteger(0) private var reconnect = true private var heartbeatJob: Job? = null + + // Lock to coordinate multi-map updates (activeSubscriptions, slotToSubscriptionId, subscriptionIdToSlot) + private val subscriptionLock = Any() } private fun createSocket() { - if (activeChannels.isEmpty()) { + // Rebuild activeChannels from all slots + val allChannels = mutableSetOf() + activeSubscriptions.values.forEach { subscription -> + allChannels.addAll(subscription.channels) + } + + if (allChannels.isEmpty()) { reconnect = false closeSocket() return } - val queryParamBuilder = StringBuilder() - .append("project=${client.config["project"]}") + val encodedProject = java.net.URLEncoder.encode(client.config["project"].toString(), "UTF-8") + var queryParams = "project=$encodedProject" + + allChannels.forEach { channel -> + val encodedChannel = java.net.URLEncoder.encode(channel, "UTF-8") + queryParams += "&channels[]=$encodedChannel" + } - activeChannels.forEach { - queryParamBuilder - .append("&channels[]=$it") + // Build query string from slots → channels → queries + // Format: channel[slot][]=query (each query sent as separate parameter) + // For each slot, repeat its queries under each channel it subscribes to + // Example: slot 1 → channels [tests, prod], queries [q1, q2] + // Produces: tests[1][]=q1&tests[1][]=q2&prod[1][]=q1&prod[1][]=q2 + val selectAllQuery = Query.select(listOf("*")).toString() + activeSubscriptions.forEach { (slot, subscription) -> + // Get queries array - each query is a separate string + val queries = if (subscription.queries.isEmpty()) { + listOf(selectAllQuery) + } else { + subscription.queries.toList() + } + + // Repeat this slot's queries under each channel it subscribes to + // Each query is sent as a separate parameter: channel[slot][]=q1&channel[slot][]=q2 + subscription.channels.forEach { channel -> + val encodedChannel = java.net.URLEncoder.encode(channel, "UTF-8") + queries.forEach { query -> + val encodedQuery = java.net.URLEncoder.encode(query, "UTF-8") + queryParams += "&$encodedChannel[$slot][]=$encodedQuery" + } + } } + val url = "${client.endpointRealtime}/realtime?$queryParams" + val request = Request.Builder() - .url("${client.endpointRealtime}/realtime?$queryParamBuilder") + .url(url) .build() if (socket != null) { @@ -127,8 +171,8 @@ class Realtime(client: Client) : Service(client), CoroutineScope { callback: (RealtimeResponseEvent) -> Unit, ) = subscribe( channels = channels.map { channelToString(it) }.toTypedArray(), - Any::class.java, - callback + payloadType = Any::class.java, + callback = callback ) fun subscribe( @@ -136,18 +180,20 @@ class Realtime(client: Client) : Service(client), CoroutineScope { callback: (RealtimeResponseEvent) -> Unit, ) = subscribe( channels = channels, - Any::class.java, - callback + payloadType = Any::class.java, + callback = callback ) fun subscribe( vararg channels: Channel<*>, payloadType: Class, + queries: Set = emptySet(), callback: (RealtimeResponseEvent) -> Unit, ): RealtimeSubscription { return subscribe( channels = channels.map { channelToString(it) }.toTypedArray(), payloadType = payloadType, + queries = queries, callback = callback ) } @@ -155,16 +201,23 @@ class Realtime(client: Client) : Service(client), CoroutineScope { fun subscribe( vararg channels: String, payloadType: Class, + queries: Set = emptySet(), callback: (RealtimeResponseEvent) -> Unit, ): RealtimeSubscription { - val counter = subscriptionsCounter++ - - activeChannels.addAll(channels) - activeSubscriptions[counter] = RealtimeCallback( - channels.toList(), - payloadType, - callback as (RealtimeResponseEvent<*>) -> Unit - ) + // Allocate a new slot index atomically + val slot = subscriptionsCounter.incrementAndGet() + + // Store slot-centric data: channels, queries, and callback belong to the slot. + // We only touch activeSubscriptions here, but keep the pattern consistent + // and future-proof by guarding multi-map writes with a shared lock. + synchronized(subscriptionLock) { + activeSubscriptions[slot] = RealtimeCallback( + channels.toSet(), + queries, + payloadType, + callback as (RealtimeResponseEvent<*>) -> Unit + ) + } launch { subCallDepth++ @@ -176,23 +229,21 @@ class Realtime(client: Client) : Service(client), CoroutineScope { } return RealtimeSubscription { - activeSubscriptions.remove(counter) - cleanUp(*channels) - createSocket() - } - } - - private fun cleanUp(vararg channels: String) { - activeChannels.removeAll { channel -> - if (!channels.contains(channel)) { - return@removeAll false - } - activeSubscriptions.values.none { callback -> - callback.channels.contains(channel) + // Unsubscribe must update all three maps atomically so that + // no reader observes a half-updated state. + synchronized(subscriptionLock) { + val subscriptionId = slotToSubscriptionId[slot] + activeSubscriptions.remove(slot) + slotToSubscriptionId.remove(slot) + subscriptionId?.let { subscriptionIdToSlot.remove(it) } } + launch { createSocket() } } } + // cleanUp is no longer needed - slots are removed directly in subscribe().close() + // Channels are automatically rebuilt from remaining slots in createSocket() + private inner class AppwriteWebSocketListener : WebSocketListener() { override fun onOpen(webSocket: WebSocket, response: Response) { @@ -208,28 +259,70 @@ class Realtime(client: Client) : Service(client), CoroutineScope { val message = text.fromJson() when (message.type) { TYPE_ERROR -> handleResponseError(message) + TYPE_CONNECTED -> handleResponseConnected(message) TYPE_EVENT -> handleResponseEvent(message) TYPE_PONG -> {} } } } + + private fun handleResponseConnected(message: RealtimeResponse) { + val messageData = message.data?.jsonCast>() ?: return + val subscriptions = messageData["subscriptions"] as? Map<*, *> ?: return + + // Store subscription ID mappings from backend + // Format: { "0": "sub_a1f9", "1": "sub_b83c", ... } + synchronized(subscriptionLock) { + val newSlotToSub = mutableMapOf() + val newSubToSlot = mutableMapOf() + + subscriptions.forEach { (slotStr, subscriptionId) -> + val slot = (slotStr as? String)?.toIntOrNull() + if (slot != null && subscriptionId is String) { + newSlotToSub[slot] = subscriptionId + newSubToSlot[subscriptionId] = slot + } + } + + slotToSubscriptionId.clear() + slotToSubscriptionId.putAll(newSlotToSub) + subscriptionIdToSlot.clear() + subscriptionIdToSlot.putAll(newSubToSlot) + } + } private fun handleResponseError(message: RealtimeResponse) { throw message.data?.jsonCast() ?: RuntimeException("Data is not present") } private suspend fun handleResponseEvent(message: RealtimeResponse) { - val event = message.data?.jsonCast>() ?: return + val messageData = message.data?.jsonCast>() ?: return + val event = messageData.jsonCast>() + if (event.channels.isEmpty()) { return } - if (!event.channels.any { activeChannels.contains(it) }) { + + val rawPayload = event.payload + @Suppress("UNCHECKED_CAST") + val subscriptions = (messageData["subscriptions"] as? List<*>)?.mapNotNull { it as? String } + + if (subscriptions.isNullOrEmpty()) { return } - activeSubscriptions.values.forEachAsync { subscription -> - if (event.channels.any { subscription.channels.contains(it) }) { - event.payload = event.payload.jsonCast(subscription.payloadClass) - subscription.callback(event) + + // Use backend-provided subscription IDs for O(1) dispatch + subscriptions.forEach { subscriptionId -> + // O(1) lookup using subscriptionId + val slot = subscriptionIdToSlot[subscriptionId] + if (slot != null) { + val subscription = activeSubscriptions[slot] + if (subscription != null) { + val typedEvent = event.copy( + payload = rawPayload.jsonCast(subscription.payloadClass) + ) + subscription.callback(typedEvent) + } } } } diff --git a/library/src/main/java/io/appwrite/services/Teams.kt b/library/src/main/java/io/appwrite/services/Teams.kt index d3b6156f..5d48f280 100644 --- a/library/src/main/java/io/appwrite/services/Teams.kt +++ b/library/src/main/java/io/appwrite/services/Teams.kt @@ -320,7 +320,7 @@ class Teams(client: Client) : Service(client) { @JvmOverloads suspend fun createMembership( teamId: String, - roles: List, + roles: List, email: String? = null, userId: String? = null, phone: String? = null, @@ -402,7 +402,7 @@ class Teams(client: Client) : Service(client) { suspend fun updateMembership( teamId: String, membershipId: String, - roles: List, + roles: List, ): io.appwrite.models.Membership { val apiPath = "/teams/{teamId}/memberships/{membershipId}" .replace("{teamId}", teamId)