The ActivitySmith Node library provides convenient access to the ActivitySmith API from server-side JavaScript and TypeScript applications.
See API reference
npm install activitysmithESM:
import ActivitySmith from "activitysmith";
const client = new ActivitySmith({
apiKey: process.env.ACTIVITYSMITH_API_KEY,
});
// Push Notifications
await client.notifications.sendPushNotification({
pushNotificationRequest: {
// See PushNotificationRequest for fields
},
});
// Live Activities
await client.liveActivities.startLiveActivity({
liveActivityStartRequest: {
// See LiveActivityStartRequest for fields
},
});CommonJS:
const ActivitySmith = require("activitysmith");
const client = new ActivitySmith({
apiKey: process.env.ACTIVITYSMITH_API_KEY,
});The client exposes grouped resources:
client.liveActivitiesclient.notifications
Each method is fully typed. Request and response types are included in the type definitions.
This package is written in TypeScript and ships with type definitions out of the box.
- Node.js 18 or newer
MIT