This package has been deprecated

Author message:

The name of this package has been updated. Please use https://www.npmjs.com/package/unifiedpush-node-sender

aerogear-sender-client

0.5.1 • Public • Published

NOTE: THE NAME OF THIS PACKAGE HAS CHANGED, THE NEW PACKAGE IS LOCATED AT https://www.npmjs.org/package/unifiedpush-node-sender

aerogear-sender-client Build Status

Node Sender API for the AeroGear Unified Push server

Getting Started

Pre Reqs:

  • node.js
  • npm
  • git

Building

clone and install:

$ git@github.com:aerogear/aerogear-unifiedpush-nodejs-client.git

$ cd aerogear-unifiedpush-nodejs-client

$ npm install

Running Tests

$ npm test

Add to a Project

In your project do

npm install path/to/aerogear-unified-push-node-client

or

install from npm

npm install aerogear-sender-client

Examples

Require the aerogear-sender-client library

var agSender = require( "aerogear-sender-client" ).AeroGear,
    url = "http://localhost:8080/ag-push";

Send a Message

You can use either listen for the success and error events

agSender.Sender( url ).send( message, settings ).on( "success", function( response ) {
    console.log( "success called", response );
});

Or you can use a callback

agSender.Sender( url ).send( message, settings, function( err, response ) {
    if( !err ) {
        console.log( "success called", response );
        return;
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i aerogear-sender-client

Weekly Downloads

2

Version

0.5.1

License

none

Last publish

Collaborators

  • lholmquist