Skip to content

withgrayce/delighted-loader

Repository files navigation

delighted-loader

Async loader for the Delighted JS API written in typescript with promises.

This package makes no changes to the functionality of the Delighted JS API, it merely provides an easy way to load it asynchronously and then execute calls against the API in a Typescript project.

Installation

$ npm install --save delighted-loader

Usage

import { Delighted, Loader } from 'delighted-loader';

const loader = new Loader(yourApiToken);
loader.load().then((delighted: Delighted) => {
  delighted.survey({
    email: email,
    name: name,
    properties: {}
  });
});

The API only supports the survey call, which is documented here.

Options

The options accepted by the survey function conform to the documentation here.

About

A loader for using Delighted with React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published