我們正在開發移動應用程序。首先,我們將註冊選項放入移動設備(Bluemix js Push API)。但是,出於安全原因,我們將所有(註冊設備,push devicebyid,tag ..)選項移至node.js服務器。我使用node.js Bluemix Push API,但是我沒有在那裏找到註冊設備選項。如何通過node.js註冊設備Bluemix推送API
我裝:
npm install ibmbluemix
npm install ibmpush
我寫了下面的功能在服務器端:
ibmpush.pushNotificationAll(JSON.parse(req.body),function(response){
res.send(response);
});
ibmpush.pushNotificationDeviceIds(JSON.parse(req.body),function(response){
res.send(response);
});
ibmpush.pushNotificationAll(JSON.parse(req.body),function(response){
console.log("push sent successfully",response);
res.send(response);
});
請幫我註冊一個設備通過Node.js的推式API。
感謝ü@Bill溫特沃斯 – Gopi