Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.65 KB

README.md

File metadata and controls

60 lines (40 loc) · 1.65 KB

cknewsletter_hook

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

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install cknewsletter_hook

Usage

Simple Usage subscribe (Send subscriber email to project)

  // 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

Simple Usage pushSlug (Send slug or item id to project)

  // 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

License

MIT License

Author

Chetan Kumar (twitter)