Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Gem for interacting with Azure notification hubs without using the azure-sdk
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 1.6
~> 0

Runtime

~> 1.8
 Project Readme

Azure::Push

This is a very simple Azure notification-hub implementation for sending push notifications to Mobile Devices.

Installation

This gem is available on Rubygems: (https://rubygems.org/gems/azure-push)

Add this line to your application's Gemfile:

gem 'azure-push'

And then execute:

$ bundle

Or install it yourself as:

$ gem install azure-push

Usage

ap = Azure::Push::Message.new(namespace, hub, access_key)
ap.send({aps: {alert: message, sound: true}, 'my_tag')

The default Message format is 'apple'. Since v0.0.2 all available formats are supported.

Formats: 'apple', 'gcm', 'template', 'windows', 'windowsphone'

ap.send(xml_string, 'my_tag', format: 'windows')

You can also add additional headers:

ap.send(xml_string, 'my_tag', format: 'windows', additional_headers: {'X-Special-Windows-Header' => 'value'})

Contributing

  1. Fork it ( https://github.com/christian-s/azure-push/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Roadmap / Upcoming Features

  • Read & Delete Registrations / Tags
  • Create, Update Registrations
  • Notification Hub management