kyosifov/urbanairship
Composer 安装命令:
composer require kyosifov/urbanairship
包简介
Urban Airship PHP Library
README 文档
README
PHP library for use with the Urban Airship API for sending push notifications. Supports iOS, Android, and Windows.
Urban Airship is no longer actively developing this library but will respond to submitted issues and pull requests. It is provided as sample code, and Urban Airship makes no guarantees as to completeness or regularity of updates. However, we do welcome pull requests with a signed Contributor License Agreement.
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\all) ->setNotification(P\notification("Hello from php")) ->setDeviceTypes(P\all) ->send(); } catch (AirshipException $e) { print_r($e); }
Resources
统计信息
- 总下载量: 10.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2020-09-15