All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| notificationGroupsList | GET /notification_groups | List notification groups |
| notificationGroupsMarkAllAsRead | PATCH /notification_groups/mark_all_as_read | Mark all notification groups as read |
| notificationGroupsMarkAsRead | PATCH /notification_groups/{id}/mark_as_read | Mark a notification group as read |
\Phrase\Model\NotificationGroupDetail[] notificationGroupsList($x_phrase_app_otp, $page, $per_page)
List notification groups
List all notification groups from the current user
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\NotificationGroupsApi(
// 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
);
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$page = 1; // int | Page number
$per_page = 25; // int | Limit on the number of objects to be returned, between 1 and 100. 25 by default
try {
$result = $apiInstance->notificationGroupsList($x_phrase_app_otp, $page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationGroupsApi->notificationGroupsList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
| page | int | Page number | [optional] |
| per_page | int | Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] |
\Phrase\Model\NotificationGroupDetail[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\NotificationGroupDetail[] notificationGroupsMarkAllAsRead($x_phrase_app_otp)
Mark all notification groups as read
Mark all notification groups of the current user as read
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\NotificationGroupsApi(
// 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
);
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->notificationGroupsMarkAllAsRead($x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationGroupsApi->notificationGroupsMarkAllAsRead: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
\Phrase\Model\NotificationGroupDetail[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\NotificationGroupDetail notificationGroupsMarkAsRead($id, $x_phrase_app_otp)
Mark a notification group as read
Mark a notifications group of the current user as read
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\NotificationGroupsApi(
// 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 = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->notificationGroupsMarkAsRead($id, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationGroupsApi->notificationGroupsMarkAsRead: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | ID | |
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
\Phrase\Model\NotificationGroupDetail
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]