{"_id":"gcm-push","_rev":"36-a09518b9227be968eab3ce743daa0b2c","name":"gcm-push","description":"GCM Push Notification Client","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"gcm-push","version":"1.0.1","description":"GCM Push Notification Client","keywords":["gcm","node","push","notification","google","cloud","messaging","client","handler"],"main":"gcm-push.js","repository":{"type":"git","url":"https://bitbucket.org/bustanity/push"},"author":{"name":"Teemu Pynnonen","email":"bustanity@gmail.com"},"license":"BSD-2-Clause","dependencies":{"request":"~2.40.0"},"_id":"gcm-push@1.0.1","dist":{"shasum":"05fd2fbacd495a0d573e6789f8d1c38b8ef28dbc","tarball":"https://registry.npmjs.org/gcm-push/-/gcm-push-1.0.1.tgz","integrity":"sha512-N7SQJNDOVnSET6Z52W7+9O5a3MCCgOjQZvy0Jm2Oe1lvF5BQraJE2YNgewjUwoflJINSEN0z5cW5yicFN22SQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0HhyZ0eRFHlVk+Si6VziiiEQUrA79u0ddNdfpDrzSdgIgKS4cNxdVwnsqpRn96SaBdMZgxrCiW9HkB9eXZf03/QQ="}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"bustanity","email":"bustanity@gmail.com"},"maintainers":[{"name":"bustanity","email":"bustanity@gmail.com"}]}},"readme":"GCM-PUSH [1.0.1]\n=========\n\nGCM-Push is a simple and easy to use NodeJS library that allows you\nto send push notifications through the Google Cloud Messaging servers to\nandroid devices.\n\n\nInstallation\n--------------\nGCM-Push can be installed easily by using npm, execute the following command in\nyour terminal\n\n````\nnpm install gcm-push\n````\n\nUsage\n-----------\nFirst you have to require the module in your code, followed by creating\na new instance of it. Google requires a API key in order to accept calls, therefore\nthe constructor of the module takes one argument - Google API Key.\n```\nvar GCMPush = require('gcm-push');\nvar gcm = new GCMPush('my_google_api_key'); \n```\n\n###Sending Notifications\nTo send a notification to a single android device\n````\ngcm.notifyDevice('device_id', 'notification title', 'my message', [optional soundUri (string)], [optional callback (function)]);\n````\n\nor if you want to send the notification to multiple devices\n````\ngcm.notifyDevices(['device_id1', 'device_id2'], 'notification_title', 'my_message', [optional soundUri (string)], [optional callback (function)]);\n````\n\nThe given (optional) callback function gets called once the module has finished with sending the notification to GCM. The parameters that get supplied to the callback are error, response, body.\n\nThere is more advanced functionality in GCM, than what these functions use, if you want to send your own raw data calls to the GCM server you can use the following method\n\n```\nvar data = { } // Filled with your own parameters that get send to GCM\n\ngcm.send(data, [optional callback (function)]);\n\n```","maintainers":[{"name":"bustanity","email":"bustanity@gmail.com"}],"time":{"modified":"2022-06-18T05:07:26.392Z","created":"2014-08-20T14:21:13.497Z","0.0.1":"2014-08-20T14:21:15.432Z","0.0.2":"2014-08-21T09:52:26.955Z","0.0.3":"2014-08-21T10:22:40.572Z","1.0.0":"2014-08-21T10:23:44.752Z","1.0.1":"2014-08-21T10:25:39.050Z"},"readmeFilename":"README.md","repository":{"type":"git","url":"https://bitbucket.org/bustanity/push"},"author":{"name":"Teemu Pynnonen","email":"bustanity@gmail.com"},"license":"BSD-2-Clause","keywords":["gcm","node","push","notification","google","cloud","messaging","client","handler"]}