A simple wrapper for the inRiver IPMC REST API.
// npm
npm i inriverjs
// yarn
yarn add inriverjs
- Create the context with an initial setup of a key and Endpoint ๐
import InRiverAPIClient from "inriverjs";
const inRiverApi = new InRiverAPIClient(
"YOUR-API-KEY-HERE",
"https://partnerapieuw.productmarketingcloud.com"
);
- Use the API ๐
inRiverApi.Model.getCVLValue("ActivityStatus")
.then((result) => {
console.log(result.data);
});
Display all Roles in the IPMC environment:
inRiverApi.System.Roles()
.then((result) => {
result.data.forEach((role) => {
console.log(role.name);
console.log(role.description);
});
}).catch((error) => {
console.error(error);
});
Get entity summary:
inRiverApi.Entities.GetEntitySummary(1)
.then((result) => {
console.log(result.data.createdBy);
console.log(result.data.displayName);
}).catch((error) => {
console.error(error);
});
If you would like to support me for more inRiver Open Source tools.