Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 12.3.0

* Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance
* Add `Operator` class for atomic modification of rows via update, bulk update, upsert, and bulk upsert operations

## 12.2.1

* Add transaction support for Databases and TablesDB
Expand Down
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:12.2.1")
implementation("io.appwrite:sdk-for-kotlin:12.3.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>12.2.1</version>
<version>12.3.0</version>
</dependency>
</dependencies>
```
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/account/list-identities.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Account account = new Account(client);

account.listIdentities(
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Account account = new Account(client);

account.listLogs(
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/databases/create-collection.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -13,7 +15,7 @@ databases.createCollection(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<NAME>", // name
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
false, // documentSecurity (optional)
false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/databases/create-document.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -20,7 +22,7 @@ databases.createDocument(
"age" to 30,
"isAdmin" to false
), // data
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
"<TRANSACTION_ID>", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/list-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ databases.listAttributes(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/list-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ databases.listCollections(
"<DATABASE_ID>", // databaseId
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/list-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ databases.listDocuments(
"<COLLECTION_ID>", // collectionId
listOf(), // queries (optional)
"<TRANSACTION_ID>", // transactionId (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/list-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ databases.listIndexes(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Databases databases = new Databases(client);
databases.list(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/databases/update-collection.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -13,7 +15,7 @@ databases.updateCollection(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<NAME>", // name
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
false, // documentSecurity (optional)
false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/databases/update-document.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -14,7 +16,7 @@ databases.updateDocument(
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data (optional)
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
"<TRANSACTION_ID>", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/databases/upsert-document.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -14,7 +16,7 @@ databases.upsertDocument(
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
"<TRANSACTION_ID>", // transactionId (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/functions/list-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ functions.listDeployments(
"<FUNCTION_ID>", // functionId
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/functions/list-executions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Functions functions = new Functions(client);
functions.listExecutions(
"<FUNCTION_ID>", // functionId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/functions/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Functions functions = new Functions(client);
functions.list(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
30 changes: 30 additions & 0 deletions docs/examples/java/messaging/create-resend-provider.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.Messaging;

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

Messaging messaging = new Messaging(client);

messaging.createResendProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name
"<API_KEY>", // apiKey (optional)
"<FROM_NAME>", // fromName (optional)
"[email protected]", // fromEmail (optional)
"<REPLY_TO_NAME>", // replyToName (optional)
"[email protected]", // replyToEmail (optional)
false, // enabled (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-message-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listMessageLogs(
"<MESSAGE_ID>", // messageId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listMessages(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-provider-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listProviderLogs(
"<PROVIDER_ID>", // providerId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listProviders(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-subscriber-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listSubscriberLogs(
"<SUBSCRIBER_ID>", // subscriberId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-subscribers.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ messaging.listSubscribers(
"<TOPIC_ID>", // topicId
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listTargets(
"<MESSAGE_ID>", // messageId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-topic-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listTopicLogs(
"<TOPIC_ID>", // topicId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/messaging/list-topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Messaging messaging = new Messaging(client);
messaging.listTopics(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
30 changes: 30 additions & 0 deletions docs/examples/java/messaging/update-resend-provider.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.Messaging;

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

Messaging messaging = new Messaging(client);

messaging.updateResendProvider(
"<PROVIDER_ID>", // providerId
"<NAME>", // name (optional)
false, // enabled (optional)
"<API_KEY>", // apiKey (optional)
"<FROM_NAME>", // fromName (optional)
"[email protected]", // fromEmail (optional)
"<REPLY_TO_NAME>", // replyToName (optional)
"<REPLY_TO_EMAIL>", // replyToEmail (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

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

1 change: 1 addition & 0 deletions docs/examples/java/sites/list-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sites.listDeployments(
"<SITE_ID>", // siteId
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/sites/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Sites sites = new Sites(client);
sites.listLogs(
"<SITE_ID>", // siteId
listOf(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/sites/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Sites sites = new Sites(client);
sites.list(
listOf(), // queries (optional)
"<SEARCH>", // search (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/storage/create-bucket.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -12,7 +14,7 @@ Storage storage = new Storage(client);
storage.createBucket(
"<BUCKET_ID>", // bucketId
"<NAME>", // name
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
false, // fileSecurity (optional)
false, // enabled (optional)
1, // maximumFileSize (optional)
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/java/storage/create-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.models.InputFile;
import io.appwrite.services.Storage;
import io.appwrite.Permission;
import io.appwrite.Role;

Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -14,7 +16,7 @@ storage.createFile(
"<BUCKET_ID>", // bucketId
"<FILE_ID>", // fileId
InputFile.fromPath("file.png"), // file
listOf("read("any")"), // permissions (optional)
listOf(Permission.read(Role.any())), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
Loading