Noodles Practicing Medicine
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

pusha

1.0.5 • Public • Published

Pusha Node Package

This Node package provides a simplified way to interact with the Pusha API.

Documentation

See the full documentation on Pusha's documentation.

Installation

npm install --save pusha

Requirements

Usage

This library needs to be configured with your API Key which can be found here.

const pusha = require('pusha')('YOUR_API_KEY');

Basic example

The user token is needed from every user you wanna send notifications to. They can find it here.

const pusha = require('pusha')('YOUR_API_KEY');
 
pusha.send({
    recipients: ['USER_TOKEN_1', 'USER_TOKEN_2'],
    message: 'hello from node'
}).then(response => {
    console.log(response)
}).catch(error => {
    console.error(error)
})
 

install

npm i pusha

Downloadsweekly downloads

11

version

1.0.5

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability