1.0.9 • Published 5 years ago

pollalot v1.0.9

Weekly downloads
40
License
-
Repository
-
Last release
5 years ago

Pollalot JS Client

Installation

We only support NPM package registry for now.

npm install pollalot

Usage

First you need to instantiate a client:

import Client from 'pollalot';

const client = new Client();
// Here you pass a token, you can retrieve it at your profile page
client.init('c44ab4114e3b9830035fb84d2f78ea51283c2787');

Then, when new user logs into your app, you need to set the current respondent by its email:

client.setRespondent('mike@gmail.com').then(canAsk => {
  // `canAsk` argument is a boolean which says whether the user agreed
  // to answer the questions.
  if (canAsk) {
    // Here you pass an ID of the questionnaire. You can get it on the
    // questionnaire list page.
    client.show('5d1d463d-c16b-4a8f-88fd-dcb237255a25');
  }
});
1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago