Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green&style=flat-square)
![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**

> This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)

Expand Down Expand Up @@ -39,7 +39,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:

```groovy
implementation("io.appwrite:sdk-for-kotlin:9.1.2")
implementation("io.appwrite:sdk-for-kotlin:10.0.0")
```

### Maven
Expand All @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
<dependency>
<groupId>io.appwrite</groupId>
<artifactId>sdk-for-kotlin</artifactId>
<version>9.1.2</version>
<version>10.0.0</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/create-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Client client = new Client()

Account account = new Account(client);

account.createMfaAuthenticator(
account.createMFAAuthenticator(
AuthenticatorType.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/create-mfa-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Account account = new Account(client);

account.createMfaChallenge(
account.createMFAChallenge(
AuthenticationFactor.EMAIL, // factor
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/create-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Account account = new Account(client);

account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/delete-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Client client = new Client()

Account account = new Account(client);

account.deleteMfaAuthenticator(
account.deleteMFAAuthenticator(
AuthenticatorType.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/get-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Account account = new Account(client);

account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/list-mfa-factors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Account account = new Account(client);

account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
account.listMFAFactors(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/update-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Client client = new Client()

Account account = new Account(client);

account.updateMfaAuthenticator(
account.updateMFAAuthenticator(
AuthenticatorType.TOTP, // type
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/update-mfa-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Account account = new Account(client);

account.updateMfaChallenge(
account.updateMFAChallenge(
"<CHALLENGE_ID>", // challengeId
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/update-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Account account = new Account(client);

account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
.setSession(""); // The user session to authenticate with

Databases databases = new Databases(client);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
.setSession(""); // The user session to authenticate with

Databases databases = new Databases(client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/create-apns-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.createApnsProvider(
messaging.createAPNSProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name
"<AUTH_KEY>", // authKey (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/create-fcm-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.createFcmProvider(
messaging.createFCMProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name
mapOf( "a" to "b" ), // serviceAccountJSON (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/create-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.createSms(
messaging.createSMS(
"<MESSAGE_ID>", // messageId
"<CONTENT>", // content
listOf(), // topics (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/create-smtp-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.createSmtpProvider(
messaging.createSMTPProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name
"<HOST>", // host
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/update-apns-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.updateApnsProvider(
messaging.updateAPNSProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name (optional)
false, // enabled (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/update-fcm-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.updateFcmProvider(
messaging.updateFCMProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name (optional)
false, // enabled (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/update-sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.updateSms(
messaging.updateSMS(
"<MESSAGE_ID>", // messageId
listOf(), // topics (optional)
listOf(), // users (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/messaging/update-smtp-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Client client = new Client()

Messaging messaging = new Messaging(client);

messaging.updateSmtpProvider(
messaging.updateSMTPProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name (optional)
"<HOST>", // host (optional)
Expand Down
28 changes: 28 additions & 0 deletions docs/examples/java/tablesdb/create-boolean-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDB;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key

TablesDB tablesDB = new TablesDB(client);

tablesDB.createBooleanColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
false, // default (optional)
false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);

28 changes: 28 additions & 0 deletions docs/examples/java/tablesdb/create-datetime-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDB;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key

TablesDB tablesDB = new TablesDB(client);

tablesDB.createDatetimeColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
"", // default (optional)
false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);

28 changes: 28 additions & 0 deletions docs/examples/java/tablesdb/create-email-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDB;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key

TablesDB tablesDB = new TablesDB(client);

tablesDB.createEmailColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
"[email protected]", // default (optional)
false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);

29 changes: 29 additions & 0 deletions docs/examples/java/tablesdb/create-enum-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDB;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key

TablesDB tablesDB = new TablesDB(client);

tablesDB.createEnumColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
listOf(), // elements
false, // required
"<DEFAULT>", // default (optional)
false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);

30 changes: 30 additions & 0 deletions docs/examples/java/tablesdb/create-float-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDB;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key

TablesDB tablesDB = new TablesDB(client);

tablesDB.createFloatColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
0, // min (optional)
0, // max (optional)
0, // default (optional)
false, // array (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);

30 changes: 30 additions & 0 deletions docs/examples/java/tablesdb/create-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.TablesDB;
import io.appwrite.enums.IndexType;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key

TablesDB tablesDB = new TablesDB(client);

tablesDB.createIndex(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
IndexType.KEY, // type
listOf(), // columns
listOf(), // orders (optional)
listOf(), // lengths (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);

Loading