@knocklabs/node-sdk

0.1.0 • Public • Published

Knock Node SDK

Node client for interacting with the Knock API, designed to be integrated into your API.

Usage

const client = new Knock(apiKey, options);

client.identify({
  user_id: user.id,
  properties: {
    name: user.name,
    email: user.email,
  },
});

client.track({
  user_id: user.id,
  name: "NewComment",
  properties: {
    page_id: page._id,
    page_name: page.blocks[0].html.toString(),
    comment_text: commentText,
    comment_id: savedComment._id,
  },
  followers: page.followers,
});

Readme

Keywords

none

Package Sidebar

Install

npm i @knocklabs/node-sdk

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

4.07 kB

Total Files

3

Last publish

Collaborators

  • cjbell