napp/aerogear-push
Composer 安装命令:
composer require napp/aerogear-push
包简介
AeroGearPush REST client repository
README 文档
README
A library which integrates with the the Redhat Aerogear Unified Push restful API.
Installation
Composer
$ composer require napp/aerogear-push
Keycloak oauth token usage
All, but SenderPushRequest(), have a OAuthToken dependency, and to generate the token, look in examples/oauth-keycloak.md
An example on how to set the token.
$request->setOauthToken($token);
Usage
Example on how to use this library.
<?php use Napp\AeroGearPush; use Napp\AeroGearPush\Request; use Napp\AeroGearPush\Exception; $client = new AeroGearPush('https://host.com/ag-push/rest/'); $request = new SenderPushRequest(); $request ->setAuth('PushApplicationID', 'MasterSecret') ->setMessage( [ 'sound' => 'default', 'alert' => 'this is a message.', ] ) ->setCriteria( [ 'alias' => ['my-alias'], ] ); try { $response = $client->SenderPush($request); var_dump($response); } catch (AeroGearPushException $e) { die($e->getMessage()); }
Available Request/Response methods.
For information about how to format the single methods which is accepting arrays, please take a look at the AeroGear Unified Push API documentation.
CreateApplicationRequest()
Required methods
setOauthToken() # oAuth token
setName() # string
Optional methods
setDeveloper() # string
setDescription() # string
Response
The response is handled by createApplication($request)
Return type
json
UpdateApplicationRequest()
Required methods
setOauthToken() # oAuth token
setName() # string
Optional methods
setDeveloper() # string
setDescription() # string
Response
The response is handled by createApplication()
Return type
json
DeleteApplicationRequest($pushAppId)
Required methods
setOauthToken() # oAuth token
Optional methods
Response
The response is handled by deleteApplication()
Return type
json
CreateIosVariantRequest($pushAppId)
Required methods
setOauthToken() # oAuth token
setCertificate() # fopen file resource
setPassphrase() # string
setProduction() # string ('true' or 'false')'
Optional methods
setName() # string
setDescription() # string
setDeveloper() # string
Response
The reponse is handled by createIosVariant($request)
Return type
json
CreateSimplePushVariantRequest($pushAppId)
Required methods
setOauthToken() # oAuth token
Optional methods
setName() # string
setDescription() # string
setDeveloper() # string
setProjectNumber() # string
Response
The response is handled by createSimplePushVariant()
Return type
json
CreateAndroidVariantRequest($pushAppId)
Required methods
setOauthToken() # oAuth token
setGoogleKey() # string
Optional methods
setName() # string
setDescription() # string
setDeveloper() # string
setProjectNumber() # string
Response
The response is handled by createAndroidVariant()
Return type
json
SenderPushRequest()
Aerogear Unified Push documentation
Required methods
setAuth(pushApplicationId, masterSecret)
setMessage() # array
setCriteria() # array
Optional methods
setConfig() # array
Response
The response is handled by senderPush()
Return type
json
GetApplicationInstallationRequest()
Required methods
setOauthToken() # oAuth token
setVariantId() # string
Optional methods
setInstallationId() # string
Response
The response is handled by getApplicationInstallation()
Return type
json
GetApplicationRequest()
Required methods
setOauthToken() # oAuth token
Optional methods
setPageNumber() # integer
setPerPage() # integer
enableDeviceCount()
enableActivity()
Response
The reponse is handled by getApplication()
Return type
json
GetMetricsMessagesRequest()
Required methods
setOauthToken() # oAuth token
Optional methods
setPageNumber() # integer
setPerPage() # integer
Response
The response is handled by metricsMessages()
Return type
json
GetMetricsDashboardRequest()
Required methods
setOauthToken() # oAuth token
Optional methods
setType() # string {active, warnings}
Response
The response is handled by metricsDashboard()
Return type
json
GetSysInfoHealthRequest()
Required methods
setOauthToken() # oAuth token
Optional methods
Response
The response is handled by sysInfoHealth()
Return type
json
Changelog
-
1.0.2
- Added bulk import of device tokens
- Bugfix: typo
-
1.0.1
- Fixed wrong casing for
AbstractApplicationRequest
- Fixed wrong casing for
-
1.0
- init
License
MIT, see LICENSE.
napp/aerogear-push 适用场景与选型建议
napp/aerogear-push 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 54.33k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 napp/aerogear-push 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 napp/aerogear-push 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 54.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-22