baidupush

baidu cloud push

npm install baidupush
1 downloads in the last day
1 downloads in the last week
9 downloads in the last month

BaiduPush Node.js sdk

百度云推送 Node.js 服务端 sdk

Usage

npm install baidupush

Example

var BaiduPush = require('baidupush');

var baiduPushClient = BaiduPush.buildBaseApi({apiKey: 'your app key', secretKey: 'your secret key'});

    var queryBody = {}
    queryBody.push_type = 3;
    queryBody.messages = {title: "hello", description: "hello world from push msg"};
    queryBody.msg_keys = 'hello';
    queryBody.message_type = 1;

    baiduPushClient.pushMsg(queryBody, function (err, body) {
      if (err) {
        if (typeof err !== 'String') {
          err = JSON.stringify(err);
        }
        return done(err);
      }
      console.log(body);
      done();
    })

Api Docs

Comming soon;

支持本项目

如果你觉得这个项目还不错,就请作者喝杯咖啡吧

npm loves you