Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pushwoosh-client

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pushwoosh-client

A node js client to consume the Pushwoosh API to send push notifications to mobile devices

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

pushwoosh-node-client Build Status

A node js client to consume the Pushwoosh API to send push notifications to mobile devices

Installation

npm i pushwoosh-client --save

Usage

Send messages to all devices

var Pushwoosh = require('pushwoosh-client');
var client= new Pushwoosh("AppCode", "AuthToken");

client.sendMessage('Hello world', function(error, response) {
     if (error) {
        console.log('Some error occurs: ', error);
     }

     console.log('Pushwoosh API response is', response);
}
});

To send messages to a specificed device or devices, you can pass a device token or an arrays with devices

// Push to a device
client.sendMessage('Hello world', 'device token', function(error, response) {
     if (error) {
        console.log('Some error occurs: ', error);
     }
     console.log('Pushwoosh API response is', response);
}
});
// Push to multiple devices
client.sendMessage('Hello world', ['deviceToken1', 'deivceToken2'], function(error, response) {
     if (error) {
        console.log('Some error occurs: ', error);
     }
     console.log('Pushwoosh API response is', response);
}
});

Tests

npm test

Currently tests are all passed and with 100% coverage

Keywords

FAQs

Package last updated on 01 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc