All URIs are relative to https://YOUR_SUPLA_SERVER/api/v3
.
Method | HTTP request | Description |
---|---|---|
getNotification() | GET /notifications/{id} | Get Notification |
sendNotification() | PATCH /notifications | Send a notification. |
updateNotification() | PUT /notifications/{notification} |
getNotification($id, $include): \Supla\ApiClient\Model\Notification
Get Notification
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\NotificationsApi(
// 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(),
$config
);
$id = 56; // int | ID
$include = array('include_example'); // string[] | List of extra fields to include in the response.
try {
$result = $apiInstance->getNotification($id, $include);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->getNotification: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID | |
include | string[] | List of extra fields to include in the response. | [optional] |
\Supla\ApiClient\Model\Notification
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
sendNotification($channelActionParamsSend)
Send a notification.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\NotificationsApi(
// 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(),
$config
);
$channelActionParamsSend = new \Supla\ApiClient\Model\ChannelActionParamsSend(); // \Supla\ApiClient\Model\ChannelActionParamsSend
try {
$apiInstance->sendNotification($channelActionParamsSend);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->sendNotification: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
channelActionParamsSend | \Supla\ApiClient\Model\ChannelActionParamsSend |
void (empty response body)
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateNotification($notification, $channelActionParamsSend, $include): \Supla\ApiClient\Model\Notification
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\NotificationsApi(
// 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(),
$config
);
$notification = 56; // int | ID
$channelActionParamsSend = new \Supla\ApiClient\Model\ChannelActionParamsSend(); // \Supla\ApiClient\Model\ChannelActionParamsSend
$include = array('include_example'); // string[] | List of extra fields to include in the response.
try {
$result = $apiInstance->updateNotification($notification, $channelActionParamsSend, $include);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->updateNotification: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
notification | int | ID | |
channelActionParamsSend | \Supla\ApiClient\Model\ChannelActionParamsSend | ||
include | string[] | List of extra fields to include in the response. | [optional] |
\Supla\ApiClient\Model\Notification
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]