kiwi-suite / pushing-kiwi-client
kiwi-suite/pushing-kiwi-client php client for pushing.kiwi
0.0.3
2017-12-13 09:31 UTC
Requires
- php: ^5.6 | ^7.0
- zendframework/zend-diactoros: ^1.6
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- phpunit/phpunit: ^6.0.6
This package is not auto-updated.
Last update: 2024-11-10 03:10:37 UTC
README
This is a draft. Don't use in production
kiwi-suite/pushing-kiwi-client
Installation
The suggested installation method is via composer:
php composer.phar require kiwi-suite/pushing-kiwi-client
Usage
$iosMessage = new IosMessage([ 'title' => "string", 'body' => "string", 'launchImage' => "string", 'badge' => 1, 'sound' => "string", 'payload' => ["key" => "value"], 'priority' => 5, 'deviceIds' => ["deviceToken1", "deviceToken2"], ]); $androidMessage = new AndroidMessage([ 'payload' => ["key" => "value"], 'deviceIds' => ["deviceToken1", "deviceToken2"], ]); $notification = new Notification("my_secret_token", [$iosMessage, $androidMessage]); $psr7Request = $notification->createHttpRequest(); $yourHttpClient->send($psr7Request);
This library does not ship with functionality to send HTTP requests over the wire. You need to get a library to do this for you. Any PSR-7 compliant library will work, like Guzzle v6+.
$ composer require 'guzzlehttp/guzzle:^6.0.0'