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 1
1
# Change Log
2
2
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
+
3
14
## 8.0.0
4
15
5
16
* Add ` token ` param to ` getFilePreview ` and ` getFileView ` for File tokens usage
6
17
* Update default ` quality ` for ` getFilePreview ` from 0 to -1
7
18
* 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 2
2
3
3
![ Maven Central] ( https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square )
4
4
![ 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 )
6
6
[ ![ Build Status] ( https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square )] ( https://travis-ci.com/appwrite/sdk-generator )
7
7
[ ![ Twitter Account] ( https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square )] ( https://twitter.com/appwrite )
8
8
[ ![ Discord] ( https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square )] ( https://appwrite.io/discord )
@@ -38,7 +38,7 @@ repositories {
38
38
Next, add the dependency to your project's ` build.gradle(.kts) ` file:
39
39
40
40
``` groovy
41
- implementation("io.appwrite:sdk-for-android:8.1 .0")
41
+ implementation("io.appwrite:sdk-for-android:8.2 .0")
42
42
```
43
43
44
44
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
49
49
<dependency >
50
50
<groupId >io.appwrite</groupId >
51
51
<artifactId >sdk-for-android</artifactId >
52
- <version >8.1 .0</version >
52
+ <version >8.2 .0</version >
53
53
</dependency >
54
54
</dependencies >
55
55
```
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ import io.appwrite.services.Databases;
4
4
5
5
Client client = new Client(context)
6
6
.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
10
8
11
9
Databases databases = new Databases(client);
12
10
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
4
4
5
5
val client = Client(context)
6
6
.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
10
8
11
9
val databases = Databases(client)
12
10
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(
87
87
" x-sdk-name" to " Android" ,
88
88
" x-sdk-platform" to " client" ,
89
89
" x-sdk-language" to " android" ,
90
- " x-sdk-version" to " 8.1 .0" ,
90
+ " x-sdk-version" to " 8.2 .0" ,
91
91
" x-appwrite-response-format" to " 1.7.0"
92
92
)
93
93
config = mutableMapOf ()
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ enum class ImageFormat(val value: String) {
14
14
@SerializedName(" heic" )
15
15
HEIC (" heic" ),
16
16
@SerializedName(" avif" )
17
- AVIF (" avif" );
17
+ AVIF (" avif" ),
18
+ @SerializedName(" gif" )
19
+ GIF (" gif" );
18
20
19
21
override fun toString () = value
20
22
}
You can’t perform that action at this time.
0 commit comments