All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| commentCreate | POST /projects/{project_id}/keys/{key_id}/comments | Create a comment |
| commentDelete | DELETE /projects/{project_id}/keys/{key_id}/comments/{id} | Delete a comment |
| commentMarkCheck | GET /projects/{project_id}/keys/{key_id}/comments/{id}/read | Check if comment is read |
| commentMarkRead | PATCH /projects/{project_id}/keys/{key_id}/comments/{id}/read | Mark a comment as read |
| commentMarkUnread | DELETE /projects/{project_id}/keys/{key_id}/comments/{id}/read | Mark a comment as unread |
| commentShow | GET /projects/{project_id}/keys/{key_id}/comments/{id} | Get a single comment |
| commentUpdate | PATCH /projects/{project_id}/keys/{key_id}/comments/{id} | Update a comment |
| commentsList | GET /projects/{project_id}/keys/{key_id}/comments | List comments |
\Phrase\Model\Comment commentCreate($project_id, $key_id, $comment_create_parameters, $x_phrase_app_otp)
Create a comment
Create a new comment for a key.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$comment_create_parameters = new \Phrase\Model\CommentCreateParameters(); // \Phrase\Model\CommentCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->commentCreate($project_id, $key_id, $comment_create_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentCreate: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| comment_create_parameters | \Phrase\Model\CommentCreateParameters | ||
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
commentDelete($project_id, $key_id, $id, $x_phrase_app_otp, $branch)
Delete a comment
Delete an existing comment.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->commentDelete($project_id, $key_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentDelete: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| id | string | ID | |
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
| branch | string | specify the branch to use | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
commentMarkCheck($project_id, $key_id, $id, $x_phrase_app_otp, $branch)
Check if comment is read
Check if comment was marked as read. Returns 204 if read, 404 if unread.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->commentMarkCheck($project_id, $key_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentMarkCheck: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| id | string | ID | |
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
| branch | string | specify the branch to use | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
commentMarkRead($project_id, $key_id, $id, $comment_mark_read_parameters, $x_phrase_app_otp)
Mark a comment as read
Mark a comment 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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$id = 'id_example'; // string | ID
$comment_mark_read_parameters = new \Phrase\Model\CommentMarkReadParameters(); // \Phrase\Model\CommentMarkReadParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$apiInstance->commentMarkRead($project_id, $key_id, $id, $comment_mark_read_parameters, $x_phrase_app_otp);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentMarkRead: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| id | string | ID | |
| comment_mark_read_parameters | \Phrase\Model\CommentMarkReadParameters | ||
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
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]
commentMarkUnread($project_id, $key_id, $id, $x_phrase_app_otp, $branch)
Mark a comment as unread
Mark a comment as unread.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->commentMarkUnread($project_id, $key_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentMarkUnread: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| id | string | ID | |
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
| branch | string | specify the branch to use | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Comment commentShow($project_id, $key_id, $id, $x_phrase_app_otp, $branch)
Get a single comment
Get details on a single comment.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$result = $apiInstance->commentShow($project_id, $key_id, $id, $x_phrase_app_otp, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentShow: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| id | string | ID | |
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
| branch | string | specify the branch to use | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Comment commentUpdate($project_id, $key_id, $id, $comment_update_parameters, $x_phrase_app_otp)
Update a comment
Update an existing comment.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$id = 'id_example'; // string | ID
$comment_update_parameters = new \Phrase\Model\CommentUpdateParameters(); // \Phrase\Model\CommentUpdateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->commentUpdate($project_id, $key_id, $id, $comment_update_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentUpdate: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| id | string | ID | |
| comment_update_parameters | \Phrase\Model\CommentUpdateParameters | ||
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Comment[] commentsList($project_id, $key_id, $x_phrase_app_otp, $page, $per_page, $branch, $query, $locale_ids, $filters, $order)
List comments
List all comments for a key.
<?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\CommentsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$key_id = 'key_id_example'; // string | Translation Key ID
$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
$branch = my-feature-branch; // string | specify the branch to use
$query = Some comment content; // string | Search query for comment messages
$locale_ids = ["someId"]; // string[] | Search comments by their assigned locales
$filters = ["read","unread"]; // string[] | Specify the filter for the comments. Supported values are `read` and `unread`. Combine both to return all comments (read + unread) without filtering.
$order = desc; // string | Order direction. Defaults to `desc`. Values other than `asc` and `desc` fall back to `desc`.
try {
$result = $apiInstance->commentsList($project_id, $key_id, $x_phrase_app_otp, $page, $per_page, $branch, $query, $locale_ids, $filters, $order);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentsApi->commentsList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| key_id | string | Translation Key ID | |
| 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] |
| branch | string | specify the branch to use | [optional] |
| query | string | Search query for comment messages | [optional] |
| locale_ids | string[] | Search comments by their assigned locales | [optional] |
| filters | string[] | Specify the filter for the comments. Supported values are `read` and `unread`. Combine both to return all comments (read + unread) without filtering. | [optional] |
| order | string | Order direction. Defaults to `desc`. Values other than `asc` and `desc` fall back to `desc`. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]