0.1.7 • Published 7 years ago

notiflare-client v0.1.7

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Notiflare JS Client

Provides functionality for receiving and handling Notiflare's presence-aware notifications.

Quick-Start

Install with npm install --save notiflare-client.

Usage

import { NotiflareClient } from 'notiflare-client';

let config = {
    //Your public API Key.
    apiKey: 'API_KEY',

    //A default handler for notifications.
    defaultReceiver: (data) => {
        console.log(data);
    },

    //The URL to an identification endpoint on your backend.
    identifyUrl: 'backend.com/identify'
};

//Initialize the client.
let client = new NotiflareClient(config);

//OPTIONAL: Register for non-default notifications.
client.register('myHandler', (data) => {
    //Do something with your notification.
});

//Begin listening for notifications.
client.start();
0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago