urbanairship / urbanairship
Urban Airship PHP Library
Installs: 551 788
Dependents: 3
Suggesters: 0
Security: 0
Stars: 38
Watchers: 107
Forks: 39
Open Issues: 1
Requires
- monolog/monolog: >=1.0
- nategood/httpful: >=0.1.2
Requires (Dev)
- phpdocumentor/phpdocumentor: 2.*
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-04 12:33:29 UTC
README
PHP library for use with the Airship REST API for sending notifications. Supports iOS, Android, Amazon, and Windows.
Airship is no longer actively developing this library, but will respond to
feature requests, issues, and pull requests when they are submitted via
https://support.airship.com. This library is provided as sample code, and
Airship makes no guarantees as to completeness or regularity of updates.
However, we do welcome pull requests with a signed contribution agreement <https://docs.google.com/forms/d/e/1FAIpQLScErfiz-fXSPpVZ9r8Di2Tr2xDFxt5MgzUel0__9vqUgvko7Q/viewform>
__.
Requirements
PHP >= 5.3
Dependencies
- Composer
- Httpful
- Monolog
Development Dependencies
PHPUnit
Example Usage
<?php require_once 'vendor/autoload.php'; use UrbanAirship\Airship; use UrbanAirship\AirshipException; use UrbanAirship\UALog; use UrbanAirship\Push as P; use Monolog\Logger; use Monolog\Handler\StreamHandler; UALog::setLogHandlers(array(new StreamHandler("php://stdout", Logger::DEBUG))); $airship = new Airship("<app key>", "<master secret>"); try { $response = $airship->push() ->setAudience(P\iosChannel("Insert your iOS channel here!")) ->setNotification(P\notification("Hello from PHP")) ->setDeviceTypes(P\deviceTypes("ios")) ->send(); } catch (AirshipException $e) { print_r($e); }