klaussilveira / urbanairship-php
PHP library that provides a simple way to communicate with Urban Airship services
Installs: 3 476
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 5
Open Issues: 2
Requires
- php: >=5.3.0
- guzzle/guzzle: 3.1.*
This package is not auto-updated.
Last update: 2024-12-15 04:03:09 UTC
README
Urban Airship PHP is a drop-in library that provides a simple way to integrate Urban Airship services into your web application. It abstracts devices and notifications in order to provide a coherent and elegant interface to work with push notifications, batch pushes, broadcasts, device registration and more.
Authors and contributors
- Klaus Silveira (Creator, developer)
License
Supports
- iOS, Blackberry device registration/deactivation
- Android, iOS, Blackberry push notifications and broadcasts
- Android, iOS, Blackberry batch pushes
TODO
- Rich Push API
- Feed API
- Subscription API
Usage
The library is very easy to use. You just need to setup the client:
<?php use UrbanAirship\Client; use UrbanAirship\Push\AppleNotification; use UrbanAirship\Device\AppleDevice; $client = new Client('your_application_key', 'your_master_secret'); // Simple broadcast $notification = new AppleNotification(); $notification->setAlert('Hey dude!'); $notification->setBadge(1); $client->push($notification); // Simple notification, with device $device = new AppleDevice('FE66489F304DC75B8D6E8200DFF8A456E8DAEACEC428B427E9518741C92C6660'); $device->setAlias('Luke Skywalker')->addTag('republic')->addTag('pilot'); $notification = new AppleNotification(); $notification->addDevice($device); $notification->setAlert('Hey dude!'); $notification->setBadge(1); $client->push($notification);
For further information and examples, check the test suite.