├── gradle.properties ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src └── main │ └── kotlin │ └── io │ └── appwrite │ ├── services │ └── Service.kt │ ├── models │ ├── UploadProgress.kt │ └── Jwt.kt │ ├── extensions │ └── TypeExtensions.kt │ ├── enums │ ├── AuthenticatorType.kt │ ├── Theme.kt │ ├── Adapter.kt │ ├── HealthCheckStatus.kt │ ├── MessagePriority.kt │ ├── DatabaseType.kt │ ├── DeploymentDownloadType.kt │ ├── Compression.kt │ ├── SmtpEncryption.kt │ ├── MessagingProviderType.kt │ ├── VCSReferenceType.kt │ ├── ExecutionTrigger.kt │ ├── TemplateReferenceType.kt │ ├── RelationMutate.kt │ ├── HealthAntivirusStatus.kt │ ├── IndexType.kt │ ├── AuthenticationFactor.kt │ ├── RelationshipType.kt │ ├── MessageStatus.kt │ ├── IndexStatus.kt │ ├── ColumnStatus.kt │ ├── DeploymentStatus.kt │ ├── AttributeStatus.kt │ ├── ExecutionStatus.kt │ ├── Output.kt │ ├── ImageFormat.kt │ └── ExecutionMethod.kt │ ├── exceptions │ └── AppwriteException.kt │ └── coroutines │ └── Callback.kt ├── .gitignore ├── .github └── workflows │ └── autoclose.yml ├── docs └── examples │ ├── kotlin │ ├── account │ │ ├── create-jwt.md │ │ ├── create-anonymous-session.md │ │ ├── get.md │ │ ├── get-prefs.md │ │ ├── create-session.md │ │ ├── list-sessions.md │ │ ├── update-status.md │ │ ├── delete-sessions.md │ │ ├── list-mfa-factors.md │ │ ├── create-phone-token.md │ │ ├── update-phone-session.md │ │ ├── get-mfa-recovery-codes.md │ │ ├── create-mfa-recovery-codes.md │ │ ├── create-phone-verification.md │ │ ├── update-magic-url-session.md │ │ ├── update-mfa-recovery-codes.md │ │ ├── update-mfa.md │ │ ├── update-name.md │ │ ├── get-session.md │ │ ├── create-email-password-session.md │ │ ├── delete-identity.md │ │ ├── delete-session.md │ │ ├── update-session.md │ │ ├── create-mfa-challenge.md │ │ ├── create-email-token.md │ │ ├── create-verification.md │ │ ├── create.md │ │ ├── create-email-verification.md │ │ ├── update-phone.md │ │ ├── update-email.md │ │ ├── list-logs.md │ │ ├── update-verification.md │ │ ├── update-mfa-challenge.md │ │ ├── update-password.md │ │ ├── create-recovery.md │ │ ├── list-identities.md │ │ ├── update-email-verification.md │ │ ├── update-phone-verification.md │ │ ├── update-recovery.md │ │ ├── create-magic-url-token.md │ │ ├── create-mfa-authenticator.md │ │ ├── delete-mfa-authenticator.md │ │ ├── update-mfa-authenticator.md │ │ ├── update-prefs.md │ │ └── create-o-auth-2-token.md │ ├── health │ │ ├── get.md │ │ ├── get-db.md │ │ ├── get-time.md │ │ ├── get-cache.md │ │ ├── get-pub-sub.md │ │ ├── get-storage.md │ │ ├── get-antivirus.md │ │ ├── get-storage-local.md │ │ ├── get-certificate.md │ │ ├── get-queue-builds.md │ │ ├── get-queue-logs.md │ │ ├── get-queue-mails.md │ │ ├── get-queue-usage.md │ │ ├── get-queue-deletes.md │ │ ├── get-queue-webhooks.md │ │ ├── get-queue-functions.md │ │ ├── get-queue-messaging.md │ │ ├── get-queue-migrations.md │ │ ├── get-queue-certificates.md │ │ ├── get-queue-stats-resources.md │ │ ├── get-queue-databases.md │ │ └── get-failed-jobs.md │ ├── locale │ │ ├── get.md │ │ ├── list-codes.md │ │ ├── list-countries.md │ │ ├── list-languages.md │ │ ├── list-continents.md │ │ ├── list-countries-eu.md │ │ ├── list-currencies.md │ │ └── list-countries-phones.md │ ├── sites │ │ ├── list-frameworks.md │ │ ├── list-specifications.md │ │ ├── get.md │ │ ├── delete.md │ │ ├── list-variables.md │ │ ├── get-log.md │ │ ├── delete-log.md │ │ ├── get-variable.md │ │ ├── delete-variable.md │ │ ├── get-deployment.md │ │ ├── delete-deployment.md │ │ ├── update-site-deployment.md │ │ ├── update-deployment-status.md │ │ ├── create-duplicate-deployment.md │ │ ├── list-logs.md │ │ ├── list.md │ │ ├── create-variable.md │ │ ├── list-deployments.md │ │ ├── update-variable.md │ │ ├── get-deployment-download.md │ │ └── create-vcs-deployment.md │ ├── functions │ │ ├── list-runtimes.md │ │ ├── list-specifications.md │ │ ├── get.md │ │ ├── delete.md │ │ ├── list-variables.md │ │ ├── get-variable.md │ │ ├── delete-execution.md │ │ ├── delete-variable.md │ │ ├── get-deployment.md │ │ ├── delete-deployment.md │ │ ├── get-execution.md │ │ ├── list.md │ │ ├── update-deployment-status.md │ │ ├── update-function-deployment.md │ │ ├── list-executions.md │ │ ├── create-variable.md │ │ ├── create-duplicate-deployment.md │ │ ├── list-deployments.md │ │ ├── update-variable.md │ │ └── get-deployment-download.md │ ├── users │ │ ├── get.md │ │ ├── delete.md │ │ ├── get-prefs.md │ │ ├── create-session.md │ │ ├── delete-sessions.md │ │ ├── list-mfa-factors.md │ │ ├── delete-identity.md │ │ ├── get-mfa-recovery-codes.md │ │ ├── update-mfa.md │ │ ├── create-mfa-recovery-codes.md │ │ ├── update-mfa-recovery-codes.md │ │ ├── update-name.md │ │ ├── update-status.md │ │ ├── get-target.md │ │ ├── update-labels.md │ │ ├── update-password.md │ │ ├── delete-target.md │ │ ├── update-phone.md │ │ ├── delete-session.md │ │ ├── list-sessions.md │ │ ├── update-email.md │ │ ├── update-prefs.md │ │ ├── update-email-verification.md │ │ ├── update-phone-verification.md │ │ ├── create-token.md │ │ ├── list-logs.md │ │ ├── list-targets.md │ │ ├── list.md │ │ ├── create-jwt.md │ │ ├── list-identities.md │ │ ├── delete-mfa-authenticator.md │ │ ├── create-md-5-user.md │ │ ├── create-argon-2-user.md │ │ ├── create-bcrypt-user.md │ │ ├── create-ph-pass-user.md │ │ ├── list-memberships.md │ │ ├── create.md │ │ └── update-target.md │ ├── teams │ │ ├── get.md │ │ ├── delete.md │ │ ├── get-prefs.md │ │ ├── update-name.md │ │ ├── update-prefs.md │ │ ├── get-membership.md │ │ ├── create.md │ │ ├── delete-membership.md │ │ ├── list.md │ │ ├── update-membership.md │ │ ├── list-memberships.md │ │ └── update-membership-status.md │ ├── tokens │ │ ├── get.md │ │ ├── delete.md │ │ ├── update.md │ │ ├── create-file-token.md │ │ └── list.md │ ├── graphql │ │ ├── query.md │ │ └── mutation.md │ ├── tablesdb │ │ ├── get.md │ │ ├── delete.md │ │ ├── create-transaction.md │ │ ├── get-transaction.md │ │ ├── list-transactions.md │ │ ├── delete-transaction.md │ │ ├── get-table.md │ │ ├── delete-table.md │ │ ├── get-column.md │ │ ├── get-index.md │ │ ├── create.md │ │ ├── delete-column.md │ │ ├── delete-index.md │ │ ├── update.md │ │ ├── list.md │ │ ├── update-transaction.md │ │ ├── create-rows.md │ │ ├── list-columns.md │ │ ├── list-indexes.md │ │ ├── upsert-rows.md │ │ ├── list-tables.md │ │ ├── delete-row.md │ │ ├── delete-rows.md │ │ ├── create-point-column.md │ │ ├── update-ip-column.md │ │ ├── create-ip-column.md │ │ ├── get-row.md │ │ ├── update-boolean-column.md │ │ ├── update-datetime-column.md │ │ ├── update-url-column.md │ │ ├── create-datetime-column.md │ │ └── list-rows.md │ ├── databases │ │ ├── get.md │ │ ├── delete.md │ │ ├── create-transaction.md │ │ ├── get-transaction.md │ │ ├── list-transactions.md │ │ ├── delete-transaction.md │ │ ├── get-collection.md │ │ ├── create.md │ │ ├── delete-collection.md │ │ ├── update.md │ │ ├── get-index.md │ │ ├── delete-index.md │ │ ├── get-attribute.md │ │ ├── list.md │ │ ├── delete-attribute.md │ │ ├── update-transaction.md │ │ ├── list-indexes.md │ │ ├── list-attributes.md │ │ ├── list-collections.md │ │ ├── create-documents.md │ │ ├── upsert-documents.md │ │ ├── delete-documents.md │ │ ├── create-point-attribute.md │ │ ├── delete-document.md │ │ └── update-ip-attribute.md │ ├── storage │ │ ├── get-bucket.md │ │ ├── delete-bucket.md │ │ ├── get-file.md │ │ ├── delete-file.md │ │ ├── get-file-view.md │ │ ├── get-file-download.md │ │ ├── list-buckets.md │ │ └── list-files.md │ ├── messaging │ │ ├── delete.md │ │ ├── get-topic.md │ │ ├── delete-topic.md │ │ ├── get-message.md │ │ ├── get-provider.md │ │ ├── delete-provider.md │ │ ├── get-subscriber.md │ │ ├── delete-subscriber.md │ │ ├── create-topic.md │ │ ├── list-targets.md │ │ ├── list-topic-logs.md │ │ ├── list-topics.md │ │ ├── list-message-logs.md │ │ ├── list-messages.md │ │ ├── list-providers.md │ │ ├── update-topic.md │ │ ├── create-subscriber.md │ │ ├── list-provider-logs.md │ │ ├── list-subscriber-logs.md │ │ ├── list-subscribers.md │ │ ├── create-fcm-provider.md │ │ └── update-fcm-provider.md │ └── avatars │ │ ├── get-favicon.md │ │ ├── get-image.md │ │ ├── get-qr.md │ │ ├── get-initials.md │ │ ├── get-flag.md │ │ ├── get-browser.md │ │ └── get-credit-card.md │ └── java │ ├── account │ ├── create-jwt.md │ ├── create-anonymous-session.md │ ├── get.md │ ├── get-prefs.md │ ├── delete-sessions.md │ ├── list-sessions.md │ ├── update-status.md │ └── list-mfa-factors.md │ ├── health │ ├── get.md │ ├── get-db.md │ ├── get-cache.md │ ├── get-time.md │ ├── get-pub-sub.md │ ├── get-storage.md │ ├── get-antivirus.md │ └── get-storage-local.md │ ├── locale │ ├── get.md │ ├── list-codes.md │ ├── list-continents.md │ ├── list-countries.md │ ├── list-currencies.md │ ├── list-languages.md │ ├── list-countries-eu.md │ └── list-countries-phones.md │ ├── sites │ ├── list-frameworks.md │ └── list-specifications.md │ └── functions │ └── list-runtimes.md └── scripts └── configure.gradle /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'sdk-for-kotlin' 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appwrite/sdk-for-kotlin/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/services/Service.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.services 2 | 3 | import io.appwrite.Client 4 | 5 | abstract class Service(val client: Client) 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/* 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | .local.properties 11 | .env 12 | */build -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/models/UploadProgress.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.models 2 | 3 | data class UploadProgress( 4 | val id: String, 5 | val progress: Double, 6 | val sizeUploaded: Long, 7 | val chunksTotal: Int, 8 | val chunksUploaded: Int 9 | ) -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/extensions/TypeExtensions.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.extensions 2 | 3 | import kotlin.reflect.KClass 4 | import kotlin.reflect.typeOf 5 | 6 | inline fun classOf(): Class { 7 | return (typeOf().classifier!! as KClass).java 8 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/AuthenticatorType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class AuthenticatorType(val value: String) { 6 | @SerializedName("totp") 7 | TOTP("totp"); 8 | 9 | override fun toString() = value 10 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/Theme.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class Theme(val value: String) { 6 | @SerializedName("light") 7 | LIGHT("light"), 8 | @SerializedName("dark") 9 | DARK("dark"); 10 | 11 | override fun toString() = value 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/exceptions/AppwriteException.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.exceptions 2 | 3 | import java.lang.Exception 4 | 5 | class AppwriteException( 6 | override val message: String? = null, 7 | val code: Int? = null, 8 | val type: String? = null, 9 | val response: String? = null 10 | ) : Exception(message) -------------------------------------------------------------------------------- /.github/workflows/autoclose.yml: -------------------------------------------------------------------------------- 1 | name: Auto-close External Pull Requests 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, reopened] 6 | 7 | jobs: 8 | auto_close: 9 | uses: appwrite/.github/.github/workflows/autoclose.yml@main 10 | secrets: 11 | GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }} 12 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/Adapter.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class Adapter(val value: String) { 6 | @SerializedName("static") 7 | STATIC("static"), 8 | @SerializedName("ssr") 9 | SSR("ssr"); 10 | 11 | override fun toString() = value 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/HealthCheckStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class HealthCheckStatus(val value: String) { 6 | @SerializedName("pass") 7 | PASS("pass"), 8 | @SerializedName("fail") 9 | FAIL("fail"); 10 | 11 | override fun toString() = value 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/MessagePriority.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class MessagePriority(val value: String) { 6 | @SerializedName("normal") 7 | NORMAL("normal"), 8 | @SerializedName("high") 9 | HIGH("high"); 10 | 11 | override fun toString() = value 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/DatabaseType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class DatabaseType(val value: String) { 6 | @SerializedName("legacy") 7 | LEGACY("legacy"), 8 | @SerializedName("tablesdb") 9 | TABLESDB("tablesdb"); 10 | 11 | override fun toString() = value 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/DeploymentDownloadType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class DeploymentDownloadType(val value: String) { 6 | @SerializedName("source") 7 | SOURCE("source"), 8 | @SerializedName("output") 9 | OUTPUT("output"); 10 | 11 | override fun toString() = value 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/Compression.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class Compression(val value: String) { 6 | @SerializedName("none") 7 | NONE("none"), 8 | @SerializedName("gzip") 9 | GZIP("gzip"), 10 | @SerializedName("zstd") 11 | ZSTD("zstd"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/SmtpEncryption.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class SmtpEncryption(val value: String) { 6 | @SerializedName("none") 7 | NONE("none"), 8 | @SerializedName("ssl") 9 | SSL("ssl"), 10 | @SerializedName("tls") 11 | TLS("tls"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-jwt.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createJWT() 12 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/MessagingProviderType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class MessagingProviderType(val value: String) { 6 | @SerializedName("email") 7 | EMAIL("email"), 8 | @SerializedName("sms") 9 | SMS("sms"), 10 | @SerializedName("push") 11 | PUSH("push"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/VCSReferenceType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class VCSReferenceType(val value: String) { 6 | @SerializedName("branch") 7 | BRANCH("branch"), 8 | @SerializedName("commit") 9 | COMMIT("commit"), 10 | @SerializedName("tag") 11 | TAG("tag"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/ExecutionTrigger.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class ExecutionTrigger(val value: String) { 6 | @SerializedName("http") 7 | HTTP("http"), 8 | @SerializedName("schedule") 9 | SCHEDULE("schedule"), 10 | @SerializedName("event") 11 | EVENT("event"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/TemplateReferenceType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class TemplateReferenceType(val value: String) { 6 | @SerializedName("branch") 7 | BRANCH("branch"), 8 | @SerializedName("commit") 9 | COMMIT("commit"), 10 | @SerializedName("tag") 11 | TAG("tag"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/RelationMutate.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class RelationMutate(val value: String) { 6 | @SerializedName("cascade") 7 | CASCADE("cascade"), 8 | @SerializedName("restrict") 9 | RESTRICT("restrict"), 10 | @SerializedName("setNull") 11 | SETNULL("setNull"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-anonymous-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createAnonymousSession() 12 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/HealthAntivirusStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class HealthAntivirusStatus(val value: String) { 6 | @SerializedName("disabled") 7 | DISABLED("disabled"), 8 | @SerializedName("offline") 9 | OFFLINE("offline"), 10 | @SerializedName("online") 11 | ONLINE("online"); 12 | 13 | override fun toString() = value 14 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.get() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-db.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getDB() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-time.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getTime() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.get() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.get() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-cache.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getCache() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-pub-sub.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getPubSub() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-storage.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getStorage() 13 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/IndexType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class IndexType(val value: String) { 6 | @SerializedName("key") 7 | KEY("key"), 8 | @SerializedName("fulltext") 9 | FULLTEXT("fulltext"), 10 | @SerializedName("unique") 11 | UNIQUE("unique"), 12 | @SerializedName("spatial") 13 | SPATIAL("spatial"); 14 | 15 | override fun toString() = value 16 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-antivirus.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getAntivirus() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/list-frameworks.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.listFrameworks() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/get-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.getPrefs() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listCodes() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-storage-local.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getStorageLocal() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-countries.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listCountries() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-languages.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listLanguages() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/list-specifications.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.listSpecifications() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createSession( 12 | userId = "", 13 | secret = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/list-sessions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.listSessions() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-status.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateStatus() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/list-runtimes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.listRuntimes() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-continents.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listContinents() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-countries-eu.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listCountriesEU() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-currencies.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listCurrencies() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.get( 13 | siteId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.get( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/delete-sessions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.deleteSessions() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/list-mfa-factors.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.listMFAFactors() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.delete( 13 | siteId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.get( 13 | teamId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tokens/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Tokens 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tokens = Tokens(client) 11 | 12 | val response = tokens.get( 13 | tokenId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.delete( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-phone-token.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createPhoneToken( 12 | userId = "", 13 | phone = "+12065550100" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-phone-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.updatePhoneSession( 12 | userId = "", 13 | secret = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/locale/list-countries-phones.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Locale 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val locale = Locale(client) 11 | 12 | val response = locale.listCountriesPhones() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.delete( 13 | teamId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tokens/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Tokens 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tokens = Tokens(client) 11 | 12 | val response = tokens.delete( 13 | tokenId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/get-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.getPrefs( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/AuthenticationFactor.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class AuthenticationFactor(val value: String) { 6 | @SerializedName("email") 7 | EMAIL("email"), 8 | @SerializedName("phone") 9 | PHONE("phone"), 10 | @SerializedName("totp") 11 | TOTP("totp"), 12 | @SerializedName("recoverycode") 13 | RECOVERYCODE("recoverycode"); 14 | 15 | override fun toString() = value 16 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/get-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.getMFARecoveryCodes() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/list-specifications.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.listSpecifications() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/get-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.getPrefs( 13 | teamId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.createMFARecoveryCodes() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-phone-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.createPhoneVerification() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-magic-url-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.updateMagicURLSession( 12 | userId = "", 13 | secret = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateMFARecoveryCodes() 13 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-mfa.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateMFA( 13 | mfa = false 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/graphql/query.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Graphql 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val graphql = Graphql(client) 11 | 12 | val response = graphql.query( 13 | query = mapOf( "a" to "b" ) 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/list-variables.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.listVariables( 13 | siteId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.get( 13 | databaseId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createSession( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/delete-sessions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.deleteSessions( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list-mfa-factors.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.listMFAFactors( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-name.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateName( 13 | name = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.get( 13 | databaseId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.get( 13 | functionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/graphql/mutation.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Graphql 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val graphql = Graphql(client) 11 | 12 | val response = graphql.mutation( 13 | query = mapOf( "a" to "b" ) 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/get-bucket.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val storage = Storage(client) 11 | 12 | val response = storage.getBucket( 13 | bucketId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.delete( 13 | databaseId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.delete( 13 | databaseId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.delete( 13 | functionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-certificate.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getCertificate( 13 | domain = "" // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-builds.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueBuilds( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueLogs( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-mails.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueMails( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-usage.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueUsage( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/delete.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.delete( 13 | messageId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/get-topic.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.getTopic( 13 | topicId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/delete-bucket.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val storage = Storage(client) 11 | 12 | val response = storage.deleteBucket( 13 | bucketId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/delete-identity.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.deleteIdentity( 13 | identityId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/RelationshipType.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class RelationshipType(val value: String) { 6 | @SerializedName("oneToOne") 7 | ONETOONE("oneToOne"), 8 | @SerializedName("manyToOne") 9 | MANYTOONE("manyToOne"), 10 | @SerializedName("manyToMany") 11 | MANYTOMANY("manyToMany"), 12 | @SerializedName("oneToMany") 13 | ONETOMANY("oneToMany"); 14 | 15 | override fun toString() = value 16 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/get-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.getSession( 13 | sessionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-favicon.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val avatars = Avatars(client) 11 | 12 | val result = avatars.getFavicon( 13 | url = "https://example.com" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-deletes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueDeletes( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-webhooks.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueWebhooks( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/delete-topic.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.deleteTopic( 13 | topicId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/get-log.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.getLog( 13 | siteId = "", 14 | logId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/get-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.getMFARecoveryCodes( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-mfa.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateMFA( 13 | userId = "", 14 | mfa = false 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-email-password-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createEmailPasswordSession( 12 | email = "email@example.com", 13 | password = "password" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-functions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueFunctions( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-messaging.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueMessaging( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-migrations.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueMigrations( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/get-message.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.getMessage( 13 | messageId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/delete-log.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.deleteLog( 13 | siteId = "", 14 | logId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/create-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.createTransaction( 13 | ttl = 60 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createMFARecoveryCodes( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-mfa-recovery-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateMFARecoveryCodes( 13 | userId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-name.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateName( 13 | userId = "", 14 | name = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-status.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateStatus( 13 | userId = "", 14 | status = false 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/delete-identity.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.deleteIdentity( 13 | identityId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/delete-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.deleteSession( 13 | sessionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateSession( 13 | sessionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/create-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.createTransaction( 13 | ttl = 60 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/list-variables.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.listVariables( 13 | functionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-certificates.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueCertificates( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/get-provider.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.getProvider( 13 | providerId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/update-name.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.updateName( 13 | teamId = "", 14 | name = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tokens/update.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Tokens 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tokens = Tokens(client) 11 | 12 | val response = tokens.update( 13 | tokenId = "", 14 | expire = "" // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/get-target.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.getTarget( 13 | userId = "", 14 | targetId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-labels.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateLabels( 13 | userId = "", 14 | labels = listOf() 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-password.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updatePassword( 13 | userId = "", 14 | password = "" 15 | ) 16 | -------------------------------------------------------------------------------- /scripts/configure.gradle: -------------------------------------------------------------------------------- 1 | task createBuildConfig() { 2 | doLast { 3 | def file = new File("${buildDir.path}/generated/BuildConfig.java") 4 | file.getParentFile().mkdirs() 5 | file.createNewFile() 6 | file.text = """ 7 | public class BuildConfig { 8 | public static String SDK_VERSION = "${System.getenv("SDK_VERSION") ?: "0.0.0"}"; 9 | } 10 | """.stripIndent().trim() 11 | } 12 | } 13 | 14 | sourceSets.main.java.srcDirs += ["${buildDir.path}/generated"] -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-mfa-challenge.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | import io.appwrite.enums.AuthenticationFactor 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | 10 | val account = Account(client) 11 | 12 | val response = account.createMFAChallenge( 13 | factor = AuthenticationFactor.EMAIL 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-stats-resources.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueStatsResources( 13 | threshold = 0 // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/delete-provider.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.deleteProvider( 13 | providerId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/get-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.getTransaction( 13 | transactionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/list-transactions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.listTransactions( 13 | queries = listOf() // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/delete-target.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.deleteTarget( 13 | userId = "", 14 | targetId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-phone.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updatePhone( 13 | userId = "", 14 | number = "+12065550100" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-email-token.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createEmailToken( 12 | userId = "", 13 | email = "email@example.com", 14 | phrase = false // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.createVerification( 13 | url = "https://example.com" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.create( 12 | userId = "", 13 | email = "email@example.com", 14 | password = "", 15 | name = "" // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/get-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.getTransaction( 13 | transactionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/list-transactions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.listTransactions( 13 | queries = listOf() // optional 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/get-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.getVariable( 13 | siteId = "", 14 | variableId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.deleteTransaction( 13 | transactionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/delete-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.deleteSession( 13 | userId = "", 14 | sessionId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list-sessions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.listSessions( 13 | userId = "", 14 | total = false // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-email.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateEmail( 13 | userId = "", 14 | email = "email@example.com" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updatePrefs( 13 | userId = "", 14 | prefs = mapOf( "a" to "b" ) 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.deleteTransaction( 13 | transactionId = "" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/delete-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.deleteVariable( 13 | siteId = "", 14 | variableId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/get-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.getDeployment( 13 | siteId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/get-file.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val storage = Storage(client) 11 | 12 | val response = storage.getFile( 13 | bucketId = "", 14 | fileId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/update-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.updatePrefs( 13 | teamId = "", 14 | prefs = mapOf( "a" to "b" ) 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-email-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.createEmailVerification( 13 | url = "https://example.com" 14 | ) 15 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-phone.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updatePhone( 13 | phone = "+12065550100", 14 | password = "password" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/delete-file.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val storage = Storage(client) 11 | 12 | val response = storage.deleteFile( 13 | bucketId = "", 14 | fileId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/get-table.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.getTable( 13 | databaseId = "", 14 | tableId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/MessageStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class MessageStatus(val value: String) { 6 | @SerializedName("draft") 7 | DRAFT("draft"), 8 | @SerializedName("processing") 9 | PROCESSING("processing"), 10 | @SerializedName("scheduled") 11 | SCHEDULED("scheduled"), 12 | @SerializedName("sent") 13 | SENT("sent"), 14 | @SerializedName("failed") 15 | FAILED("failed"); 16 | 17 | override fun toString() = value 18 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-email.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateEmail( 13 | email = "email@example.com", 14 | password = "password" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/delete-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.deleteDeployment( 13 | siteId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete-table.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.deleteTable( 13 | databaseId = "", 14 | tableId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/get-membership.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.getMembership( 13 | teamId = "", 14 | membershipId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/IndexStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class IndexStatus(val value: String) { 6 | @SerializedName("available") 7 | AVAILABLE("available"), 8 | @SerializedName("processing") 9 | PROCESSING("processing"), 10 | @SerializedName("deleting") 11 | DELETING("deleting"), 12 | @SerializedName("stuck") 13 | STUCK("stuck"), 14 | @SerializedName("failed") 15 | FAILED("failed"); 16 | 17 | override fun toString() = value 18 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/list-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.listLogs( 13 | queries = listOf(), // optional 14 | total = false // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateVerification( 13 | userId = "", 14 | secret = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-queue-databases.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val health = Health(client) 11 | 12 | val response = health.getQueueDatabases( 13 | name = "", // optional 14 | threshold = 0 // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/update-site-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.updateSiteDeployment( 13 | siteId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/create.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.create( 13 | teamId = "", 14 | name = "", 15 | roles = listOf() // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/delete-membership.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.deleteMembership( 13 | teamId = "", 14 | membershipId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-email-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateEmailVerification( 13 | userId = "", 14 | emailVerification = false 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-phone-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updatePhoneVerification( 13 | userId = "", 14 | phoneVerification = false 15 | ) 16 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/ColumnStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class ColumnStatus(val value: String) { 6 | @SerializedName("available") 7 | AVAILABLE("available"), 8 | @SerializedName("processing") 9 | PROCESSING("processing"), 10 | @SerializedName("deleting") 11 | DELETING("deleting"), 12 | @SerializedName("stuck") 13 | STUCK("stuck"), 14 | @SerializedName("failed") 15 | FAILED("failed"); 16 | 17 | override fun toString() = value 18 | } -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/DeploymentStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class DeploymentStatus(val value: String) { 6 | @SerializedName("waiting") 7 | WAITING("waiting"), 8 | @SerializedName("processing") 9 | PROCESSING("processing"), 10 | @SerializedName("building") 11 | BUILDING("building"), 12 | @SerializedName("ready") 13 | READY("ready"), 14 | @SerializedName("failed") 15 | FAILED("failed"); 16 | 17 | override fun toString() = value 18 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-mfa-challenge.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateMFAChallenge( 13 | challengeId = "", 14 | otp = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-password.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updatePassword( 13 | password = "", 14 | oldPassword = "password" // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/get-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.getVariable( 13 | functionId = "", 14 | variableId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/update-deployment-status.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.updateDeploymentStatus( 13 | siteId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-token.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createToken( 13 | userId = "", 14 | length = 4, // optional 15 | expire = 60 // optional 16 | ) 17 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/AttributeStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class AttributeStatus(val value: String) { 6 | @SerializedName("available") 7 | AVAILABLE("available"), 8 | @SerializedName("processing") 9 | PROCESSING("processing"), 10 | @SerializedName("deleting") 11 | DELETING("deleting"), 12 | @SerializedName("stuck") 13 | STUCK("stuck"), 14 | @SerializedName("failed") 15 | FAILED("failed"); 16 | 17 | override fun toString() = value 18 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-recovery.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.createRecovery( 13 | email = "email@example.com", 14 | url = "https://example.com" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/list-identities.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.listIdentities( 13 | queries = listOf(), // optional 14 | total = false // optional 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/get-subscriber.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.getSubscriber( 13 | topicId = "", 14 | subscriberId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/create-duplicate-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.createDuplicateDeployment( 13 | siteId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/list-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.listLogs( 13 | siteId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/get-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.getColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/get-index.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.getIndex( 13 | databaseId = "", 14 | tableId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.listLogs( 13 | userId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-email-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateEmailVerification( 13 | userId = "", 14 | secret = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-phone-verification.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updatePhoneVerification( 13 | userId = "", 14 | secret = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/get-collection.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.getCollection( 13 | databaseId = "", 14 | collectionId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/delete-execution.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.deleteExecution( 13 | functionId = "", 14 | executionId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/delete-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.deleteVariable( 13 | functionId = "", 14 | variableId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/get-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.getDeployment( 13 | functionId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.list( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/create.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.create( 13 | databaseId = "", 14 | name = "", 15 | enabled = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.deleteColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete-index.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.deleteIndex( 13 | databaseId = "", 14 | tableId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/update.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.update( 13 | databaseId = "", 14 | name = "", 15 | enabled = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list-targets.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.listTargets( 13 | userId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.list( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/ExecutionStatus.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class ExecutionStatus(val value: String) { 6 | @SerializedName("waiting") 7 | WAITING("waiting"), 8 | @SerializedName("processing") 9 | PROCESSING("processing"), 10 | @SerializedName("completed") 11 | COMPLETED("completed"), 12 | @SerializedName("failed") 13 | FAILED("failed"), 14 | @SerializedName("scheduled") 15 | SCHEDULED("scheduled"); 16 | 17 | override fun toString() = value 18 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-recovery.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updateRecovery( 13 | userId = "", 14 | secret = "", 15 | password = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-image.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val avatars = Avatars(client) 11 | 12 | val result = avatars.getImage( 13 | url = "https://example.com", 14 | width = 0, // optional 15 | height = 0 // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/create.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.create( 13 | databaseId = "", 14 | name = "", 15 | enabled = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete-collection.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.deleteCollection( 13 | databaseId = "", 14 | collectionId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/update.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.update( 13 | databaseId = "", 14 | name = "", 15 | enabled = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/delete-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.deleteDeployment( 13 | functionId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/get-execution.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.getExecution( 13 | functionId = "", 14 | executionId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/delete-subscriber.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setJWT("") // Your secret JSON Web Token 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.deleteSubscriber( 13 | topicId = "", 14 | subscriberId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.list( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-jwt.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createJWT( 13 | userId = "", 14 | sessionId = "", // optional 15 | duration = 0 // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/get-index.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.getIndex( 13 | databaseId = "", 14 | collectionId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/health/get-failed-jobs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Health 4 | import io.appwrite.enums.Name 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setKey("") // Your secret API key 10 | 11 | val health = Health(client) 12 | 13 | val response = health.getFailedJobs( 14 | name = Name.V1_DATABASE, 15 | threshold = 0 // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tokens/create-file-token.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Tokens 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tokens = Tokens(client) 11 | 12 | val response = tokens.createFileToken( 13 | bucketId = "", 14 | fileId = "", 15 | expire = "" // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete-index.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.deleteIndex( 13 | databaseId = "", 14 | collectionId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/get-attribute.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.getAttribute( 13 | databaseId = "", 14 | collectionId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/get-file-view.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val storage = Storage(client) 11 | 12 | val result = storage.getFileView( 13 | bucketId = "", 14 | fileId = "", 15 | token = "" // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.list( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/update-membership.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.updateMembership( 13 | teamId = "", 14 | membershipId = "", 15 | roles = listOf() 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-magic-url-token.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | 9 | val account = Account(client) 10 | 11 | val response = account.createMagicURLToken( 12 | userId = "", 13 | email = "email@example.com", 14 | url = "https://example.com", // optional 15 | phrase = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.list( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.list( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/update-deployment-status.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.updateDeploymentStatus( 13 | functionId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/create-topic.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.createTopic( 13 | topicId = "", 14 | name = "", 15 | subscribe = listOf("any") // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/create-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.createVariable( 13 | siteId = "", 14 | key = "", 15 | value = "", 16 | secret = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list-identities.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.listIdentities( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/Output.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class Output(val value: String) { 6 | @SerializedName("jpg") 7 | JPG("jpg"), 8 | @SerializedName("jpeg") 9 | JPEG("jpeg"), 10 | @SerializedName("png") 11 | PNG("png"), 12 | @SerializedName("webp") 13 | WEBP("webp"), 14 | @SerializedName("heic") 15 | HEIC("heic"), 16 | @SerializedName("avif") 17 | AVIF("avif"), 18 | @SerializedName("gif") 19 | GIF("gif"); 20 | 21 | override fun toString() = value 22 | } -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | import io.appwrite.enums.AuthenticatorType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setSession("") // The user session to authenticate with 10 | 11 | val account = Account(client) 12 | 13 | val response = account.createMFAAuthenticator( 14 | type = AuthenticatorType.TOTP 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/delete-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | import io.appwrite.enums.AuthenticatorType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setSession("") // The user session to authenticate with 10 | 11 | val account = Account(client) 12 | 13 | val response = account.deleteMFAAuthenticator( 14 | type = AuthenticatorType.TOTP 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-qr.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val avatars = Avatars(client) 11 | 12 | val result = avatars.getQR( 13 | text = "", 14 | size = 1, // optional 15 | margin = 0, // optional 16 | download = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete-attribute.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.deleteAttribute( 13 | databaseId = "", 14 | collectionId = "", 15 | key = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/update-function-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.updateFunctionDeployment( 13 | functionId = "", 14 | deploymentId = "" 15 | ) 16 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/get-file-download.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val storage = Storage(client) 11 | 12 | val result = storage.getFileDownload( 13 | bucketId = "", 14 | fileId = "", 15 | token = "" // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/list-buckets.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val storage = Storage(client) 11 | 12 | val response = storage.listBuckets( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tokens/list.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Tokens 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tokens = Tokens(client) 11 | 12 | val response = tokens.list( 13 | bucketId = "", 14 | fileId = "", 15 | queries = listOf(), // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-targets.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listTargets( 13 | messageId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-topic-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listTopicLogs( 13 | topicId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-topics.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listTopics( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/ImageFormat.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class ImageFormat(val value: String) { 6 | @SerializedName("jpg") 7 | JPG("jpg"), 8 | @SerializedName("jpeg") 9 | JPEG("jpeg"), 10 | @SerializedName("png") 11 | PNG("png"), 12 | @SerializedName("webp") 13 | WEBP("webp"), 14 | @SerializedName("heic") 15 | HEIC("heic"), 16 | @SerializedName("avif") 17 | AVIF("avif"), 18 | @SerializedName("gif") 19 | GIF("gif"); 20 | 21 | override fun toString() = value 22 | } -------------------------------------------------------------------------------- /docs/examples/java/account/create-jwt.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject(""); // Your project ID 8 | 9 | Account account = new Account(client); 10 | 11 | account.createJWT(new CoroutineCallback<>((result, error) -> { 12 | if (error != null) { 13 | error.printStackTrace(); 14 | return; 15 | } 16 | 17 | System.out.println(result); 18 | })); 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-message-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listMessageLogs( 13 | messageId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-messages.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listMessages( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-providers.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listProviders( 13 | queries = listOf(), // optional 14 | search = "", // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/update-topic.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.updateTopic( 13 | topicId = "", 14 | name = "", // optional 15 | subscribe = listOf("any") // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/delete-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | import io.appwrite.enums.AuthenticatorType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setKey("") // Your secret API key 10 | 11 | val users = Users(client) 12 | 13 | val response = users.deleteMFAAuthenticator( 14 | userId = "", 15 | type = AuthenticatorType.TOTP 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/create-subscriber.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setJWT("") // Your secret JSON Web Token 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.createSubscriber( 13 | topicId = "", 14 | subscriberId = "", 15 | targetId = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-provider-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listProviderLogs( 13 | providerId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/update-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.updateTransaction( 13 | transactionId = "", 14 | commit = false, // optional 15 | rollback = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-md-5-user.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createMD5User( 13 | userId = "", 14 | email = "email@example.com", 15 | password = "password", 16 | name = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/update-transaction.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.updateTransaction( 13 | transactionId = "", 14 | commit = false, // optional 15 | rollback = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/list-executions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.listExecutions( 13 | functionId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-argon-2-user.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createArgon2User( 13 | userId = "", 14 | email = "email@example.com", 15 | password = "password", 16 | name = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-bcrypt-user.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createBcryptUser( 13 | userId = "", 14 | email = "email@example.com", 15 | password = "password", 16 | name = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create-ph-pass-user.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.createPHPassUser( 13 | userId = "", 14 | email = "email@example.com", 15 | password = "password", 16 | name = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-mfa-authenticator.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | import io.appwrite.enums.AuthenticatorType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setSession("") // The user session to authenticate with 10 | 11 | val account = Account(client) 12 | 13 | val response = account.updateMFAAuthenticator( 14 | type = AuthenticatorType.TOTP, 15 | otp = "" 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/update-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val account = Account(client) 11 | 12 | val response = account.updatePrefs( 13 | prefs = mapOf( 14 | "language" to "en", 15 | "timezone" to "UTC", 16 | "darkTheme" to true 17 | ) 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-initials.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val avatars = Avatars(client) 11 | 12 | val result = avatars.getInitials( 13 | name = "", // optional 14 | width = 0, // optional 15 | height = 0, // optional 16 | background = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/create-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.createVariable( 13 | functionId = "", 14 | key = "", 15 | value = "", 16 | secret = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-subscriber-logs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listSubscriberLogs( 13 | subscriberId = "", 14 | queries = listOf(), // optional 15 | total = false // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/list-deployments.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.listDeployments( 13 | siteId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/list-memberships.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.listMemberships( 13 | userId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/storage/list-files.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Storage 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val storage = Storage(client) 11 | 12 | val response = storage.listFiles( 13 | bucketId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/create-rows.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.createRows( 13 | databaseId = "", 14 | tableId = "", 15 | rows = listOf(), 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/list-columns.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.listColumns( 13 | databaseId = "", 14 | tableId = "", 15 | queries = listOf(), // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/list-indexes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.listIndexes( 13 | databaseId = "", 14 | tableId = "", 15 | queries = listOf(), // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/upsert-rows.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.upsertRows( 13 | databaseId = "", 14 | tableId = "", 15 | rows = listOf(), 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/list-memberships.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.listMemberships( 13 | teamId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/teams/update-membership-status.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Teams 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val teams = Teams(client) 11 | 12 | val response = teams.updateMembershipStatus( 13 | teamId = "", 14 | membershipId = "", 15 | userId = "", 16 | secret = "" 17 | ) 18 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/enums/ExecutionMethod.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.enums 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | enum class ExecutionMethod(val value: String) { 6 | @SerializedName("GET") 7 | GET("GET"), 8 | @SerializedName("POST") 9 | POST("POST"), 10 | @SerializedName("PUT") 11 | PUT("PUT"), 12 | @SerializedName("PATCH") 13 | PATCH("PATCH"), 14 | @SerializedName("DELETE") 15 | DELETE("DELETE"), 16 | @SerializedName("OPTIONS") 17 | OPTIONS("OPTIONS"), 18 | @SerializedName("HEAD") 19 | HEAD("HEAD"); 20 | 21 | override fun toString() = value 22 | } -------------------------------------------------------------------------------- /docs/examples/java/account/create-anonymous-session.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject(""); // Your project ID 8 | 9 | Account account = new Account(client); 10 | 11 | account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { 12 | if (error != null) { 13 | error.printStackTrace(); 14 | return; 15 | } 16 | 17 | System.out.println(result); 18 | })); 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/list-tables.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.listTables( 13 | databaseId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-flag.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | import io.appwrite.enums.Flag 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setSession("") // The user session to authenticate with 10 | 11 | val avatars = Avatars(client) 12 | 13 | val result = avatars.getFlag( 14 | code = Flag.AFGHANISTAN, 15 | width = 0, // optional 16 | height = 0, // optional 17 | quality = -1 // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/create-duplicate-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.createDuplicateDeployment( 13 | functionId = "", 14 | deploymentId = "", 15 | buildId = "" // optional 16 | ) 17 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/update-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val sites = Sites(client) 11 | 12 | val response = sites.updateVariable( 13 | siteId = "", 14 | variableId = "", 15 | key = "", 16 | value = "", // optional 17 | secret = false // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete-row.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.deleteRow( 13 | databaseId = "", 14 | tableId = "", 15 | rowId = "", 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/java/health/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.get(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/list-indexes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.listIndexes( 13 | databaseId = "", 14 | collectionId = "", 15 | queries = listOf(), // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/list-subscribers.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.listSubscribers( 13 | topicId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/delete-rows.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.deleteRows( 13 | databaseId = "", 14 | tableId = "", 15 | queries = listOf(), // optional 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/java/health/get-db.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getDB(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/account/create-o-auth-2-token.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Account 4 | import io.appwrite.enums.OAuthProvider 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | 10 | val account = Account(client) 11 | 12 | account.createOAuth2Token( 13 | provider = OAuthProvider.AMAZON, 14 | success = "https://example.com", // optional 15 | failure = "https://example.com", // optional 16 | scopes = listOf() // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/list-attributes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.listAttributes( 13 | databaseId = "", 14 | collectionId = "", 15 | queries = listOf(), // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/list-collections.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.listCollections( 13 | databaseId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/list-deployments.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.listDeployments( 13 | functionId = "", 14 | queries = listOf(), // optional 15 | search = "", // optional 16 | total = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/get-deployment-download.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | import io.appwrite.enums.DeploymentDownloadType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setKey("") // Your secret API key 10 | 11 | val sites = Sites(client) 12 | 13 | val result = sites.getDeploymentDownload( 14 | siteId = "", 15 | deploymentId = "", 16 | type = "source" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/coroutines/Callback.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.coroutines 2 | 3 | import kotlinx.coroutines.Dispatchers 4 | import kotlin.coroutines.Continuation 5 | import kotlin.coroutines.CoroutineContext 6 | 7 | interface Callback { 8 | fun onComplete(result: T?, error: Throwable?) 9 | } 10 | 11 | class CoroutineCallback @JvmOverloads constructor( 12 | private val callback: Callback, 13 | override val context: CoroutineContext = Dispatchers.Default 14 | ) : Continuation { 15 | override fun resumeWith(result: Result) { 16 | callback.onComplete(result.getOrNull(), result.exceptionOrNull()) 17 | } 18 | } -------------------------------------------------------------------------------- /docs/examples/java/health/get-cache.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getCache(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/health/get-time.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getTime(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.get(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-browser.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | import io.appwrite.enums.Browser 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setSession("") // The user session to authenticate with 10 | 11 | val avatars = Avatars(client) 12 | 13 | val result = avatars.getBrowser( 14 | code = Browser.AVANT_BROWSER, 15 | width = 0, // optional 16 | height = 0, // optional 17 | quality = -1 // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/create-point-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.createPointColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = listOf(1, 2) // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/create.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.create( 13 | userId = "", 14 | email = "email@example.com", // optional 15 | phone = "+12065550100", // optional 16 | password = "", // optional 17 | name = "" // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/java/account/get.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Account account = new Account(client); 11 | 12 | account.get(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/health/get-pub-sub.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getPubSub(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/health/get-storage.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getStorage(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/sites/list-frameworks.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Sites; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Sites sites = new Sites(client); 11 | 12 | sites.listFrameworks(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/create-documents.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.createDocuments( 13 | databaseId = "", 14 | collectionId = "", 15 | documents = listOf(), 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/upsert-documents.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.upsertDocuments( 13 | databaseId = "", 14 | collectionId = "", 15 | documents = listOf(), 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/update-ip-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.updateIpColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = "", 18 | newKey = "" // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/java/health/get-antivirus.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getAntivirus(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/list-codes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listCodes(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/create-fcm-provider.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.createFCMProvider( 13 | providerId = "", 14 | name = "", 15 | serviceAccountJSON = mapOf( "a" to "b" ), // optional 16 | enabled = false // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/java/account/get-prefs.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Account account = new Account(client); 11 | 12 | account.getPrefs(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/health/get-storage-local.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Health; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Health health = new Health(client); 11 | 12 | health.getStorageLocal(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/sites/list-specifications.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Sites; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Sites sites = new Sites(client); 11 | 12 | sites.listSpecifications(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/avatars/get-credit-card.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Avatars 4 | import io.appwrite.enums.CreditCard 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setSession("") // The user session to authenticate with 10 | 11 | val avatars = Avatars(client) 12 | 13 | val result = avatars.getCreditCard( 14 | code = CreditCard.AMERICAN_EXPRESS, 15 | width = 0, // optional 16 | height = 0, // optional 17 | quality = -1 // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete-documents.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.deleteDocuments( 13 | databaseId = "", 14 | collectionId = "", 15 | queries = listOf(), // optional 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/update-variable.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val functions = Functions(client) 11 | 12 | val response = functions.updateVariable( 13 | functionId = "", 14 | variableId = "", 15 | key = "", 16 | value = "", // optional 17 | secret = false // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/users/update-target.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Users 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val users = Users(client) 11 | 12 | val response = users.updateTarget( 13 | userId = "", 14 | targetId = "", 15 | identifier = "", // optional 16 | providerId = "", // optional 17 | name = "" // optional 18 | ) 19 | -------------------------------------------------------------------------------- /src/main/kotlin/io/appwrite/models/Jwt.kt: -------------------------------------------------------------------------------- 1 | package io.appwrite.models 2 | 3 | import com.google.gson.annotations.SerializedName 4 | import io.appwrite.extensions.jsonCast 5 | 6 | /** 7 | * JWT 8 | */ 9 | data class Jwt( 10 | /** 11 | * JWT encoded string. 12 | */ 13 | @SerializedName("jwt") 14 | val jwt: String, 15 | 16 | ) { 17 | fun toMap(): Map = mapOf( 18 | "jwt" to jwt as Any, 19 | ) 20 | 21 | companion object { 22 | 23 | @Suppress("UNCHECKED_CAST") 24 | fun from( 25 | map: Map, 26 | ) = Jwt( 27 | jwt = map["jwt"] as String, 28 | ) 29 | } 30 | } -------------------------------------------------------------------------------- /docs/examples/java/locale/list-continents.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listContinents(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/list-countries.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listCountries(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/list-currencies.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listCurrencies(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/list-languages.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listLanguages(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/create-point-attribute.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.createPointAttribute( 13 | databaseId = "", 14 | collectionId = "", 15 | key = "", 16 | required = false, 17 | default = listOf(1, 2) // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/delete-document.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.deleteDocument( 13 | databaseId = "", 14 | collectionId = "", 15 | documentId = "", 16 | transactionId = "" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/functions/get-deployment-download.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Functions 4 | import io.appwrite.enums.DeploymentDownloadType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setKey("") // Your secret API key 10 | 11 | val functions = Functions(client) 12 | 13 | val result = functions.getDeploymentDownload( 14 | functionId = "", 15 | deploymentId = "", 16 | type = "source" // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/messaging/update-fcm-provider.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Messaging 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val messaging = Messaging(client) 11 | 12 | val response = messaging.updateFCMProvider( 13 | providerId = "", 14 | name = "", // optional 15 | enabled = false, // optional 16 | serviceAccountJSON = mapOf( "a" to "b" ) // optional 17 | ) 18 | -------------------------------------------------------------------------------- /docs/examples/kotlin/sites/create-vcs-deployment.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Sites 4 | import io.appwrite.enums.VCSReferenceType 5 | 6 | val client = Client() 7 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 8 | .setProject("") // Your project ID 9 | .setKey("") // Your secret API key 10 | 11 | val sites = Sites(client) 12 | 13 | val response = sites.createVcsDeployment( 14 | siteId = "", 15 | type = VCSReferenceType.BRANCH, 16 | reference = "", 17 | activate = false // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/create-ip-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.createIpColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = "", // optional 18 | array = false // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/get-row.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.getRow( 13 | databaseId = "", 14 | tableId = "", 15 | rowId = "", 16 | queries = listOf(), // optional 17 | transactionId = "" // optional 18 | ) 19 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/update-boolean-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.updateBooleanColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = false, 18 | newKey = "" // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/update-datetime-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.updateDatetimeColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = "", 18 | newKey = "" // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/java/account/delete-sessions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Account account = new Account(client); 11 | 12 | account.deleteSessions(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/account/list-sessions.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Account account = new Account(client); 11 | 12 | account.listSessions(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/account/update-status.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Account account = new Account(client); 11 | 12 | account.updateStatus(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/functions/list-runtimes.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Functions; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey(""); // Your secret API key 9 | 10 | Functions functions = new Functions(client); 11 | 12 | functions.listRuntimes(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/list-countries-eu.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/databases/update-ip-attribute.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.Databases 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val databases = Databases(client) 11 | 12 | val response = databases.updateIpAttribute( 13 | databaseId = "", 14 | collectionId = "", 15 | key = "", 16 | required = false, 17 | default = "", 18 | newKey = "" // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/update-url-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.updateUrlColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = "https://example.com", 18 | newKey = "" // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/java/account/list-mfa-factors.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Account; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Account account = new Account(client); 11 | 12 | account.listMFAFactors(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/java/locale/list-countries-phones.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client; 2 | import io.appwrite.coroutines.CoroutineCallback; 3 | import io.appwrite.services.Locale; 4 | 5 | Client client = new Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession(""); // The user session to authenticate with 9 | 10 | Locale locale = new Locale(client); 11 | 12 | locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { 13 | if (error != null) { 14 | error.printStackTrace(); 15 | return; 16 | } 17 | 18 | System.out.println(result); 19 | })); 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/create-datetime-column.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setKey("") // Your secret API key 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.createDatetimeColumn( 13 | databaseId = "", 14 | tableId = "", 15 | key = "", 16 | required = false, 17 | default = "", // optional 18 | array = false // optional 19 | ) 20 | -------------------------------------------------------------------------------- /docs/examples/kotlin/tablesdb/list-rows.md: -------------------------------------------------------------------------------- 1 | import io.appwrite.Client 2 | import io.appwrite.coroutines.CoroutineCallback 3 | import io.appwrite.services.TablesDB 4 | 5 | val client = Client() 6 | .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint 7 | .setProject("") // Your project ID 8 | .setSession("") // The user session to authenticate with 9 | 10 | val tablesDB = TablesDB(client) 11 | 12 | val response = tablesDB.listRows( 13 | databaseId = "", 14 | tableId = "", 15 | queries = listOf(), // optional 16 | transactionId = "", // optional 17 | total = false // optional 18 | ) 19 | --------------------------------------------------------------------------------