node-gcm icon indicating copy to clipboard operation
node-gcm copied to clipboard

Move the interface closer to the actual content of GCM notifications

Open hypesystem opened this issue 10 years ago • 3 comments

Replace collapseKey with collapse_key, etc.

It would also be really cool if we could make it possible to send pre-built messages, for when the user knows what she is doing:

var gcm = require("gcm");
var sender = new gcm.Sender("<api key>");
sender.send({
    data: {
        hello: "world"
    }
}, "<registration id>", callback);

hypesystem avatar Jul 17 '15 16:07 hypesystem

@hypesystem Would we provide the old keys as aliases for backward compatibility?

eladnava avatar Dec 07 '15 22:12 eladnava

This PR has been marked with the v1 milestone (https://github.com/ToothlessGear/node-gcm/milestones/v1), becasue it contains breaking changes.

I use it to collect ideas for breaking changes that would make for a nicer interface. I don't think backwards compatibility should be a concern when we move to 1.0.0 --- learning from the experiences of pre-1.0 should be the prime concern :smile:

hypesystem avatar Dec 08 '15 11:12 hypesystem

Cool. I definitely agree with making it possible to pass in properties the same way as with GCM (collapse_key for example)

eladnava avatar Dec 09 '15 07:12 eladnava