appwrite/docs/examples/1.3.x/server-swift/examples/databases/update-integer-attribute.md

20 lines
483 B
Markdown
Raw Normal View History

2023-04-11 13:23:29 +00:00
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
2023-04-11 13:23:29 +00:00
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
let databases = Databases(client)
let attributeInteger = try await databases.updateIntegerAttribute(
databaseId: "[DATABASE_ID]",
collectionId: "[COLLECTION_ID]",
key: "",
required: xfalse,
min: 0,
max: 0,
default: 0
)