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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
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:10.0.0")
implementation("io.appwrite:sdk-for-kotlin:11.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>10.0.0</version>
<version>11.0.0</version>
</dependency>
</dependencies>
```
Expand Down
6 changes: 5 additions & 1 deletion docs/examples/java/account/update-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Client client = new Client()
Account account = new Account(client);

account.updatePrefs(
mapOf( "a" to "b" ), // prefs
mapOf(
"language" to "en",
"timezone" to "UTC",
"darkTheme" to true
), // prefs
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
8 changes: 7 additions & 1 deletion docs/examples/java/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ databases.createDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data
mapOf(
"username" to "walter.obrien",
"email" to "[email protected]",
"fullName" to "Walter O'Brien",
"age" to 30,
"isAdmin" to false
), // data
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
27 changes: 27 additions & 0 deletions docs/examples/java/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
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

Databases databases = new Databases(client);

databases.createLineAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

27 changes: 27 additions & 0 deletions docs/examples/java/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
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

Databases databases = new Databases(client);

databases.createPointAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

27 changes: 27 additions & 0 deletions docs/examples/java/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
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

Databases databases = new Databases(client);

databases.createPolygonAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

28 changes: 28 additions & 0 deletions docs/examples/java/databases/update-line-attribute.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.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

Databases databases = new Databases(client);

databases.updateLineAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

28 changes: 28 additions & 0 deletions docs/examples/java/databases/update-point-attribute.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.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

Databases databases = new Databases(client);

databases.updatePointAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

28 changes: 28 additions & 0 deletions docs/examples/java/databases/update-polygon-attribute.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.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

Databases databases = new Databases(client);

databases.updatePolygonAttribute(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

27 changes: 27 additions & 0 deletions docs/examples/java/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.createLineColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

27 changes: 27 additions & 0 deletions docs/examples/java/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.createPointColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

27 changes: 27 additions & 0 deletions docs/examples/java/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.createPolygonColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

8 changes: 7 additions & 1 deletion docs/examples/java/tablesdb/create-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ tablesDB.createRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
mapOf( "a" to "b" ), // data
mapOf(
"username" to "walter.obrien",
"email" to "[email protected]",
"fullName" to "Walter O'Brien",
"age" to 30,
"isAdmin" to false
), // data
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
28 changes: 28 additions & 0 deletions docs/examples/java/tablesdb/update-line-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.updateLineColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
"", // newKey (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/update-point-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.updatePointColumn(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"", // key
false, // required
listOf([1,2], [3, 4]), // default (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

Loading