urbanairship / ruby-library

A Ruby wrapper for the Urban Airship API.
Other
200 stars 118 forks source link

Allowing arbitrary parameters to be passed to the API payload. #9

Closed augustl closed 12 years ago

augustl commented 12 years ago

Just a minor change, to allow for full API usage with this gem.

Not sure if it makes sense to change the tests, like I do, or just delete them. You decice (obviously).


Push notifications, both iOS and Android, can have arbitrary parameters associated with them. To pass such an arbitrary parameter, use a key that isn't a part of the Urban Airship API, and it will be shipped with the push notification to the devices.

This is useful for passing arbitrary metadata along with the notification itself, such as the numeric ID of the record associated with a push notification, if any.

The documentation for this feature in the Urban Airship API can be found here: https://support.urbanairship.com/customer/portal/articles/60532-sending-custom-push-data

schoblaska commented 12 years ago

I was going back and forth on this for a while, but I think this it the way to go. Thanks for the pull request!