File tree Expand file tree Collapse file tree 12 files changed +283
-14
lines changed
library/src/main/java/io/appwrite Expand file tree Collapse file tree 12 files changed +283
-14
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## 8.2.0
4+
5+ * Add ` incrementDocumentAttribute ` and ` decrementDocumentAttribute ` support to ` Databases ` service
6+ * Add ` gif ` support to ` ImageFormat ` enum
7+ * Add ` sequence ` support to ` Document ` model
8+
9+ ## 8.1.0
10+
11+ * Add ` devKeys ` support to ` Client ` service
12+ * Add ` upsertDocument ` support to ` Databases ` service
13+
314## 8.0.0
415
516* Add ` token ` param to ` getFilePreview ` and ` getFileView ` for File tokens usage
617* Update default ` quality ` for ` getFilePreview ` from 0 to -1
718* Remove ` Gif ` from ImageFormat enum
8- * Remove ` search ` param from ` listExecutions ` method
19+ * Remove ` search ` param from ` listExecutions ` method
20+
21+ ## 7.0.1
22+
23+ * Fix requests failing by removing ` Content-Type ` header from ` GET ` and ` HEAD ` requests
Original file line number Diff line number Diff line change 22
33![ Maven Central] ( https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square )
44![ License] ( https://img.shields.io/github/license/appwrite/sdk-for-android.svg?style=flat-square )
5- ![ Version] ( https://img.shields.io/badge/api%20version-1.7.0 -blue.svg?style=flat-square )
5+ ![ Version] ( https://img.shields.io/badge/api%20version-1.7.4 -blue.svg?style=flat-square )
66[ ![ Build Status] ( https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square )] ( https://travis-ci.com/appwrite/sdk-generator )
77[ ![ Twitter Account] ( https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square )] ( https://twitter.com/appwrite )
88[ ![ Discord] ( https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square )] ( https://appwrite.io/discord )
@@ -38,7 +38,7 @@ repositories {
3838Next, add the dependency to your project's ` build.gradle(.kts) ` file:
3939
4040``` groovy
41- implementation("io.appwrite:sdk-for-android:8.1 .0")
41+ implementation("io.appwrite:sdk-for-android:8.2 .0")
4242```
4343
4444### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
4949 <dependency >
5050 <groupId >io.appwrite</groupId >
5151 <artifactId >sdk-for-android</artifactId >
52- <version >8.1 .0</version >
52+ <version >8.2 .0</version >
5353 </dependency >
5454</dependencies >
5555```
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ import io.appwrite.services.Databases;
44
55Client client = new Client(context)
66 .setEndpoint("https://<REGION >.cloud.appwrite.io/v1") // Your API Endpoint
7- .setSession("") // The user session to authenticate with
8- .setKey("") //
9- .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
7+ .setProject("<YOUR_PROJECT_ID>"); // Your project ID
108
119Databases databases = new Databases(client);
1210
Original file line number Diff line number Diff line change 1+ import io.appwrite.Client;
2+ import io.appwrite.coroutines.CoroutineCallback;
3+ import io.appwrite.services.Databases;
4+
5+ Client client = new Client(context)
6+ .setEndpoint("https://<REGION >.cloud.appwrite.io/v1") // Your API Endpoint
7+ .setProject("<YOUR_PROJECT_ID>"); // Your project ID
8+
9+ Databases databases = new Databases(client);
10+
11+ databases.decrementDocumentAttribute(
12+ "<DATABASE_ID>", // databaseId
13+ "<COLLECTION_ID>", // collectionId
14+ "<DOCUMENT_ID>", // documentId
15+ "", // attribute
16+ 0, // value (optional)
17+ 0, // min (optional)
18+ new CoroutineCallback<>((result, error) -> {
19+ if (error != null) {
20+ error.printStackTrace();
21+ return;
22+ }
23+
24+ Log.d("Appwrite", result.toString());
25+ })
26+ );
27+
Original file line number Diff line number Diff line change 1+ import io.appwrite.Client;
2+ import io.appwrite.coroutines.CoroutineCallback;
3+ import io.appwrite.services.Databases;
4+
5+ Client client = new Client(context)
6+ .setEndpoint("https://<REGION >.cloud.appwrite.io/v1") // Your API Endpoint
7+ .setProject("<YOUR_PROJECT_ID>"); // Your project ID
8+
9+ Databases databases = new Databases(client);
10+
11+ databases.incrementDocumentAttribute(
12+ "<DATABASE_ID>", // databaseId
13+ "<COLLECTION_ID>", // collectionId
14+ "<DOCUMENT_ID>", // documentId
15+ "", // attribute
16+ 0, // value (optional)
17+ 0, // max (optional)
18+ new CoroutineCallback<>((result, error) -> {
19+ if (error != null) {
20+ error.printStackTrace();
21+ return;
22+ }
23+
24+ Log.d("Appwrite", result.toString());
25+ })
26+ );
27+
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ import io.appwrite.services.Databases
44
55val client = Client(context)
66 .setEndpoint("https://<REGION >.cloud.appwrite.io/v1") // Your API Endpoint
7- .setSession("") // The user session to authenticate with
8- .setKey("") //
9- .setJWT("<YOUR_JWT>") // Your secret JSON Web Token
7+ .setProject("<YOUR_PROJECT_ID>") // Your project ID
108
119val databases = Databases(client)
1210
Original file line number Diff line number Diff line change 1+ import io.appwrite.Client
2+ import io.appwrite.coroutines.CoroutineCallback
3+ import io.appwrite.services.Databases
4+
5+ val client = Client(context)
6+ .setEndpoint("https://<REGION >.cloud.appwrite.io/v1") // Your API Endpoint
7+ .setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
9+ val databases = Databases(client)
10+
11+ val result = databases.decrementDocumentAttribute(
12+ databaseId = "<DATABASE_ID>",
13+ collectionId = "<COLLECTION_ID>",
14+ documentId = "<DOCUMENT_ID>",
15+ attribute = "",
16+ value = 0, // (optional)
17+ min = 0, // (optional)
18+ )
Original file line number Diff line number Diff line change 1+ import io.appwrite.Client
2+ import io.appwrite.coroutines.CoroutineCallback
3+ import io.appwrite.services.Databases
4+
5+ val client = Client(context)
6+ .setEndpoint("https://<REGION >.cloud.appwrite.io/v1") // Your API Endpoint
7+ .setProject("<YOUR_PROJECT_ID>") // Your project ID
8+
9+ val databases = Databases(client)
10+
11+ val result = databases.incrementDocumentAttribute(
12+ databaseId = "<DATABASE_ID>",
13+ collectionId = "<COLLECTION_ID>",
14+ documentId = "<DOCUMENT_ID>",
15+ attribute = "",
16+ value = 0, // (optional)
17+ max = 0, // (optional)
18+ )
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class Client @JvmOverloads constructor(
8787 " x-sdk-name" to " Android" ,
8888 " x-sdk-platform" to " client" ,
8989 " x-sdk-language" to " android" ,
90- " x-sdk-version" to " 8.1 .0" ,
90+ " x-sdk-version" to " 8.2 .0" ,
9191 " x-appwrite-response-format" to " 1.7.0"
9292 )
9393 config = mutableMapOf ()
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ enum class ImageFormat(val value: String) {
1414 @SerializedName(" heic" )
1515 HEIC (" heic" ),
1616 @SerializedName(" avif" )
17- AVIF (" avif" );
17+ AVIF (" avif" ),
18+ @SerializedName(" gif" )
19+ GIF (" gif" );
1820
1921 override fun toString () = value
2022}
You can’t perform that action at this time.
0 commit comments