Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@stack-finance/moengage-sdk
Advanced tools
An API to API NodeJS SDK for MoEngage.
You will need an account on MoEngage to make successful method calls from this package, obviously.
You will also need the API ID
and API Key
for your account, which can be obtained from
Dashboard -> Settings -> APIs
npm i @stack-finance/moengage-sdk
import { MoEngage } from '@stack-finance/moengage-sdk';
const moengage = new MoEngage(
'<API ID>',
'<API Key>',
'<Data Center - Only "01", "02" and "03" are valid values>');
const res = await MoengageSDK.triggerEvent({
"type": "event",
"customer_id": "john@example.com",
"device_id": "96bd03b6-defc-4203-83d3-dc1c73080232",
"actions": [{
"action": "Added to Cart",
"attributes": {
"product": "Mobile",
"color": "white",
"Brand": "Apple"
},
"platform": "iOS",
"app_version": "1.2.3",
"current_time": new Date().getTime() / 1000,
"user_timezone_offset": 19800
},
{
"action": "Purchase",
"attributes": {
"product": "MacBook Air",
"Brand": "Apple"
},
"platform": "web",
"app_version": "1.2.3",
"current_time": new Date().getTime() / 1000,
"user_timezone_offset": 19800
}
]
});
if (res.ok) {
console.log(await res.json());
} else {
// Errors are not handled in the package yet, for now you will have to handle this.
// We will implement error handlign in the future versions.
console.log(await res.text() || res.statusText());
}
FAQs
An API to API NodeJS SDK for MoEngage
We found that @stack-finance/moengage-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.