0.1.2 • Published 8 years ago

boxcar-notification v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

boxcar-notification Build Status

boxcar api notification library

Install

$ npm install boxcar-notification

Usage

First, prepare boxcar api token from here

import BoxcarNotification from 'boxcar-notification';
let bn = new BoxcarNotification('API_TOKEN');

let notification = bn.send({
    title: 'my first notification',
    longMessage: 'Hello!!'
});
notification.then((body) => {
    console.log('@body:', body);
}).catch((error) => {
    console.log('@error:', error);
});

Document

class BoxcarNotification

  • BoxcarNotification.constructor(API_TOKEN)

  • BoxcarNotification.VALID_SOUNDS

  • BoxcarNotification.API_URL

instance of BoxcarNotification: bn

  • bn.send(options) => Promise:notification

  • options.title

  • options.longMessage
  • options.sound
  • options.sourceName
  • options.iconUrl

  • notification.then(body)

  • notification.catch(error)
0.1.2

8 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago