This library provides convenient access to the JoinJoaomgcd REST API from TypeScript or JavaScript.
const client = new JoinJoaomgcd(YOUR_API_KEY);
const devices = await client.listDevices();
const send = await client.sendPush({
deviceId: SPECIFIC_DEVICE_ID,
title: 'send',
text: 'test',
});
const sendAll = await client.sendPush({
deviceId: 'group.all',
title: 'all',
text: 'test',
});
const sendIds = await client.sendPushWithIds({
deviceIds: devices.map((device) => device.deviceId),
title: 'ids',
text: 'test',
});