Skip to content

Commit b1b2ad4

Browse files
committed
chore: release rc
1 parent 945e31c commit b1b2ad4

22 files changed

+522
-35
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.5.7-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.6.0-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:5.0.2")
42+
implementation("io.appwrite:sdk-for-kotlin:6.0.0-rc.1")
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>5.0.2</version>
53+
<version>6.0.0-rc.1</version>
5454
</dependency>
5555
</dependencies>
5656
```

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ext {
1818
POM_LICENSE_NAME = "GPL-3.0"
1919
POM_DEVELOPER_ID = 'appwrite'
2020
POM_DEVELOPER_NAME = 'Appwrite Team'
21-
POM_DEVELOPER_EMAIL = 'team@appwrite.io'
21+
POM_DEVELOPER_EMAIL = 'team@localhost.test'
2222
GITHUB_SCM_CONNECTION = 'scm:git:git://github.com/appwrite/sdk-for-kotlin.git'
2323
}
2424

docs/examples/java/account/delete-mfa-authenticator.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Account account = new Account(client);
1212

1313
account.deleteMfaAuthenticator(
1414
AuthenticatorType.TOTP, // type
15-
"<OTP>", // otp
1615
new CoroutineCallback<>((result, error) -> {
1716
if (error != null) {
1817
error.printStackTrace();

docs/examples/java/functions/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ functions.create(
3131
"<TEMPLATE_REPOSITORY>", // templateRepository (optional)
3232
"<TEMPLATE_OWNER>", // templateOwner (optional)
3333
"<TEMPLATE_ROOT_DIRECTORY>", // templateRootDirectory (optional)
34-
"<TEMPLATE_BRANCH>", // templateBranch (optional)
34+
"<TEMPLATE_VERSION>", // templateVersion (optional)
3535
new CoroutineCallback<>((result, error) -> {
3636
if (error != null) {
3737
error.printStackTrace();

docs/examples/java/functions/download-deployment.md docs/examples/java/functions/get-deployment-download.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import io.appwrite.services.Functions;
55
Client client = new Client()
66
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
77
.setProject("&lt;YOUR_PROJECT_ID&gt;") // Your project ID
8-
.setKey("&lt;YOUR_API_KEY&gt;"); // Your secret API key
8+
.setSession(""); // The user session to authenticate with
99

1010
Functions functions = new Functions(client);
1111

12-
functions.downloadDeployment(
12+
functions.getDeploymentDownload(
1313
"<FUNCTION_ID>", // functionId
1414
"<DEPLOYMENT_ID>", // deploymentId
1515
new CoroutineCallback<>((result, error) -> {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
8+
9+
Functions functions = new Functions(client);
10+
11+
functions.getTemplate(
12+
"<TEMPLATE_ID>", // templateId
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
System.out.println(result);
20+
})
21+
);
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
8+
9+
Functions functions = new Functions(client);
10+
11+
functions.listTemplates(
12+
listOf(), // runtimes (optional)
13+
listOf(), // useCases (optional)
14+
1, // limit (optional)
15+
0, // offset (optional)
16+
new CoroutineCallback<>((result, error) -> {
17+
if (error != null) {
18+
error.printStackTrace();
19+
return;
20+
}
21+
22+
System.out.println(result);
23+
})
24+
);
25+

docs/examples/kotlin/account/delete-mfa-authenticator.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ val client = Client()
1111
val account = Account(client)
1212

1313
val response = account.deleteMfaAuthenticator(
14-
type = AuthenticatorType.TOTP,
15-
otp = "<OTP>"
14+
type = AuthenticatorType.TOTP
1615
)

docs/examples/kotlin/functions/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ val response = functions.create(
3131
templateRepository = "<TEMPLATE_REPOSITORY>", // optional
3232
templateOwner = "<TEMPLATE_OWNER>", // optional
3333
templateRootDirectory = "<TEMPLATE_ROOT_DIRECTORY>", // optional
34-
templateBranch = "<TEMPLATE_BRANCH>" // optional
34+
templateVersion = "<TEMPLATE_VERSION>" // optional
3535
)

docs/examples/kotlin/functions/download-deployment.md docs/examples/kotlin/functions/get-deployment-download.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import io.appwrite.services.Functions
55
val client = Client()
66
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
77
.setProject("&lt;YOUR_PROJECT_ID&gt;") // Your project ID
8-
.setKey("&lt;YOUR_API_KEY&gt;") // Your secret API key
8+
.setSession("") // The user session to authenticate with
99

1010
val functions = Functions(client)
1111

12-
val result = functions.downloadDeployment(
12+
val result = functions.getDeploymentDownload(
1313
functionId = "<FUNCTION_ID>",
1414
deploymentId = "<DEPLOYMENT_ID>"
1515
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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("&lt;YOUR_PROJECT_ID&gt;") // Your project ID
8+
9+
val functions = Functions(client)
10+
11+
val response = functions.getTemplate(
12+
templateId = "<TEMPLATE_ID>"
13+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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("&lt;YOUR_PROJECT_ID&gt;") // Your project ID
8+
9+
val functions = Functions(client)
10+
11+
val response = functions.listTemplates(
12+
runtimes = listOf(), // optional
13+
useCases = listOf(), // optional
14+
limit = 1, // optional
15+
offset = 0 // optional
16+
)

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ class Client @JvmOverloads constructor(
5757
init {
5858
headers = mutableMapOf(
5959
"content-type" to "application/json",
60-
"user-agent" to "AppwriteKotlinSDK/5.0.2 ${System.getProperty("http.agent")}",
60+
"user-agent" to "AppwriteKotlinSDK/6.0.0-rc.1 ${System.getProperty("http.agent")}",
6161
"x-sdk-name" to "Kotlin",
6262
"x-sdk-platform" to "server",
6363
"x-sdk-language" to "kotlin",
64-
"x-sdk-version" to "5.0.2",
65-
"x-appwrite-response-format" to "1.5.0",
64+
"x-sdk-version" to "6.0.0-rc.1",
65+
"x-appwrite-response-format" to "1.6.0",
6666
)
6767

6868
config = mutableMapOf()

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

+8
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ data class Execution(
103103
@SerializedName("duration")
104104
val duration: Double,
105105

106+
/**
107+
* The scheduled time for execution. If left empty, execution will be queued immediately.
108+
*/
109+
@SerializedName("scheduledAt")
110+
var scheduledAt: String?,
111+
106112
) {
107113
fun toMap(): Map<String, Any> = mapOf(
108114
"\$id" to id as Any,
@@ -121,6 +127,7 @@ data class Execution(
121127
"logs" to logs as Any,
122128
"errors" to errors as Any,
123129
"duration" to duration as Any,
130+
"scheduledAt" to scheduledAt as Any,
124131
)
125132

126133
companion object {
@@ -145,6 +152,7 @@ data class Execution(
145152
logs = map["logs"] as String,
146153
errors = map["errors"] as String,
147154
duration = (map["duration"] as Number).toDouble(),
155+
scheduledAt = map["scheduledAt"] as? String?,
148156
)
149157
}
150158
}

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

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ data class Runtime(
1313
@SerializedName("\$id")
1414
val id: String,
1515

16+
/**
17+
* Parent runtime key.
18+
*/
19+
@SerializedName("key")
20+
val key: String,
21+
1622
/**
1723
* Runtime Name.
1824
*/
@@ -52,6 +58,7 @@ data class Runtime(
5258
) {
5359
fun toMap(): Map<String, Any> = mapOf(
5460
"\$id" to id as Any,
61+
"key" to key as Any,
5562
"name" to name as Any,
5663
"version" to version as Any,
5764
"base" to base as Any,
@@ -67,6 +74,7 @@ data class Runtime(
6774
map: Map<String, Any>,
6875
) = Runtime(
6976
id = map["\$id"] as String,
77+
key = map["key"] as String,
7078
name = map["name"] as String,
7179
version = map["version"] as String,
7280
base = map["base"] as String,

0 commit comments

Comments
 (0)