pandelix / u-push
此包的最新版本(0.0.1)没有可用的许可证信息。
www.umeng.com
0.0.1
2021-03-18 03:18 UTC
Requires
- php: >=5.6.40 | ^7.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3|^7.0
README
这是 UPush REST API 的 PHP 版本封装开发包。
对应的 REST API 文档: https://developer.umeng.com/docs/67966/detail/68343
支持的 PHP 版本: 5.6.x, 7.x
安装
使用 Composer 安装
- 在项目的
composer.json
文件中添加 upush 依赖:
"require": { "pandelix/upush": "*" }
- 执行
$ php composer.phar install
或$ composer install
进行安装。
初始化
... use UPush\Client as Upush; ... $app_infos = [ 'android' => ['appkey' => 'xx', 'secret' => 'xx'], 'ios' => ['appkey' => 'xx', 'secret' => 'xx'] ]; $client = new Upush($app_infos); $ret = $client->test()->sendListcast('xx,xx', ['custom' => 'xxxxx'], 'message'); if ($ret === true) { echo '发送成功' . PHP_EOL; } else { echo $ret; } ...
许可证
该库在 MIT 许可证的条款下作为开源软件提供。