appwrite/docs/examples/1.5.x/server-swift/examples/databases/create-integer-attribute.md

21 lines
548 B
Markdown
Raw Normal View History

2024-02-05 12:40:51 +00:00
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
let databases = Databases(client)
let attributeInteger = try await databases.createIntegerAttribute(
2024-02-24 11:34:42 +00:00
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
2024-02-05 12:40:51 +00:00
key: "",
2024-02-21 11:31:50 +00:00
required: false,
min: 0, // optional
max: 0, // optional
default: 0, // optional
array: false // optional
2024-02-05 12:40:51 +00:00
)