Skip to content

Commit cb25bce

Browse files
authored
Merge pull request #29 from appwrite/dev
update to appwrite 1.3.0
2 parents de62212 + 4764612 commit cb25bce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1832
-557
lines changed

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
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.2.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.3.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

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

1111
> 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)
1212
@@ -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:1.2.0")
42+
implementation("io.appwrite:sdk-for-kotlin:2.0.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>1.2.0</version>
53+
<version>2.0.0</version>
5454
</dependency>
5555
</dependencies>
5656
```

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "org.jetbrains.kotlin.jvm" version '1.6.10'
2+
id "org.jetbrains.kotlin.jvm" version '1.8.0'
33
id "java-library"
44
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
55
}

docs/examples/java/account/update-password.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Client client = new Client()
1010
Account account = new Account(client);
1111

1212
account.updatePassword(
13-
"password",
13+
"",
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();
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.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.createRelationshipAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"[RELATED_COLLECTION_ID]",
16+
"oneToOne",
17+
new CoroutineCallback<>((result, error) -> {
18+
if (error != null) {
19+
error.printStackTrace();
20+
return;
21+
}
22+
23+
System.out.println(result);
24+
})
25+
);

docs/examples/java/databases/get-document.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Databases databases = new Databases(client);
1212
databases.getDocument(
1313
"[DATABASE_ID]",
1414
"[COLLECTION_ID]",
15-
"[DOCUMENT_ID]"
15+
"[DOCUMENT_ID]",
1616
new CoroutineCallback<>((result, error) -> {
1717
if (error != null) {
1818
error.printStackTrace();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateBooleanAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
false
18+
new CoroutineCallback<>((result, error) -> {
19+
if (error != null) {
20+
error.printStackTrace();
21+
return;
22+
}
23+
24+
System.out.println(result);
25+
})
26+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateDatetimeAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
""
18+
new CoroutineCallback<>((result, error) -> {
19+
if (error != null) {
20+
error.printStackTrace();
21+
return;
22+
}
23+
24+
System.out.println(result);
25+
})
26+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateEmailAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
18+
new CoroutineCallback<>((result, error) -> {
19+
if (error != null) {
20+
error.printStackTrace();
21+
return;
22+
}
23+
24+
System.out.println(result);
25+
})
26+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateEnumAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
listOf(),
17+
false,
18+
"[DEFAULT]"
19+
new CoroutineCallback<>((result, error) -> {
20+
if (error != null) {
21+
error.printStackTrace();
22+
return;
23+
}
24+
25+
System.out.println(result);
26+
})
27+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateFloatAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
0,
18+
0,
19+
0
20+
new CoroutineCallback<>((result, error) -> {
21+
if (error != null) {
22+
error.printStackTrace();
23+
return;
24+
}
25+
26+
System.out.println(result);
27+
})
28+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateIntegerAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
0,
18+
0,
19+
0
20+
new CoroutineCallback<>((result, error) -> {
21+
if (error != null) {
22+
error.printStackTrace();
23+
return;
24+
}
25+
26+
System.out.println(result);
27+
})
28+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateIpAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
""
18+
new CoroutineCallback<>((result, error) -> {
19+
if (error != null) {
20+
error.printStackTrace();
21+
return;
22+
}
23+
24+
System.out.println(result);
25+
})
26+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateRelationshipAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
new CoroutineCallback<>((result, error) -> {
17+
if (error != null) {
18+
error.printStackTrace();
19+
return;
20+
}
21+
22+
System.out.println(result);
23+
})
24+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateStringAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
"[DEFAULT]"
18+
new CoroutineCallback<>((result, error) -> {
19+
if (error != null) {
20+
error.printStackTrace();
21+
return;
22+
}
23+
24+
System.out.println(result);
25+
})
26+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Databases;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateUrlAttribute(
13+
"[DATABASE_ID]",
14+
"[COLLECTION_ID]",
15+
"",
16+
false,
17+
"https://example.com"
18+
new CoroutineCallback<>((result, error) -> {
19+
if (error != null) {
20+
error.printStackTrace();
21+
return;
22+
}
23+
24+
System.out.println(result);
25+
})
26+
);

docs/examples/java/functions/create.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Functions functions = new Functions(client);
1212
functions.create(
1313
"[FUNCTION_ID]",
1414
"[NAME]",
15-
listOf("any"),
1615
"node-14.5",
1716
new CoroutineCallback<>((result, error) -> {
1817
if (error != null) {

docs/examples/java/functions/update.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Functions functions = new Functions(client);
1212
functions.update(
1313
"[FUNCTION_ID]",
1414
"[NAME]",
15-
listOf("any"),
1615
new CoroutineCallback<>((result, error) -> {
1716
if (error != null) {
1817
error.printStackTrace();

docs/examples/java/teams/create-membership.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Teams teams = new Teams(client);
1111

1212
teams.createMembership(
1313
"[TEAM_ID]",
14-
1514
listOf(),
1615
"https://example.com",
1716
new CoroutineCallback<>((result, error) -> {

0 commit comments

Comments
 (0)