Skip to content

Commit 9ffe885

Browse files
Merge pull request #25 from appwrite/dev
updated to support 1.0.0-RC1
2 parents a1564ee + f112351 commit 9ffe885

File tree

144 files changed

+2622
-698
lines changed

Some content is hidden

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

144 files changed

+2622
-698
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
99

1010
3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1111

12-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 4 additions & 4 deletions
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-0.15.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.0.0-RC1-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 0.15.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.0.0-RC1. 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:0.6.0")
42+
implementation("io.appwrite:sdk-for-kotlin:1.0.0-SNAPSHOT")
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>0.6.0</version>
53+
<version>1.0.0-SNAPSHOT</version>
5454
</dependency>
5555
</dependencies>
5656
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public void main() {
99

1010
Account account = new Account(client);
1111
account.updatePhone(
12-
number = "",
12+
phone = "",
1313
password = "password"
1414
new Continuation<Response>() {
1515
@NotNull

docs/examples/java/databases/create-boolean-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ public void main() {
77
.setProject("5df5acd0d48c2") // Your project ID
88
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
99

10-
Databases databases = new Databases(client, "[DATABASE_ID]");
10+
Databases databases = new Databases(client);
1111
databases.createBooleanAttribute(
12+
databaseId = "[DATABASE_ID]",
1213
collectionId = "[COLLECTION_ID]",
1314
key = "",
1415
required = false,

docs/examples/java/databases/create-collection.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ public void main() {
77
.setProject("5df5acd0d48c2") // Your project ID
88
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
99

10-
Databases databases = new Databases(client, "[DATABASE_ID]");
10+
Databases databases = new Databases(client);
1111
databases.createCollection(
12+
databaseId = "[DATABASE_ID]",
1213
collectionId = "[COLLECTION_ID]",
1314
name = "[NAME]",
14-
permission = "document",
15-
read = ["role:all"],
16-
write = ["role:all"]
1715
new Continuation<Response>() {
1816
@NotNull
1917
@Override
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import io.appwrite.Client
2+
import io.appwrite.services.Databases
3+
4+
public void main() {
5+
Client client = Client(context)
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+
databases.createDatetimeAttribute(
12+
databaseId = "[DATABASE_ID]",
13+
collectionId = "[COLLECTION_ID]",
14+
key = "",
15+
required = false,
16+
new Continuation<Response>() {
17+
@NotNull
18+
@Override
19+
public CoroutineContext getContext() {
20+
return EmptyCoroutineContext.INSTANCE;
21+
}
22+
23+
@Override
24+
public void resumeWith(@NotNull Object o) {
25+
String json = "";
26+
try {
27+
if (o instanceof Result.Failure) {
28+
Result.Failure failure = (Result.Failure) o;
29+
throw failure.exception;
30+
} else {
31+
Response response = (Response) o;
32+
}
33+
} catch (Throwable th) {
34+
Log.e("ERROR", th.toString());
35+
}
36+
}
37+
}
38+
);
39+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ public void main() {
77
.setProject("5df5acd0d48c2") // Your project ID
88
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
99

10-
Databases databases = new Databases(client, "[DATABASE_ID]");
10+
Databases databases = new Databases(client);
1111
databases.createDocument(
12+
databaseId = "[DATABASE_ID]",
1213
collectionId = "[COLLECTION_ID]",
1314
documentId = "[DOCUMENT_ID]",
1415
data = mapOf( "a" to "b" ),

docs/examples/java/databases/create-email-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ public void main() {
77
.setProject("5df5acd0d48c2") // Your project ID
88
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
99

10-
Databases databases = new Databases(client, "[DATABASE_ID]");
10+
Databases databases = new Databases(client);
1111
databases.createEmailAttribute(
12+
databaseId = "[DATABASE_ID]",
1213
collectionId = "[COLLECTION_ID]",
1314
key = "",
1415
required = false,

docs/examples/java/databases/create-enum-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ public void main() {
77
.setProject("5df5acd0d48c2") // Your project ID
88
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
99

10-
Databases databases = new Databases(client, "[DATABASE_ID]");
10+
Databases databases = new Databases(client);
1111
databases.createEnumAttribute(
12+
databaseId = "[DATABASE_ID]",
1213
collectionId = "[COLLECTION_ID]",
1314
key = "",
1415
elements = listOf(),

docs/examples/java/databases/create-float-attribute.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ public void main() {
77
.setProject("5df5acd0d48c2") // Your project ID
88
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key
99

10-
Databases databases = new Databases(client, "[DATABASE_ID]");
10+
Databases databases = new Databases(client);
1111
databases.createFloatAttribute(
12+
databaseId = "[DATABASE_ID]",
1213
collectionId = "[COLLECTION_ID]",
1314
key = "",
1415
required = false,

0 commit comments

Comments
 (0)