Skip to content

Commit 29c138e

Browse files
fix: string attribute class
1 parent 6e3a48c commit 29c138e

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.12.0-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-0.12.1-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

@@ -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.2.0")
42+
implementation("io.appwrite:sdk-for-kotlin:0.2.1")
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.2.0</version>
53+
<version>0.2.1</version>
5454
</dependency>
5555
</dependencies>
5656
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
ext {
77
PUBLISH_GROUP_ID = 'io.appwrite'
88
PUBLISH_ARTIFACT_ID = 'sdk-for-kotlin'
9-
PUBLISH_VERSION = '0.2.0'
9+
PUBLISH_VERSION = '0.2.1'
1010
POM_URL = 'https://github.com/appwrite/sdk-for-kotlin'
1111
POM_SCM_URL = 'https://github.com/appwrite/sdk-for-kotlin'
1212
POM_ISSUE_URL = 'https://github.com/appwrite/sdk-for-kotlin/issues'

src/main/kotlin/io/appwrite/Client.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Client @JvmOverloads constructor(
5555
init {
5656
headers = mutableMapOf(
5757
"content-type" to "application/json",
58-
"x-sdk-version" to "appwrite:kotlin:0.2.0",
58+
"x-sdk-version" to "appwrite:kotlin:0.2.1",
5959
"x-appwrite-response-format" to "0.12.0"
6060
)
6161
config = mutableMapOf()

src/main/kotlin/io/appwrite/models/AttributeString.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ data class AttributeString(
77
val status: String,
88
val required: Boolean,
99
var array: Boolean?,
10-
val size: String,
10+
val size: Long,
1111
var default: String?
1212
) {
1313
companion object {
@@ -17,7 +17,7 @@ data class AttributeString(
1717
status = map["status"] as String,
1818
required = map["required"] as Boolean,
1919
array = map["array"] as? Boolean,
20-
size = map["size"] as String,
20+
size = map["size"] as Long,
2121
default = map["default"] as? String
2222
)
2323
}

src/main/kotlin/io/appwrite/services/Account.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ class Account(client: Client) : Service(client) {
249249
/**
250250
* Update Account Preferences
251251
*
252-
* Update currently logged in user account preferences. You can pass only the
253-
* specific settings you wish to update.
252+
* Update currently logged in user account preferences. The object you pass is
253+
* stored as is, and replaces any previous value. The maximum allowed prefs
254+
* size is 64kB and throws error if exceeded.
254255
*
255256
* @param prefs Prefs key-value JSON object.
256257
* @return [io.appwrite.models.User]

src/main/kotlin/io/appwrite/services/Database.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ class Database(client: Client) : Service(client) {
740740
* integration](/docs/server/database#databaseCreateCollection) API or
741741
* directly from your database console.
742742
*
743-
* @param collectionId Collection ID. You can create a new collection with validation rules using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).
743+
* @param collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.
744744
* @param documentId Document ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
745745
* @param data Document data as JSON object.
746746
* @param read An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.
@@ -820,7 +820,7 @@ class Database(client: Client) : Service(client) {
820820
* Update a document by its unique ID. Using the patch method you can pass
821821
* only specific fields that will get updated.
822822
*
823-
* @param collectionId Collection ID. You can create a new collection with validation rules using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).
823+
* @param collectionId Collection ID.
824824
* @param documentId Document ID.
825825
* @param data Document data as JSON object.
826826
* @param read An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.

src/main/kotlin/io/appwrite/services/Users.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ class Users(client: Client) : Service(client) {
337337
/**
338338
* Update User Preferences
339339
*
340-
* Update the user preferences by its unique ID. You can pass only the
341-
* specific settings you wish to update.
340+
* Update the user preferences by its unique ID. The object you pass is stored
341+
* as is, and replaces any previous value. The maximum allowed prefs size is
342+
* 64kB and throws error if exceeded.
342343
*
343344
* @param userId User ID.
344345
* @param prefs Prefs key-value JSON object.

0 commit comments

Comments
 (0)