Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

ionic-client

1.0.0 • Public • Published

node-ionic-client

Build Status Npm Version

node.js bing-search-api client

Usage

var ionic = require('ionic-client');
var bunyan = require('bunyan');
var restify = require('restify');
 
require('dotenv').load();
 
var log = bunyan.createLogger({
    name: 'logger',
    level: process.env.LOG_LEVEL || 'trace',
    serializers: restify.bunyan.serializers,
    stream: process.stdout
});
 
var options = {
  appId: process.env.IONIC_APP_ID,
  apiKey: process.env.IONIC_PRIVATE_KEY,
  log: log
};
 
var client = ionic.createClient(options);
 
client.status('080b6c8a81ce11e5bb81ba2a83e8cee0', function(err, msg) {
  if (err) {
    console.error(err);
  }
 
  console.log('msg', msg);
});
 
client.push(['token123'], { alert: 'Hello', ios: { }, android: {}, scheduled: new Date().getTime(), production: true }, {}, function(err, msg) {
  if (err) {
    console.error(err);
  }
 
  console.log('msg', msg);
});
 
client.pushToUsers(['uid1'], { alert: 'Hello', ios: { }, android: {}, scheduled: new Date().getTime(), production: true }, {}, function(err, msg) {
  if (err) {
    console.error(err);
  }
 
  console.log('msg', msg);
});

install

npm i ionic-client

Downloadsweekly downloads

4

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability