Skip to content

Commit

Permalink
Deploying from phrase/openapi@b8121547
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Sep 3, 2024
1 parent 2d1baaf commit f4a790b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
6 changes: 4 additions & 2 deletions docs/Api/TagsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Name | Type | Description | Notes

## tagsList

> \Phrase\Model\Tag[] tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch)
> \Phrase\Model\Tag[] tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch)
List tags

Expand All @@ -230,10 +230,11 @@ $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, $branch);
$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;
Expand All @@ -250,6 +251,7 @@ 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]
**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]

### Return type
Expand Down
34 changes: 25 additions & 9 deletions lib/Api/TagsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -1031,15 +1031,16 @@ protected function tagShowRequest($project_id, $name, $x_phrase_app_otp = null,
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
* @param int $page Page number (optional)
* @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional)
* @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional)
* @param string $branch specify the branch to use (optional)
*
* @throws \Phrase\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Phrase\Model\Tag[]
*/
public function tagsList($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null)
public function tagsList($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null)
{
list($response) = $this->tagsListWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $branch);
list($response) = $this->tagsListWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch);
return $response;
}

Expand All @@ -1052,15 +1053,16 @@ public function tagsList($project_id, $x_phrase_app_otp = null, $page = null, $p
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
* @param int $page Page number (optional)
* @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional)
* @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional)
* @param string $branch specify the branch to use (optional)
*
* @throws \Phrase\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Phrase\Model\Tag[], HTTP status code, HTTP response headers (array of strings)
*/
public function tagsListWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null)
public function tagsListWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null)
{
$request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $branch);
$request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -1144,14 +1146,15 @@ public function tagsListWithHttpInfo($project_id, $x_phrase_app_otp = null, $pag
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
* @param int $page Page number (optional)
* @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional)
* @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional)
* @param string $branch specify the branch to use (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function tagsListAsync($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null)
public function tagsListAsync($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null)
{
return $this->tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $branch)
return $this->tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch)
->then(
function ($response) {
return $response[0];
Expand All @@ -1168,15 +1171,16 @@ function ($response) {
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
* @param int $page Page number (optional)
* @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional)
* @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional)
* @param string $branch specify the branch to use (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null)
public function tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null)
{
$returnType = '\Phrase\Model\Tag[]';
$request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $branch);
$request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -1219,12 +1223,13 @@ function ($exception) {
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
* @param int $page Page number (optional)
* @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional)
* @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional)
* @param string $branch specify the branch to use (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function tagsListRequest($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null)
protected function tagsListRequest($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null)
{
// verify the required parameter 'project_id' is set
if ($project_id === null || (is_array($project_id) && count($project_id) === 0)) {
Expand Down Expand Up @@ -1263,6 +1268,17 @@ protected function tagsListRequest($project_id, $x_phrase_app_otp = null, $page
}
}
// query params
if ($exclude_system_tags !== null) {
if('form' === 'form' && is_array($exclude_system_tags)) {
foreach($exclude_system_tags as $key => $value) {
$queryParams[$key] = $value;
}
}
else {
$queryParams['exclude_system_tags'] = $exclude_system_tags;
}
}
// query params
if ($branch !== null) {
if('form' === 'form' && is_array($branch)) {
foreach($branch as $key => $value) {
Expand Down

0 comments on commit f4a790b

Please sign in to comment.