Skip to content

Commit 141e998

Browse files
committed
Adjusted README to show this new reality -- much simpler!
1 parent b87b3ad commit 141e998

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,14 @@ If you are new to GCM you should probably look into the [documentation](https://
3333
According to below **Usage** reference, we could create such application:
3434

3535
```js
36-
var gcm = require('node-gcm');
36+
var gcm = require('node-gcm')('YOUR_API_KEY_HERE');
3737

38-
var message = new gcm.Message({
38+
var message = {
3939
data: { key1: 'msg1' }
40-
});
41-
42-
// Set up the sender with you API key, prepare your recipients' registration tokens.
43-
var sender = new gcm.Sender('YOUR_API_KEY_HERE');
40+
};
4441
var regTokens = ['YOUR_REG_TOKEN_HERE'];
4542

46-
sender.send(message, { registrationTokens: regTokens }, function (err, response) {
43+
gcm.send(message, { registrationTokens: regTokens }, function (err, response) {
4744
if(err) console.error(err);
4845
else console.log(response);
4946
});

0 commit comments

Comments
 (0)