appwrite/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-enum-attribute.md

21 lines
595 B
Markdown
Raw Normal View History

2024-07-03 15:25:40 +00:00
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
2024-07-03 15:25:40 +00:00
val databases = Databases(client)
val response = databases.updateEnumAttribute(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
key = "",
elements = listOf(),
required = false,
2024-09-09 08:38:15 +00:00
default = "<DEFAULT>",
newKey = "" // optional
2024-07-03 15:25:40 +00:00
)