All URIs are relative to https://api.phrase.com/v2
| Method | HTTP request | Description |
|---|---|---|
| tagCreate | POST /projects/{project_id}/tags | Create a tag |
| tagDelete | DELETE /projects/{project_id}/tags/{name} | Delete a tag |
| tagShow | GET /projects/{project_id}/tags/{name} | Get a single tag |
| tagsList | GET /projects/{project_id}/tags | List tags |
\Phrase\Model\TagWithStats tagCreate($project_id, $tag_create_parameters, $x_phrase_app_otp)
Create a tag
Create a new tag.
<?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\TagsApi(
// 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
$tag_create_parameters = new \Phrase\Model\TagCreateParameters(); // \Phrase\Model\TagCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->tagCreate($project_id, $tag_create_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TagsApi->tagCreate: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| tag_create_parameters | \Phrase\Model\TagCreateParameters | ||
| 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]
tagDelete($project_id, $name, $x_phrase_app_otp, $branch)
Delete a tag
Delete an existing tag.
<?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\TagsApi(
// 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
$name = 'name_example'; // string | name
$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->tagDelete($project_id, $name, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling TagsApi->tagDelete: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| name | string | name | |
| 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]
\Phrase\Model\TagWithStats tagShow($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch)
Get a single tag
Get details and progress information on a single tag for a given project.
<?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\TagsApi(
// 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
$name = 'name_example'; // string | name
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$omit_statistics = true; // bool | omit statistics in the response
$branch = my-feature-branch; // string | specify the branch to use
try {
$result = $apiInstance->tagShow($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TagsApi->tagShow: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project ID | |
| name | string | name | |
| x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
| omit_statistics | bool | omit statistics in the response | [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\Tag[] tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch)
List tags
List all tags for the given project.
<?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\TagsApi(
// 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
$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
$exclude_system_tags = true; // bool | excludes tags generated by the system, e.g. job, upload or figma tags
$branch = my-feature-branch; // string | specify the branch to use
try {
$result = $apiInstance->tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TagsApi->tagsList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | string | Project 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] |
| exclude_system_tags | bool | excludes tags generated by the system, e.g. job, upload or figma tags | [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]