Skip to content

Files

Latest commit

3dbec65 · Dec 10, 2024

History

History
30 lines (27 loc) · 992 Bytes

update-push.md

File metadata and controls

30 lines (27 loc) · 992 Bytes

const sdk = require('node-appwrite');

const client = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key

const messaging = new sdk.Messaging(client);

const result = await messaging.updatePush( '<MESSAGE_ID>', // messageId [], // topics (optional) [], // users (optional) [], // targets (optional) '<TITLE>', // title (optional) '', // body (optional) {}, // data (optional) '', // action (optional) '[ID1:ID2]', // image (optional) '', // icon (optional) '', // sound (optional) '', // color (optional) '', // tag (optional) null, // badge (optional) false, // draft (optional) '', // scheduledAt (optional) false, // contentAvailable (optional) false, // critical (optional) sdk.MessagePriority.Normal // priority (optional) );