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调用):