Skip to content

Commit afc3b8d

Browse files
author
Phrase
committed
Deploying from phrase/openapi@e201d136
1 parent 55fc2ef commit afc3b8d

19 files changed

+308
-67
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ docs/BranchUpdateParameters.md
3232
docs/BranchesApi.md
3333
docs/Comment.md
3434
docs/CommentCreateParameters.md
35+
docs/CommentCreateParameters1.md
3536
docs/CommentMarkReadParameters.md
3637
docs/CommentReaction.md
3738
docs/CommentReactionsApi.md
@@ -370,6 +371,7 @@ phrase_api/models/branch_name.py
370371
phrase_api/models/branch_update_parameters.py
371372
phrase_api/models/comment.py
372373
phrase_api/models/comment_create_parameters.py
374+
phrase_api/models/comment_create_parameters1.py
373375
phrase_api/models/comment_mark_read_parameters.py
374376
phrase_api/models/comment_reaction.py
375377
phrase_api/models/comment_update_parameters.py
@@ -606,6 +608,7 @@ test/test_branch_update_parameters.py
606608
test/test_branches_api.py
607609
test/test_comment.py
608610
test/test_comment_create_parameters.py
611+
test/test_comment_create_parameters1.py
609612
test/test_comment_mark_read_parameters.py
610613
test/test_comment_reaction.py
611614
test/test_comment_reactions_api.py

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ Class | Method | HTTP request | Description
451451
- [BranchUpdateParameters](docs/BranchUpdateParameters.md)
452452
- [Comment](docs/Comment.md)
453453
- [CommentCreateParameters](docs/CommentCreateParameters.md)
454+
- [CommentCreateParameters1](docs/CommentCreateParameters1.md)
454455
- [CommentMarkReadParameters](docs/CommentMarkReadParameters.md)
455456
- [CommentReaction](docs/CommentReaction.md)
456457
- [CommentUpdateParameters](docs/CommentUpdateParameters.md)

docs/CommentCreateParameters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6+
**message** | **str** | Comment message |
67
**branch** | **str** | specify the branch to use | [optional]
7-
**message** | **str** | Comment message | [optional]
8+
**locale_ids** | **List[str]** | specify the locales for the comment | [optional]
89

910
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1011

