Skip to content

Commit 103ffe6

Browse files
Merge pull request #35 from appwrite/dev
Fix between query output
2 parents 75d2ad8 + 7a56db1 commit 103ffe6

37 files changed

+738
-305
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

4141
```groovy
42-
implementation("io.appwrite:sdk-for-kotlin:4.0.0")
42+
implementation("io.appwrite:sdk-for-kotlin:4.1.0")
4343
```
4444

4545
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
5050
<dependency>
5151
<groupId>io.appwrite</groupId>
5252
<artifactId>sdk-for-kotlin</artifactId>
53-
<version>4.0.0</version>
53+
<version>4.1.0</version>
5454
</dependency>
5555
</dependencies>
5656
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueBuilds(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);

docs/examples/java/health/get-queue-certificates.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ Client client = new Client()
99

1010
Health health = new Health(client);
1111

12-
health.getQueueCertificates(new CoroutineCallback<>((result, error) -> {
13-
if (error != null) {
14-
error.printStackTrace();
15-
return;
16-
}
12+
health.getQueueCertificates(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
1718

18-
System.out.println(result);
19-
}));
19+
System.out.println(result);
20+
})
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueDatabases(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueDeletes(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);

docs/examples/java/health/get-queue-functions.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ Client client = new Client()
99

1010
Health health = new Health(client);
1111

12-
health.getQueueFunctions(new CoroutineCallback<>((result, error) -> {
13-
if (error != null) {
14-
error.printStackTrace();
15-
return;
16-
}
12+
health.getQueueFunctions(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
1718

18-
System.out.println(result);
19-
}));
19+
System.out.println(result);
20+
})
21+
);

docs/examples/java/health/get-queue-logs.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ Client client = new Client()
99

1010
Health health = new Health(client);
1111

12-
health.getQueueLogs(new CoroutineCallback<>((result, error) -> {
13-
if (error != null) {
14-
error.printStackTrace();
15-
return;
16-
}
12+
health.getQueueLogs(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
1718

18-
System.out.println(result);
19-
}));
19+
System.out.println(result);
20+
})
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueMails(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueMessaging(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Health health = new Health(client);
11+
12+
health.getQueueMigrations(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);

docs/examples/java/health/get-queue-webhooks.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ Client client = new Client()
99

1010
Health health = new Health(client);
1111

12-
health.getQueueWebhooks(new CoroutineCallback<>((result, error) -> {
13-
if (error != null) {
14-
error.printStackTrace();
15-
return;
16-
}
12+
health.getQueueWebhooks(
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
1718

18-
System.out.println(result);
19-
}));
19+
System.out.println(result);
20+
})
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Health
3+
4+
val client = Client(context)
5+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
8+
9+
val health = Health(client)
10+
11+
val response = health.getQueueBuilds(
12+
)

docs/examples/kotlin/health/get-queue-certificates.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ val client = Client(context)
88

99
val health = Health(client)
1010

11-
val response = health.getQueueCertificates()
11+
val response = health.getQueueCertificates(
12+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Health
3+
4+
val client = Client(context)
5+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
8+
9+
val health = Health(client)
10+
11+
val response = health.getQueueDatabases(
12+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Health
3+
4+
val client = Client(context)
5+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
8+
9+
val health = Health(client)
10+
11+
val response = health.getQueueDeletes(
12+
)

docs/examples/kotlin/health/get-queue-functions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ val client = Client(context)
88

99
val health = Health(client)
1010

11-
val response = health.getQueueFunctions()
11+
val response = health.getQueueFunctions(
12+
)

docs/examples/kotlin/health/get-queue-logs.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ val client = Client(context)
88

99
val health = Health(client)
1010

11-
val response = health.getQueueLogs()
11+
val response = health.getQueueLogs(
12+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Health
3+
4+
val client = Client(context)
5+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
8+
9+
val health = Health(client)
10+
11+
val response = health.getQueueMails(
12+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Health
3+
4+
val client = Client(context)
5+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
8+
9+
val health = Health(client)
10+
11+
val response = health.getQueueMessaging(
12+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Health
3+
4+
val client = Client(context)
5+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
6+
.setProject("5df5acd0d48c2") // Your project ID
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
8+
9+
val health = Health(client)
10+
11+
val response = health.getQueueMigrations(
12+
)

docs/examples/kotlin/health/get-queue-webhooks.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ val client = Client(context)
88

99
val health = Health(client)
1010

11-
val response = health.getQueueWebhooks()
11+
val response = health.getQueueWebhooks(
12+
)

src/main/kotlin/io/appwrite/Client.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ class Client @JvmOverloads constructor(
6262
init {
6363
headers = mutableMapOf(
6464
"content-type" to "application/json",
65-
"user-agent" to "AppwriteKotlinSDK/4.0.0 ${System.getProperty("http.agent")}",
65+
"user-agent" to "AppwriteKotlinSDK/4.1.0 ${System.getProperty("http.agent")}",
6666
"x-sdk-name" to "Kotlin",
6767
"x-sdk-platform" to "server",
6868
"x-sdk-language" to "kotlin",
69-
"x-sdk-version" to "4.0.0", "x-appwrite-response-format" to "1.4.0"
69+
"x-sdk-version" to "4.1.0", "x-appwrite-response-format" to "1.4.0"
7070
)
7171
config = mutableMapOf()
7272

src/main/kotlin/io/appwrite/Query.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ class Query {
2020

2121
fun isNotNull(attribute: String) = "isNotNull(\"${attribute}\")"
2222

23-
fun between(attribute: String, start: Int, end: Int) = Query.addQuery(attribute, "between", listOf(start, end))
23+
fun between(attribute: String, start: Int, end: Int) = "between(\"${attribute}\", ${start}, ${end})"
2424

25-
fun between(attribute: String, start: Double, end: Double) = Query.addQuery(attribute, "between", listOf(start, end))
25+
fun between(attribute: String, start: Double, end: Double) = "between(\"${attribute}\", ${start}, ${end})"
2626

27-
fun between(attribute: String, start: String, end: String) = Query.addQuery(attribute, "between", listOf(start, end))
27+
fun between(attribute: String, start: String, end: String) = "between(\"${attribute}\", \"${start}\", \"${end}\")"
2828

2929
fun startsWith(attribute: String, value: String) = Query.addQuery(attribute, "startsWith", value)
3030

src/main/kotlin/io/appwrite/models/Bucket.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ data class Bucket(
2626
val updatedAt: String,
2727

2828
/**
29-
* Bucket permissions. [Learn more about permissions](/docs/permissions).
29+
* Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
3030
*/
3131
@SerializedName("\$permissions")
3232
val permissions: List<Any>,
3333

3434
/**
35-
* Whether file-level security is enabled. [Learn more about permissions](/docs/permissions).
35+
* Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).
3636
*/
3737
@SerializedName("fileSecurity")
3838
val fileSecurity: Boolean,

0 commit comments

Comments
 (0)