appwrite/docs/examples/1.5.x/server-deno/examples/databases/update-integer-attribute.md

19 lines
566 B
Markdown
Raw Normal View History

2024-02-21 11:31:50 +00:00
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
2024-02-05 12:40:51 +00:00
2024-02-21 11:31:50 +00:00
const client = new Client()
2024-02-05 12:40:51 +00:00
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
2024-02-21 11:31:50 +00:00
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
2024-02-05 12:40:51 +00:00
2024-02-21 11:31:50 +00:00
const databases = new Databases(client);
2024-02-05 12:40:51 +00:00
2024-02-21 11:31:50 +00:00
const response = await databases.updateIntegerAttribute(
2024-02-24 11:34:42 +00:00
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
2024-02-21 11:31:50 +00:00
'', // key
false, // required
null, // min
null, // max
null // default
);