Skip to content

Commit 5b3a515

Browse files
author
Phrase
committed
1 parent d9a44c6 commit 5b3a515

File tree

7 files changed

+19
-12
lines changed

7 files changed

+19
-12
lines changed

docs/VersionsHistoryApi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Name | Type | Description | Notes
8181
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
8282

8383
# **versions_list**
84-
> List[TranslationVersion] versions_list(project_id, translation_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, branch=branch)
84+
> List[TranslationVersionWithUser] versions_list(project_id, translation_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, branch=branch, only_content_updates=only_content_updates)
8585
8686
List all versions
8787

@@ -110,10 +110,11 @@ with phrase_api.ApiClient(configuration) as api_client:
110110
page = 1 # int | Page number
111111
per_page = 25 # int | Limit on the number of objects to be returned, between 1 and 100. 25 by default
112112
branch = 'my-feature-branch' # str | specify the branch to use
113+
only_content_updates = False # bool | Indicates whether only content updates should be returned (default to False)
113114

114115
try:
115116
# List all versions
116-
api_response = api_instance.versions_list(project_id, translation_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, branch=branch)
117+
api_response = api_instance.versions_list(project_id, translation_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page, branch=branch, only_content_updates=only_content_updates)
117118
pprint(api_response)
118119
except ApiException as e:
119120
print("Exception when calling VersionsHistoryApi->versions_list: %s\n" % e)
@@ -130,10 +131,11 @@ Name | Type | Description | Notes
130131
**page** | **int**| Page number | [optional]
131132
**per_page** | **int**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
132133
**branch** | **str**| specify the branch to use | [optional]
134+
**only_content_updates** | **bool**| Indicates whether only content updates should be returned | [optional] [default to False]
133135

134136
### Return type
135137

136-
[**List[TranslationVersion]**](TranslationVersion.md)
138+
[**List[TranslationVersionWithUser]**](TranslationVersionWithUser.md)
137139

138140
### Authorization
139141

phrase_api/api/versions_history_api.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,15 @@ def versions_list(self, project_id, translation_id, **kwargs): # noqa: E501
193193
:param int page: Page number
194194
:param int per_page: Limit on the number of objects to be returned, between 1 and 100. 25 by default
195195
:param str branch: specify the branch to use
196+
:param bool only_content_updates: Indicates whether only content updates should be returned
196197
:param _preload_content: if False, the urllib3.HTTPResponse object will
197198
be returned without reading/decoding response
198199
data. Default is True.
199200
:param _request_timeout: timeout setting for this request. If one
200201
number provided, it will be total request
201202
timeout. It can also be a pair (tuple) of
202203
(connection, read) timeouts.
203-
:return: List[TranslationVersion]
204+
:return: List[TranslationVersionWithUser]
204205
If the method is called asynchronously,
205206
returns the request thread.
206207
"""
@@ -223,6 +224,7 @@ def versions_list_with_http_info(self, project_id, translation_id, **kwargs): #
223224
:param int page: Page number
224225
:param int per_page: Limit on the number of objects to be returned, between 1 and 100. 25 by default
225226
:param str branch: specify the branch to use
227+
:param bool only_content_updates: Indicates whether only content updates should be returned
226228
:param _return_http_data_only: response data without head status code
227229
and headers
228230
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -232,7 +234,7 @@ def versions_list_with_http_info(self, project_id, translation_id, **kwargs): #
232234
number provided, it will be total request
233235
timeout. It can also be a pair (tuple) of
234236
(connection, read) timeouts.
235-
:return: tuple(List[TranslationVersion], status_code(int), headers(HTTPHeaderDict))
237+
:return: tuple(List[TranslationVersionWithUser], status_code(int), headers(HTTPHeaderDict))
236238
If the method is called asynchronously,
237239
returns the request thread.
238240
"""
@@ -245,7 +247,8 @@ def versions_list_with_http_info(self, project_id, translation_id, **kwargs): #
245247
'x_phrase_app_otp',
246248
'page',
247249
'per_page',
248-
'branch'
250+
'branch',
251+
'only_content_updates'
249252
]
250253
all_params.extend(
251254
[
@@ -288,6 +291,8 @@ def versions_list_with_http_info(self, project_id, translation_id, **kwargs): #
288291
query_params.append(('per_page', local_var_params['per_page'])) # noqa: E501
289292
if 'branch' in local_var_params and local_var_params['branch'] is not None: # noqa: E501
290293
query_params.append(('branch', local_var_params['branch'])) # noqa: E501
294+
if 'only_content_updates' in local_var_params and local_var_params['only_content_updates'] is not None: # noqa: E501
295+
query_params.append(('only_content_updates', local_var_params['only_content_updates'])) # noqa: E501
291296

292297
header_params = {}
293298
if 'x_phrase_app_otp' in local_var_params:
@@ -312,7 +317,7 @@ def versions_list_with_http_info(self, project_id, translation_id, **kwargs): #
312317
body=body_params,
313318
post_params=form_params,
314319
files=local_var_files,
315-
response_type='List[TranslationVersion]', # noqa: E501
320+
response_type='List[TranslationVersionWithUser]', # noqa: E501
316321
auth_settings=auth_settings,
317322
async_req=local_var_params.get('async_req'),
318323
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501

test/test_key_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_instance(self, include_optional):
4646
data_type = 'number',
4747
tags = 'awesome-feature,needs-proofreading',
4848
max_characters_allowed = 140,
49-
screenshot = '[B@5dd7f921',
49+
screenshot = '[B@5cb63d05',
5050
remove_screenshot = True,
5151
unformatted = True,
5252
default_translation_content = 'Default translation content',

test/test_key_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_instance(self, include_optional):
4646
data_type = 'number',
4747
tags = 'awesome-feature,needs-proofreading',
4848
max_characters_allowed = 140,
49-
screenshot = '[B@7773d139',
49+
screenshot = '[B@656ac24',
5050
remove_screenshot = True,
5151
unformatted = True,
5252
xml_space_preserve = True,

test/test_project_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def make_instance(self, include_optional):
4141
main_format = 'yml',
4242
media = 'Python',
4343
shares_translation_memory = True,
44-
project_image = '[B@469c1292',
44+
project_image = '[B@12d644a6',
4545
remove_project_image = True,
4646
account_id = 'abcd1234',
4747
point_of_contact = 'abcd1234',

test/test_project_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def make_instance(self, include_optional):
4343
main_format = 'yml',
4444
media = 'Python',
4545
shares_translation_memory = True,
46-
project_image = '[B@18a6451f',
46+
project_image = '[B@2e7e9897',
4747
remove_project_image = False,
4848
workflow = 'review',
4949
machine_translation_enabled = True,

test/test_screenshot_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def make_instance(self, include_optional):
4040
branch = 'my-feature-branch',
4141
name = 'A screenshot name',
4242
description = 'A screenshot description',
43-
filename = '[B@7bf96c4e'
43+
filename = '[B@7c65b55b'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)