DaDaPush: Real-time Notifications App
Send real-time notifications through our API without coding and maintaining your own app for iOS or Android devices.
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen For more information, please visit https://www.dadapush.com
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"dadapush/dadapush-php-client": "1.0.0"
}
}
or use git repo
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/dadapush/dadapush-php-client.git"
}
],
"require": {
"dadapush/dadapush-php-client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/DaDaPushClient/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new DaDaPushClient\Api\DaDaPushMessageApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \DaDaPushClient\Model\MessagePushRequest(); // \DaDaPushClient\Model\MessagePushRequest | body
$x_channel_token = 'x_channel_token_example'; // string | see: https://www.dadapush.com/channel/list
try {
$result = $apiInstance->createMessage($body, $x_channel_token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DaDaPushMessageApi->createMessage: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://www.dadapush.com
Class | Method | HTTP request | Description |
---|---|---|---|
DaDaPushMessageApi | createMessage | POST /api/v1/message | push Message to a Channel |
DaDaPushMessageApi | deleteMessage | DELETE /api/v1/message/{messageId} | delete a Channel Message |
DaDaPushMessageApi | getMessage | GET /api/v1/message/{messageId} | get a Channel Message |
DaDaPushMessageApi | getMessages | GET /api/v1/messages | get Message List |