Skip to content

Commit 219f7c7

Browse files
authored
Merge pull request #49 from appwrite/dev
Dev
2 parents e84b6a1 + 3ea72af commit 219f7c7

File tree

136 files changed

+4030
-232
lines changed

Some content is hidden

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

136 files changed

+4030
-232
lines changed

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-1.6.2-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.7.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.6.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.7.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:8.0.0")
42+
implementation("io.appwrite:sdk-for-kotlin:9.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>8.0.0</version>
53+
<version>9.0.0</version>
5454
</dependency>
5555
</dependencies>
5656
```

docs/examples/java/avatars/get-browser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ avatars.getBrowser(
1414
Browser.AVANT_BROWSER, // code
1515
0, // width (optional)
1616
0, // height (optional)
17-
0, // quality (optional)
17+
-1, // quality (optional)
1818
new CoroutineCallback<>((result, error) -> {
1919
if (error != null) {
2020
error.printStackTrace();

docs/examples/java/avatars/get-credit-card.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ avatars.getCreditCard(
1414
CreditCard.AMERICAN_EXPRESS, // code
1515
0, // width (optional)
1616
0, // height (optional)
17-
0, // quality (optional)
17+
-1, // quality (optional)
1818
new CoroutineCallback<>((result, error) -> {
1919
if (error != null) {
2020
error.printStackTrace();

docs/examples/java/avatars/get-flag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ avatars.getFlag(
1414
Flag.AFGHANISTAN, // code
1515
0, // width (optional)
1616
0, // height (optional)
17-
0, // quality (optional)
17+
-1, // quality (optional)
1818
new CoroutineCallback<>((result, error) -> {
1919
if (error != null) {
2020
error.printStackTrace();

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import io.appwrite.services.Databases;
44

55
Client client = new Client()
66
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7-
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8-
.setSession(""); // The user session to authenticate with
7+
.setSession("") // The user session to authenticate with
8+
.setKey("<YOUR_API_KEY>") // Your secret API key
9+
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
910

1011
Databases databases = new Databases(client);
1112

Lines changed: 24 additions & 0 deletions
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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setKey("<YOUR_API_KEY>"); // Your secret API key
8+
9+
Databases databases = new Databases(client);
10+
11+
databases.createDocuments(
12+
"<DATABASE_ID>", // databaseId
13+
"<COLLECTION_ID>", // collectionId
14+
listOf(), // documents
15+
new CoroutineCallback<>((result, error) -> {
16+
if (error != null) {
17+
error.printStackTrace();
18+
return;
19+
}
20+
21+
System.out.println(result);
22+
})
23+
);
24+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ databases.createIndex(
1717
IndexType.KEY, // type
1818
listOf(), // attributes
1919
listOf(), // orders (optional)
20+
listOf(), // lengths (optional)
2021
new CoroutineCallback<>((result, error) -> {
2122
if (error != null) {
2223
error.printStackTrace();
Lines changed: 25 additions & 0 deletions
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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.deleteDocuments(
13+
"<DATABASE_ID>", // databaseId
14+
"<COLLECTION_ID>", // collectionId
15+
listOf(), // queries (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+
Lines changed: 26 additions & 0 deletions
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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.updateDocuments(
13+
"<DATABASE_ID>", // databaseId
14+
"<COLLECTION_ID>", // collectionId
15+
mapOf( "a" to "b" ), // data (optional)
16+
listOf(), // queries (optional)
17+
new CoroutineCallback<>((result, error) -> {
18+
if (error != null) {
19+
error.printStackTrace();
20+
return;
21+
}
22+
23+
System.out.println(result);
24+
})
25+
);
26+
Lines changed: 25 additions & 0 deletions
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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
.setKey("<YOUR_API_KEY>"); // Your secret API key
9+
10+
Databases databases = new Databases(client);
11+
12+
databases.upsertDocuments(
13+
"<DATABASE_ID>", // databaseId
14+
"<COLLECTION_ID>", // collectionId
15+
listOf(), // documents (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+

0 commit comments

Comments
 (0)