A ruby library to communicate with Microsoft Push Notification Service.
Currently it is just a simple library.
Drop the file lib/microsoft_push_notification_service.rb
in your project and include it with require
.
Warning !!: this lib requires htmlentities
gem to work. You find it here
or install it using gem install htmlentities
.
See sample_usage.rb
for samples.
The following notification parameters can be defined in the options hash for :toast
:
title
- the titlecontent
- the contentparams
- a hash that will be transformed intokey1=value1&key2=value2...
You can pass whatever hash you want and an XML will be generated, like the following:
<root>
<key1>value1</key1>
<key2>value2</key2>
</root>
Warning: currently limited to one level, the hash must not contain another hash.
The following notification parameters can be defined in the options hash for :tile
:
title
- the titlecount
- the badge to display on the app tilebackground_image
- the path to a local image embedded in the app or an image accessible via HTTP (.jpg or .png, 173x137px, max 80kb)back_title
- the title when the tile is flippedback_background_image
- the path to a local image embedded in the app or an image accessible via HTTP (.jpg or .png, 173x137px, max 80kb)back_content
- the content when the tile is flipped
For general information about Push Notification on Windows Phone check the MSDN.
- Make this lib a gem
- Add unit tests
- Add support for multi-level hash for raw notifications
Copyright (c) 2012 Nicolas VERINAUD. Released under the MIT license.