napp/aerogear-push 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

napp/aerogear-push

最新稳定版本:1.0.3

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
  • 1.0

    • init

License

MIT, see LICENSE.

统计信息

  • 总下载量: 44.97k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固