https://github.com/webwarejp/notificationhubs-rest-php
Push Notification Library for Microsoft Azure Notification Hub
https://github.com/webwarejp/notificationhubs-rest-php
Last synced: 2 months ago
JSON representation
Push Notification Library for Microsoft Azure Notification Hub
- Host: GitHub
- URL: https://github.com/webwarejp/notificationhubs-rest-php
- Owner: webwarejp
- License: mit
- Created: 2015-03-18T04:49:25.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-19T12:43:30.000Z (over 6 years ago)
- Last Synced: 2024-09-18T01:12:01.102Z (9 months ago)
- Language: PHP
- Size: 61.5 KB
- Stars: 6
- Watchers: 5
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Notification Hubs REST wrapper for PHP
[](https://travis-ci.org/webwarejp/notificationhubs-rest-php)
[](https://styleci.io/repos/32438522)
[](https://scrutinizer-ci.com/g/webwarejp/notificationhubs-rest-php/)
[](https://scrutinizer-ci.com/g/webwarejp/notificationhubs-rest-php/)This is a implementation of a REST wrapper using the [REST APIs of Notification Hubs](http://msdn.microsoft.com/en-us/library/dn495827.aspx) from a PHP back-end.
## How to use the code above
Initialize your Notification Hubs client (substitute the connection string and hub name as instructed in the [Get started tutorial](http://azure.microsoft.com/en-us/documentation/articles/notification-hubs-ios-get-started/)):$hub = new NotificationHub("connection string", "hubname");
Then add the send code depending on your target mobile platform.
### iOS
$factory = new NotificationFactory();
$notification = $factory->createNotification("apple", "Hello from PHP!");
$hub->sendNotification($notification);### Android
$factory = new NotificationFactory();
$notification = $factory->createNotification("gcm", "Hello from PHP!");
$hub->sendNotification($notification);## Notes
This code is provided as-is with no guarantees.