Skip to content

Commit beedbc6

Browse files
author
Phrase
committed
1 parent a39a200 commit beedbc6

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

docs/Api/TagsApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void (empty response body)
140140

141141
## tagShow
142142

143-
> \Phrase\Model\TagWithStats tagShow($project_id, $name, $x_phrase_app_otp, $branch)
143+
> \Phrase\Model\TagWithStats tagShow($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch)
144144
145145
Get a single tag
146146

@@ -164,10 +164,11 @@ $apiInstance = new Phrase\Api\TagsApi(
164164
$project_id = 'project_id_example'; // string | Project ID
165165
$name = 'name_example'; // string | name
166166
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
167+
$omit_statistics = true; // bool | omit statistics in the response
167168
$branch = my-feature-branch; // string | specify the branch to use
168169

169170
try {
170-
$result = $apiInstance->tagShow($project_id, $name, $x_phrase_app_otp, $branch);
171+
$result = $apiInstance->tagShow($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch);
171172
print_r($result);
172173
} catch (Exception $e) {
173174
echo 'Exception when calling TagsApi->tagShow: ', $e->getMessage(), PHP_EOL;
@@ -183,6 +184,7 @@ Name | Type | Description | Notes
183184
**project_id** | **string**| Project ID |
184185
**name** | **string**| name |
185186
**x_phrase_app_otp** | **string**| Two-Factor-Authentication token (optional) | [optional]
187+
**omit_statistics** | **bool**| omit statistics in the response | [optional]
186188
**branch** | **string**| specify the branch to use | [optional]
187189

188190
### Return type

lib/Api/TagsApi.php

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -704,15 +704,16 @@ protected function tagDeleteRequest($project_id, $name, $x_phrase_app_otp = null
704704
* @param string $project_id Project ID (required)
705705
* @param string $name name (required)
706706
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
707+
* @param bool $omit_statistics omit statistics in the response (optional)
707708
* @param string $branch specify the branch to use (optional)
708709
*
709710
* @throws \Phrase\ApiException on non-2xx response
710711
* @throws \InvalidArgumentException
711712
* @return \Phrase\Model\TagWithStats
712713
*/
713-
public function tagShow($project_id, $name, $x_phrase_app_otp = null, $branch = null)
714+
public function tagShow($project_id, $name, $x_phrase_app_otp = null, $omit_statistics = null, $branch = null)
714715
{
715-
list($response) = $this->tagShowWithHttpInfo($project_id, $name, $x_phrase_app_otp, $branch);
716+
list($response) = $this->tagShowWithHttpInfo($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch);
716717
return $response;
717718
}
718719

@@ -724,15 +725,16 @@ public function tagShow($project_id, $name, $x_phrase_app_otp = null, $branch =
724725
* @param string $project_id Project ID (required)
725726
* @param string $name name (required)
726727
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
728+
* @param bool $omit_statistics omit statistics in the response (optional)
727729
* @param string $branch specify the branch to use (optional)
728730
*
729731
* @throws \Phrase\ApiException on non-2xx response
730732
* @throws \InvalidArgumentException
731733
* @return array of \Phrase\Model\TagWithStats, HTTP status code, HTTP response headers (array of strings)
732734
*/
733-
public function tagShowWithHttpInfo($project_id, $name, $x_phrase_app_otp = null, $branch = null)
735+
public function tagShowWithHttpInfo($project_id, $name, $x_phrase_app_otp = null, $omit_statistics = null, $branch = null)
734736
{
735-
$request = $this->tagShowRequest($project_id, $name, $x_phrase_app_otp, $branch);
737+
$request = $this->tagShowRequest($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch);
736738

737739
try {
738740
$options = $this->createHttpClientOption();
@@ -815,14 +817,15 @@ public function tagShowWithHttpInfo($project_id, $name, $x_phrase_app_otp = null
815817
* @param string $project_id Project ID (required)
816818
* @param string $name name (required)
817819
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
820+
* @param bool $omit_statistics omit statistics in the response (optional)
818821
* @param string $branch specify the branch to use (optional)
819822
*
820823
* @throws \InvalidArgumentException
821824
* @return \GuzzleHttp\Promise\PromiseInterface
822825
*/
823-
public function tagShowAsync($project_id, $name, $x_phrase_app_otp = null, $branch = null)
826+
public function tagShowAsync($project_id, $name, $x_phrase_app_otp = null, $omit_statistics = null, $branch = null)
824827
{
825-
return $this->tagShowAsyncWithHttpInfo($project_id, $name, $x_phrase_app_otp, $branch)
828+
return $this->tagShowAsyncWithHttpInfo($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch)
826829
->then(
827830
function ($response) {
828831
return $response[0];
@@ -838,15 +841,16 @@ function ($response) {
838841
* @param string $project_id Project ID (required)
839842
* @param string $name name (required)
840843
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
844+
* @param bool $omit_statistics omit statistics in the response (optional)
841845
* @param string $branch specify the branch to use (optional)
842846
*
843847
* @throws \InvalidArgumentException
844848
* @return \GuzzleHttp\Promise\PromiseInterface
845849
*/
846-
public function tagShowAsyncWithHttpInfo($project_id, $name, $x_phrase_app_otp = null, $branch = null)
850+
public function tagShowAsyncWithHttpInfo($project_id, $name, $x_phrase_app_otp = null, $omit_statistics = null, $branch = null)
847851
{
848852
$returnType = '\Phrase\Model\TagWithStats';
849-
$request = $this->tagShowRequest($project_id, $name, $x_phrase_app_otp, $branch);
853+
$request = $this->tagShowRequest($project_id, $name, $x_phrase_app_otp, $omit_statistics, $branch);
850854

851855
return $this->client
852856
->sendAsync($request, $this->createHttpClientOption())
@@ -888,12 +892,13 @@ function ($exception) {
888892
* @param string $project_id Project ID (required)
889893
* @param string $name name (required)
890894
* @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional)
895+
* @param bool $omit_statistics omit statistics in the response (optional)
891896
* @param string $branch specify the branch to use (optional)
892897
*
893898
* @throws \InvalidArgumentException
894899
* @return \GuzzleHttp\Psr7\Request
895900
*/
896-
protected function tagShowRequest($project_id, $name, $x_phrase_app_otp = null, $branch = null)
901+
protected function tagShowRequest($project_id, $name, $x_phrase_app_otp = null, $omit_statistics = null, $branch = null)
897902
{
898903
// verify the required parameter 'project_id' is set
899904
if ($project_id === null || (is_array($project_id) && count($project_id) === 0)) {
@@ -915,6 +920,17 @@ protected function tagShowRequest($project_id, $name, $x_phrase_app_otp = null,
915920
$httpBody = '';
916921
$multipart = false;
917922

923+
// query params
924+
if ($omit_statistics !== null) {
925+
if('form' === 'form' && is_array($omit_statistics)) {
926+
foreach($omit_statistics as $key => $value) {
927+
$queryParams[$key] = $value;
928+
}
929+
}
930+
else {
931+
$queryParams['omit_statistics'] = $omit_statistics;
932+
}
933+
}
918934
// query params
919935
if ($branch !== null) {
920936
if('form' === 'form' && is_array($branch)) {

0 commit comments

Comments
 (0)