controlshift-json-endpoints

1.0.1 • Public • Published

ControlShift API JSON endpoint

A tiny wrapper to the JSON endpoint of ContorlShift.

Internally uses axios

How to install

npm i -S controlshift-json-endpoint

How to use

Import into your project.

Example :

import controlshift from 'controlshift-json-endpoint'

const cs = controlshift('your-domain.controlshiftlabs.com)

cs gives access to each endpoint. Each function returns a promise. The resulting JSON data from ControlShift is directly accessible .

const slug = "my-petition-slug"
cs.petition(slug)
	.then( petition => console.log(petition) )
	.catch( (e) => console.log(e) )

/controlshift-json-endpoints/

    Package Sidebar

    Install

    npm i controlshift-json-endpoints

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    23.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • hponce