docs/CommentCreateParameters1.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CommentCreateParameters1
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**message** | **str** | Reply message body |
7+
**branch** | **str** | Specify the branch to use | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/CommentRepliesApi.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Name | Type | Description | Notes
9898
[[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)
9999

100100
# **reply_create**
101-
> Comment reply_create(project_id, key_id, comment_id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, message=message)
101+
> Comment reply_create(project_id, key_id, comment_id, comment_create_parameters1, x_phrase_app_otp=x_phrase_app_otp)
102102
103103
Create a reply
104104

@@ -124,13 +124,12 @@ with phrase_api.ApiClient(configuration) as api_client:
124124
project_id = 'project_id_example' # str | Project ID (required)
125125
key_id = 'key_id_example' # str | Translation Key ID (required)
126126
comment_id = 'comment_id_example' # str | Comment ID (required)
127+
comment_create_parameters1 = phrase_api.CommentCreateParameters1() # CommentCreateParameters1 | (required)
127128
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
128-
branch = 'my-feature-branch' # str | specify the branch to use
129-
message = 'some message...' # str | specify the message for the comment
130129

131130
try:
132131
# Create a reply
133-
api_response = api_instance.reply_create(project_id, key_id, comment_id, x_phrase_app_otp=x_phrase_app_otp, branch=branch, message=message)
132+
api_response = api_instance.reply_create(project_id, key_id, comment_id, comment_create_parameters1, x_phrase_app_otp=x_phrase_app_otp)
134133
pprint(api_response)
135134
except ApiException as e:
136135
print("Exception when calling CommentRepliesApi->reply_create: %s\n" % e)
@@ -144,9 +143,8 @@ Name | Type | Description | Notes
144143
**project_id** | **str**| Project ID |
145144
**key_id** | **str**| Translation Key ID |
146145
**comment_id** | **str**| Comment ID |
146+
**comment_create_parameters1** | [**CommentCreateParameters1**](CommentCreateParameters1.md)| |
147147
**x_phrase_app_otp** | **str**| Two-Factor-Authentication token (optional) | [optional]
148-
**branch** | **str**| specify the branch to use | [optional]
149-
**message** | **str**| specify the message for the comment | [optional]
150148

151149
### Return type
152150

@@ -158,7 +156,7 @@ Name | Type | Description | Notes
158156

159157
### HTTP request headers
160158

161-
- **Content-Type**: Not defined
159+
- **Content-Type**: application/json
162160
- **Accept**: application/json
163161

164162
### HTTP response details

docs/CommentsApi.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Method | HTTP request | Description
1515

1616

1717
# **comment_create**
18-
> Comment comment_create(project_id, key_id, comment_create_parameters, x_phrase_app_otp=x_phrase_app_otp, message=message, locale_ids=locale_ids)
18+
> Comment comment_create(project_id, key_id, comment_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
1919
2020
Create a comment
2121

@@ -42,12 +42,10 @@ with phrase_api.ApiClient(configuration) as api_client:
4242
key_id = 'key_id_example' # str | Translation Key ID (required)
4343
comment_create_parameters = phrase_api.CommentCreateParameters() # CommentCreateParameters | (required)
4444
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
45-
message = 'some message...' # str | specify the message for the comment
46-
locale_ids = ['someId'] # List[str] | specify the locales for the comment
4745

4846
try:
4947
# Create a comment
50-
api_response = api_instance.comment_create(project_id, key_id, comment_create_parameters, x_phrase_app_otp=x_phrase_app_otp, message=message, locale_ids=locale_ids)
48+
api_response = api_instance.comment_create(project_id, key_id, comment_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
5149
pprint(api_response)
5250
except ApiException as e:
5351
print("Exception when calling CommentsApi->comment_create: %s\n" % e)
@@ -62,8 +60,6 @@ Name | Type | Description | Notes
6260
**key_id** | **str**| Translation Key ID |
6361
**comment_create_parameters** | [**CommentCreateParameters**](CommentCreateParameters.md)| |
6462
**x_phrase_app_otp** | **str**| Two-Factor-Authentication token (optional) | [optional]
65-
**message** | **str**| specify the message for the comment | [optional]
66-
**locale_ids** | [**List[str]**](str.md)| specify the locales for the comment | [optional]
6763

6864
### Return type
6965

phrase_api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
from phrase_api.models.branch_update_parameters import BranchUpdateParameters
106106
from phrase_api.models.comment import Comment
107107
from phrase_api.models.comment_create_parameters import CommentCreateParameters
108+
from phrase_api.models.comment_create_parameters1 import CommentCreateParameters1
108109
from phrase_api.models.comment_mark_read_parameters import CommentMarkReadParameters
109110
from phrase_api.models.comment_reaction import CommentReaction
110111
from phrase_api.models.comment_update_parameters import CommentUpdateParameters

phrase_api/api/comment_replies_api.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -216,22 +216,21 @@ def replies_list_with_http_info(self, project_id, key_id, comment_id, replies_li
216216
_request_timeout=local_var_params.get('_request_timeout'),
217217
collection_formats=collection_formats)
218218

219-
def reply_create(self, project_id, key_id, comment_id, **kwargs): # noqa: E501
219+
def reply_create(self, project_id, key_id, comment_id, comment_create_parameters1, **kwargs): # noqa: E501
220220
"""Create a reply # noqa: E501
221221
222222
Create a new reply for a comment. # noqa: E501
223223
This method makes a synchronous HTTP request by default. To make an
224224
asynchronous HTTP request, please pass async_req=True
225-
>>> thread = api.reply_create(project_id, key_id, comment_id, async_req=True)
225+
>>> thread = api.reply_create(project_id, key_id, comment_id, comment_create_parameters1, async_req=True)
226226
>>> result = thread.get()
227227
228228
:param async_req bool: execute request asynchronously
229229
:param str project_id: Project ID (required)
230230
:param str key_id: Translation Key ID (required)
231231
:param str comment_id: Comment ID (required)
232+
:param CommentCreateParameters1 comment_create_parameters1: (required)
232233
:param str x_phrase_app_otp: Two-Factor-Authentication token (optional)
233-
:param str branch: specify the branch to use
234-
:param str message: specify the message for the comment
235234
:param _preload_content: if False, the urllib3.HTTPResponse object will
236235
be returned without reading/decoding response
237236
data. Default is True.
@@ -244,24 +243,23 @@ def reply_create(self, project_id, key_id, comment_id, **kwargs): # noqa: E501
244243
returns the request thread.
245244
"""
246245
kwargs['_return_http_data_only'] = True
247-
return self.reply_create_with_http_info(project_id, key_id, comment_id, **kwargs) # noqa: E501
246+
return self.reply_create_with_http_info(project_id, key_id, comment_id, comment_create_parameters1, **kwargs) # noqa: E501
248247

249-
def reply_create_with_http_info(self, project_id, key_id, comment_id, **kwargs): # noqa: E501
248+
def reply_create_with_http_info(self, project_id, key_id, comment_id, comment_create_parameters1, **kwargs): # noqa: E501
250249
"""Create a reply # noqa: E501
251250
252251
Create a new reply for a comment. # noqa: E501
253252
This method makes a synchronous HTTP request by default. To make an
254253
asynchronous HTTP request, please pass async_req=True
255-
>>> thread = api.reply_create_with_http_info(project_id, key_id, comment_id, async_req=True)
254+
>>> thread = api.reply_create_with_http_info(project_id, key_id, comment_id, comment_create_parameters1, async_req=True)
256255
>>> result = thread.get()
257256
258257
:param async_req bool: execute request asynchronously
259258
:param str project_id: Project ID (required)
260259
:param str key_id: Translation Key ID (required)
261260
:param str comment_id: Comment ID (required)
261+
:param CommentCreateParameters1 comment_create_parameters1: (required)
262262
:param str x_phrase_app_otp: Two-Factor-Authentication token (optional)
263-
:param str branch: specify the branch to use
264-
:param str message: specify the message for the comment
265263
:param _return_http_data_only: response data without head status code
266264
and headers
267265
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -282,9 +280,8 @@ def reply_create_with_http_info(self, project_id, key_id, comment_id, **kwargs):
282280
'project_id',
283281
'key_id',
284282
'comment_id',
285-
'x_phrase_app_otp',
286-
'branch',
287-
'message'
283+
'comment_create_parameters1',
284+
'x_phrase_app_otp'
288285
]
289286
all_params.extend(
290287
[
@@ -315,6 +312,10 @@ def reply_create_with_http_info(self, project_id, key_id, comment_id, **kwargs):
315312
if self.api_client.client_side_validation and ('comment_id' not in local_var_params or # noqa: E501
316313
local_var_params['comment_id'] is None): # noqa: E501
317314
raise ApiValueError("Missing the required parameter `comment_id` when calling `reply_create`") # noqa: E501
315+
# verify the required parameter 'comment_create_parameters1' is set
316+
if self.api_client.client_side_validation and ('comment_create_parameters1' not in local_var_params or # noqa: E501
317+
local_var_params['comment_create_parameters1'] is None): # noqa: E501
318+
raise ApiValueError("Missing the required parameter `comment_create_parameters1` when calling `reply_create`") # noqa: E501
318319

319320
collection_formats = {}
320321

@@ -327,10 +328,6 @@ def reply_create_with_http_info(self, project_id, key_id, comment_id, **kwargs):
327328
path_params['comment_id'] = local_var_params['comment_id'] # noqa: E501
328329

329330
query_params = []
330-
if 'branch' in local_var_params and local_var_params['branch'] is not None: # noqa: E501
331-
query_params.append(('branch', local_var_params['branch'])) # noqa: E501
332-
if 'message' in local_var_params and local_var_params['message'] is not None: # noqa: E501
333-
query_params.append(('message', local_var_params['message'])) # noqa: E501
334331

335332
header_params = {}
336333
if 'x_phrase_app_otp' in local_var_params:
@@ -340,10 +337,16 @@ def reply_create_with_http_info(self, project_id, key_id, comment_id, **kwargs):
340337
local_var_files = {}
341338

342339
body_params = None
340+
if 'comment_create_parameters1' in local_var_params:
341+
body_params = local_var_params['comment_create_parameters1']
343342
# HTTP header `Accept`
344343
header_params['Accept'] = self.api_client.select_header_accept(
345344
['application/json']) # noqa: E501
346345

346+
# HTTP header `Content-Type`
347+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
348+
['application/json']) # noqa: E501
349+
347350
# Authentication setting
348351
auth_settings = ['Basic', 'Token'] # noqa: E501
349352

phrase_api/api/comments_api.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ def comment_create(self, project_id, key_id, comment_create_parameters, **kwargs
4949
:param str key_id: Translation Key ID (required)
5050
:param CommentCreateParameters comment_create_parameters: (required)
5151
:param str x_phrase_app_otp: Two-Factor-Authentication token (optional)
52-
:param str message: specify the message for the comment
53-
:param List[str] locale_ids: specify the locales for the comment
5452
:param _preload_content: if False, the urllib3.HTTPResponse object will
5553
be returned without reading/decoding response
5654
data. Default is True.
@@ -79,8 +77,6 @@ def comment_create_with_http_info(self, project_id, key_id, comment_create_param
7977
:param str key_id: Translation Key ID (required)
8078
:param CommentCreateParameters comment_create_parameters: (required)
8179
:param str x_phrase_app_otp: Two-Factor-Authentication token (optional)
82-
:param str message: specify the message for the comment
83-
:param List[str] locale_ids: specify the locales for the comment
8480
:param _return_http_data_only: response data without head status code
8581
and headers
8682
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -101,9 +97,7 @@ def comment_create_with_http_info(self, project_id, key_id, comment_create_param
10197
'project_id',
10298
'key_id',
10399
'comment_create_parameters',
104-
'x_phrase_app_otp',
105-
'message',
106-
'locale_ids'
100+
'x_phrase_app_otp'
107101
]
108102
all_params.extend(
109103
[
@@ -144,11 +138,6 @@ def comment_create_with_http_info(self, project_id, key_id, comment_create_param
144138
path_params['key_id'] = local_var_params['key_id'] # noqa: E501
145139

146140
query_params = []
147-
if 'message' in local_var_params and local_var_params['message'] is not None: # noqa: E501
148-
query_params.append(('message', local_var_params['message'])) # noqa: E501
149-
if 'locale_ids' in local_var_params and local_var_params['locale_ids'] is not None: # noqa: E501
150-
query_params.append(('locale_ids', local_var_params['locale_ids'])) # noqa: E501
151-
collection_formats['locale_ids'] = 'multi' # noqa: E501
152141

153142
header_params = {}
154143
if 'x_phrase_app_otp' in local_var_params:

phrase_api/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from phrase_api.models.branch_update_parameters import BranchUpdateParameters
3737
from phrase_api.models.comment import Comment
3838
from phrase_api.models.comment_create_parameters import CommentCreateParameters
39+
from phrase_api.models.comment_create_parameters1 import CommentCreateParameters1
3940
from phrase_api.models.comment_mark_read_parameters import CommentMarkReadParameters
4041
from phrase_api.models.comment_reaction import CommentReaction
4142
from phrase_api.models.comment_update_parameters import CommentUpdateParameters

0 commit comments

Comments
 (0)