2017 © Pedro Peláez
 

library aerogear-push

AeroGearPush REST client repository

image

napp/aerogear-push

AeroGearPush REST client repository

  • Tuesday, February 6, 2018
  • by viezel
  • Repository
  • 3 Watchers
  • 0 Stars
  • 11,259 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 6 % Grown

The README.md

AeroGearPush

A library which integrates with the the Redhat Aerogear Unified Push restful API., (*1)

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, (*2)

An example on how to set the token., (*3)

$request->setOauthToken($token);

Usage

Example on how to use this library., (*4)

<?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., (*5)

CreateApplicationRequest()

Required methods

setOauthToken() # oAuth token setName() # string, (*6)

Optional methods

setDeveloper() # string setDescription() # string, (*7)

Response

The response is handled by createApplication($request), (*8)

Return type

json, (*9)

UpdateApplicationRequest()

Required methods

setOauthToken() # oAuth token setName() # string, (*10)

Optional methods

setDeveloper() # string setDescription() # string, (*11)

Response

The response is handled by createApplication(), (*12)

Return type

json, (*13)

DeleteApplicationRequest($pushAppId)

Required methods

setOauthToken() # oAuth token, (*14)

Optional methods
Response

The response is handled by deleteApplication(), (*15)

Return type

json, (*16)

CreateIosVariantRequest($pushAppId)

Required methods

setOauthToken() # oAuth token setCertificate() # fopen file resource setPassphrase() # string setProduction() # string ('true' or 'false')', (*17)

Optional methods

setName() # string setDescription() # string setDeveloper() # string, (*18)

Response

The reponse is handled by createIosVariant($request), (*19)

Return type

json, (*20)

CreateSimplePushVariantRequest($pushAppId)

Required methods

setOauthToken() # oAuth token, (*21)

Optional methods

setName() # string setDescription() # string setDeveloper() # string setProjectNumber() # string, (*22)

Response

The response is handled by createSimplePushVariant(), (*23)

Return type

json, (*24)

CreateAndroidVariantRequest($pushAppId)

Required methods

setOauthToken() # oAuth token setGoogleKey() # string, (*25)

Optional methods

setName() # string setDescription() # string setDeveloper() # string setProjectNumber() # string, (*26)

Response

The response is handled by createAndroidVariant(), (*27)

Return type

json, (*28)

SenderPushRequest()

Aerogear Unified Push documentation, (*29)

Required methods

setAuth(pushApplicationId, masterSecret) setMessage() # array setCriteria() # array, (*30)

Optional methods

setConfig() # array, (*31)

Response

The response is handled by senderPush(), (*32)

Return type

json, (*33)

GetApplicationInstallationRequest()

Required methods

setOauthToken() # oAuth token setVariantId() # string, (*34)

Optional methods

setInstallationId() # string, (*35)

Response

The response is handled by getApplicationInstallation(), (*36)

Return type

json, (*37)

GetApplicationRequest()

Required methods

setOauthToken() # oAuth token, (*38)

Optional methods

setPageNumber() # integer setPerPage() # integer enableDeviceCount() enableActivity(), (*39)

Response

The reponse is handled by getApplication(), (*40)

Return type

json, (*41)

GetMetricsMessagesRequest()

Required methods

setOauthToken() # oAuth token, (*42)

Optional methods

setPageNumber() # integer setPerPage() # integer, (*43)

Response

The response is handled by metricsMessages(), (*44)

Return type

json, (*45)

GetMetricsDashboardRequest()

Required methods

setOauthToken() # oAuth token, (*46)

Optional methods

setType() # string {active, warnings}, (*47)

Response

The response is handled by metricsDashboard(), (*48)

Return type

json, (*49)

GetSysInfoHealthRequest()

Required methods

setOauthToken() # oAuth token, (*50)

Optional methods
Response

The response is handled by sysInfoHealth(), (*51)

Return type

json, (*52)

Changelog

  • 1.0.2, (*53)

    • Added bulk import of device tokens
    • Bugfix: typo
  • 1.0.1, (*54)

    • Fixed wrong casing for AbstractApplicationRequest
  • 1.0, (*55)

    • init

License

MIT, see LICENSE., (*56)

The Versions

06/02 2018

dev-master

9999999-dev

AeroGearPush REST client repository

  Sources   Download

MIT

The Requires

 

The Development Requires

06/02 2018

1.0.3

1.0.3.0

AeroGearPush REST client repository

  Sources   Download

MIT

The Requires

 

The Development Requires

16/08 2017

dev-develop

dev-develop

AeroGearPush REST client repository

  Sources   Download

MIT

The Requires

 

The Development Requires

27/04 2016

1.0.2

1.0.2.0

AeroGearPush REST client repository

  Sources   Download

MIT

The Requires

 

The Development Requires

13/04 2016

1.0.1

1.0.1.0

AeroGearPush REST client repository

  Sources   Download

MIT

The Requires

 

The Development Requires

22/03 2016

1.0

1.0.0.0

AeroGearPush REST client repository

  Sources   Download

MIT

The Requires

 

The Development Requires