Skip to content

Update attributes #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
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:6.0.0")
implementation("io.appwrite:sdk-for-kotlin:6.1.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>6.0.0</version>
<version>6.1.0</version>
</dependency>
</dependencies>
```
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ databases.updateBooleanAttribute(
"", // key
false, // required
false, // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ databases.updateDatetimeAttribute(
"", // key
false, // required
"", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ databases.updateEmailAttribute(
"", // key
false, // required
"email@example.com", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ databases.updateEnumAttribute(
listOf(), // elements
false, // required
"<DEFAULT>", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ databases.updateFloatAttribute(
0, // min
0, // max
0, // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ databases.updateIntegerAttribute(
0, // min
0, // max
0, // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-ip-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ databases.updateIpAttribute(
"", // key
false, // required
"", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ databases.updateRelationshipAttribute(
"<COLLECTION_ID>", // collectionId
"", // key
RelationMutate.CASCADE, // onDelete (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/java/databases/update-string-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ databases.updateStringAttribute(
"", // key
false, // required
"<DEFAULT>", // default
0, // size (optional)
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/databases/update-url-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ databases.updateUrlAttribute(
"", // key
false, // required
"https://example.com", // default
"", // newKey (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ val response = databases.updateBooleanAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = false
default = false,
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ val response = databases.updateDatetimeAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = ""
default = "",
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ val response = databases.updateEmailAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = "email@example.com"
default = "email@example.com",
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ val response = databases.updateEnumAttribute(
key = "",
elements = listOf(),
required = false,
default = "<DEFAULT>"
default = "<DEFAULT>",
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ val response = databases.updateFloatAttribute(
required = false,
min = 0,
max = 0,
default = 0
default = 0,
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ val response = databases.updateIntegerAttribute(
required = false,
min = 0,
max = 0,
default = 0
default = 0,
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-ip-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ val response = databases.updateIpAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = ""
default = "",
newKey = "" // optional
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ val response = databases.updateRelationshipAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
key = "",
onDelete = "cascade" // optional
onDelete = "cascade", // optional
newKey = "" // optional
)
4 changes: 3 additions & 1 deletion docs/examples/kotlin/databases/update-string-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ val response = databases.updateStringAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = "<DEFAULT>"
default = "<DEFAULT>",
size = 0, // optional
newKey = "" // optional
)
3 changes: 2 additions & 1 deletion docs/examples/kotlin/databases/update-url-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ val response = databases.updateUrlAttribute(
collectionId = "<COLLECTION_ID>",
key = "",
required = false,
default = "https://example.com"
default = "https://example.com",
newKey = "" // optional
)
4 changes: 2 additions & 2 deletions src/main/kotlin/io/appwrite/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ class Client @JvmOverloads constructor(
init {
headers = mutableMapOf(
"content-type" to "application/json",
"user-agent" to "AppwriteKotlinSDK/6.0.0 ${System.getProperty("http.agent")}",
"user-agent" to "AppwriteKotlinSDK/6.1.0 ${System.getProperty("http.agent")}",
"x-sdk-name" to "Kotlin",
"x-sdk-platform" to "server",
"x-sdk-language" to "kotlin",
"x-sdk-version" to "6.0.0",
"x-sdk-version" to "6.1.0",
"x-appwrite-response-format" to "1.6.0",
)

Expand Down
Loading