ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 208 forks source link

V1: remove Message #239

Closed hypesystem closed 8 years ago

hypesystem commented 8 years ago

This PR removes the Message abstraction, and moves validation of fields to the Sender.

It also allows for a new and nicer instantiation syntax:

var gcm = require("node-gcm")("<API KEY>");

gcm.send(...);

It also removes the mapping of property names we used to have. For example, the field collapseKey is now simply called collapse_key, just as it is on the FCM serverside. This reduces code complexity significantly.

eladnava commented 8 years ago

@hypesystem Excellent! Well done! 👍 💯

You rock. Let's merge. =)

hypesystem commented 8 years ago

@eladnava Thanks :smile: feel free to merge, if you think it looks good.