IBM推送:不能在ibmpush.js中使用sendNotificationByDeviceIds
我有一个应用程序,并使用函数sendNotificationByDeviceIds如下:
PushNotificationToConsumer: function(req, res) { queryCustomer.find({jpay_no : jpay_no}).done(function(customerReturn){ if(customerReturn.length > 0){ var device_id = customerReturn[0].attributes.device_id.toString(); req.ibmpush.sendNotificationByDeviceIds(message, [device_id], null).then(function(response){ res.json({success : true, message : 'Send notification to patient with device_id:' +device_id+ ' successful ' }); },function(err){ res.json(err); }); }else{ } }, function(err){ res.json(err); }) }
错误消息:
在app.js上:我声明了ibmpush = require('ibmpush')
请帮助给我你的想法。 谢谢
ibmpush
是不推荐使用的节点包。
https://www.npmjs.com/package/ibmpush
注意:此服务目前已在Bluemix上弃用,并将在短期内完全删除。 请使用第二代Bluemix MobileFirst服务。
您可以使用当前的Push Swagger文档来实现您正在查找的function(使用REST API调用):
- 如何在执行完所有testing用例之后closures浏览器,或者使用带有angularjs的selenium服务器的量angular器testing用例失败之后
- 我应该如何从节点Js中的Url提取值
- Fullcalendar Angular / Node.JS http请求:TypeError:将循环结构转换为JSON(在Object.stringify处)
- mongoose:“投入embedded失败的价值在path。 不能使用'in'运算符search'_id'
- Sails.js – 使用会话和令牌进行身份validation
- 如何在WebStorm中debuggingangular度量angular器testing
- NPM Angular ERR! peerInvalid / peerDependencies要求
- 在IpadAir中使用appium进行testing时,不能启动量angular器脚本
- 如何在JavaScript中将Blob转换为文件