cknewsletter hook offers two methods: subscribe and pushSlug. These methods allow the user to pass subscribe, slug and project API to cknewsletter service.
Note: this package is intend to be used with https://cknewsletter.tech
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm install cknewsletter_hook
// ES6 syntax
import { subscribe } from "cknewsletter_hook";
// ES5 syntax
var cknewsletter_hook = require("cknewsletter_hook");
cknewsletter_hook.subscribe(<subscriber-email>, <project-API-key>);
// Pass required data subscriber email and project API key
// ES6 syntax
import { pushSlug } from "cknewsletter_hook";
// ES5 syntax
var cknewsletter_hook = require("cknewsletter_hook");
cknewsletter_hook.pushSlug(<slug-or-item-id>, <project-API-key>);
// Pass required data slug or item id and project API key