Skip to content

Commit

Permalink
Merge pull request #29 from appwrite/dev
Browse files Browse the repository at this point in the history
update to appwrite 1.3.0
  • Loading branch information
abnegate authored Apr 12, 2023
2 parents de62212 + 4764612 commit cb25bce
Show file tree
Hide file tree
Showing 61 changed files with 1,832 additions and 557 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 Appwrite (https://appwrite.io) and individual contributors.
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

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

**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).**
**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).**

> 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)
Expand Down 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:1.2.0")
implementation("io.appwrite:sdk-for-kotlin:2.0.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>1.2.0</version>
<version>2.0.0</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "org.jetbrains.kotlin.jvm" version '1.6.10'
id "org.jetbrains.kotlin.jvm" version '1.8.0'
id "java-library"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/account/update-password.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Client client = new Client()
Account account = new Account(client);

account.updatePassword(
"password",
"",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
25 changes: 25 additions & 0 deletions docs/examples/java/databases/create-relationship-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.createRelationshipAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[RELATED_COLLECTION_ID]",
"oneToOne",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
2 changes: 1 addition & 1 deletion docs/examples/java/databases/get-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Databases databases = new Databases(client);
databases.getDocument(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
"[DOCUMENT_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
26 changes: 26 additions & 0 deletions docs/examples/java/databases/update-boolean-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateBooleanAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
false
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
26 changes: 26 additions & 0 deletions docs/examples/java/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateDatetimeAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
""
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
26 changes: 26 additions & 0 deletions docs/examples/java/databases/update-email-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateEmailAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
"email@example.com"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
27 changes: 27 additions & 0 deletions docs/examples/java/databases/update-enum-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateEnumAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
listOf(),
false,
"[DEFAULT]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
28 changes: 28 additions & 0 deletions docs/examples/java/databases/update-float-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateFloatAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
0,
0,
0
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
28 changes: 28 additions & 0 deletions docs/examples/java/databases/update-integer-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateIntegerAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
0,
0,
0
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
26 changes: 26 additions & 0 deletions docs/examples/java/databases/update-ip-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateIpAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
""
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
24 changes: 24 additions & 0 deletions docs/examples/java/databases/update-relationship-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateRelationshipAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
26 changes: 26 additions & 0 deletions docs/examples/java/databases/update-string-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateStringAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
"[DEFAULT]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
26 changes: 26 additions & 0 deletions docs/examples/java/databases/update-url-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;

Client client = new Client()
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key

Databases databases = new Databases(client);

databases.updateUrlAttribute(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"",
false,
"https://example.com"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

System.out.println(result);
})
);
1 change: 0 additions & 1 deletion docs/examples/java/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Functions functions = new Functions(client);
functions.create(
"[FUNCTION_ID]",
"[NAME]",
listOf("any"),
"node-14.5",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
1 change: 0 additions & 1 deletion docs/examples/java/functions/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Functions functions = new Functions(client);
functions.update(
"[FUNCTION_ID]",
"[NAME]",
listOf("any"),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 0 additions & 1 deletion docs/examples/java/teams/create-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Teams teams = new Teams(client);

teams.createMembership(
"[TEAM_ID]",
"email@example.com",
listOf(),
"https://example.com",
new CoroutineCallback<>((result, error) -> {
Expand Down
Loading

0 comments on commit cb25bce

Please sign in to comment.