node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org ยป

push-it-client

Push It - node redis client

Node client for the Push It Worker.

Installation

npm install push-it-client

Example

var redis = require("redis");
var redisClient = redis.createClient();
var pushiItClient = require("push-it-client");

redisClient.select(1);

var client = new pushiItClient(redisClient);
var application = 'testPushMay-sandbox';
var pathPhrase = '';

// Send a push
client.sendIOS(application, pathPhrase, ["YOUR_DEVICE_TOKEN", "YOUR_OTHER_DEVICE_TOKEN"], "Hello world", 1, "default", {}, function(err, result){

});

// Get a feedback from apple
client.getIosDevicesToRemove(application, function(err, result){

    // Delete the feedback after reading
    client.delApnsFeedback(application, function() {});
});