```swift import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID let documentsDB = DocumentsDB(client) let document = try await documentsDB.decrementDocumentAttribute( databaseId: "", collectionId: "", documentId: "", attribute: "", value: 1, // optional min: 0, // optional transactionId: "" // optional ) ```