Skip to content

Commit 6c34155

Browse files
author
Phrase
committed
1 parent 31188a9 commit 6c34155

9 files changed

Lines changed: 35 additions & 7 deletions

docs/Upload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**tag** | **str** | Unique tag of the upload | [optional]
1111
**tags** | **List[str]** | List of tags that were assigned to the uploaded keys | [optional]
1212
**url** | **str** | The URL to the upload in Phrase Strings app. | [optional]
13+
**user** | [**UserPreview**](.md) | | [optional]
1314
**summary** | [**UploadSummary**](UploadSummary.md) | | [optional]
1415
**created_at** | **datetime** | | [optional]
1516
**updated_at** | **datetime** | | [optional]

phrase_api/models/upload.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Upload(object):
3939
'tag': 'str',
4040
'tags': 'List[str]',
4141
'url': 'str',
42+
'user': 'UserPreview',
4243
'summary': 'UploadSummary',
4344
'created_at': 'datetime',
4445
'updated_at': 'datetime'
@@ -52,12 +53,13 @@ class Upload(object):
5253
'tag': 'tag',
5354
'tags': 'tags',
5455
'url': 'url',
56+
'user': 'user',
5557
'summary': 'summary',
5658
'created_at': 'created_at',
5759
'updated_at': 'updated_at'
5860
}
5961

60-
def __init__(self, id=None, filename=None, format=None, state=None, tag=None, tags=None, url=None, summary=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501
62+
def __init__(self, id=None, filename=None, format=None, state=None, tag=None, tags=None, url=None, user=None, summary=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501
6163
"""Upload - a model defined in OpenAPI""" # noqa: E501
6264
if local_vars_configuration is None:
6365
local_vars_configuration = Configuration()
@@ -70,6 +72,7 @@ def __init__(self, id=None, filename=None, format=None, state=None, tag=None, ta
7072
self._tag = None
7173
self._tags = None
7274
self._url = None
75+
self._user = None
7376
self._summary = None
7477
self._created_at = None
7578
self._updated_at = None
@@ -89,6 +92,8 @@ def __init__(self, id=None, filename=None, format=None, state=None, tag=None, ta
8992
self.tags = tags
9093
if url is not None:
9194
self.url = url
95+
if user is not None:
96+
self.user = user
9297
if summary is not None:
9398
self.summary = summary
9499
if created_at is not None:
@@ -249,6 +254,27 @@ def url(self, url):
249254

250255
self._url = url
251256

257+
@property
258+
def user(self):
259+
"""Gets the user of this Upload. # noqa: E501
260+
261+
262+
:return: The user of this Upload. # noqa: E501
263+
:rtype: UserPreview
264+
"""
265+
return self._user
266+
267+
@user.setter
268+
def user(self, user):
269+
"""Sets the user of this Upload.
270+
271+
272+
:param user: The user of this Upload. # noqa: E501
273+
:type: UserPreview
274+
"""
275+
276+
self._user = user
277+
252278
@property
253279
def summary(self):
254280
"""Gets the summary of this Upload. # 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@4c3133a1',
49+
screenshot = '[B@11f8bff1',
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@2fea162a',
49+
screenshot = '[B@3fb2306',
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@157f284b',
44+
project_image = '[B@3fa27158',
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@15c5c99',
46+
project_image = '[B@4b2b2757',
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@20e06a86'
43+
filename = '[B@3d7c21b7'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

test/test_upload.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def make_instance(self, include_optional):
4646
''
4747
],
4848
url = '',
49+
user = {"id":"abcd1234cdef1234abcd1234cdef1234","username":"johndoe","name":"John Doe","gravatar_uid":"205e460b479e2e5b48aec07710c08d50"},
4950
summary = phrase_api.models.upload_summary.upload_summary(
5051
locales_created = 56,
5152
translation_keys_created = 56,

test/test_upload_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def make_instance(self, include_optional):
4444
project = {"id":"abcd1234cdef1234abcd1234cdef1234","name":"My Android Project","main_format":"xml","created_at":"2015-01-28T09:52:53Z","updated_at":"2015-01-28T09:52:53Z"},
4545
user = {"id":"abcd1234cdef1234abcd1234cdef1234","username":"johndoe","name":"John Doe","gravatar_uid":"205e460b479e2e5b48aec07710c08d50"},
4646
uploads = [
47-
{"id":"abcd1234cdef1234abcd1234cdef1234","filename":"example.json","format":"json","state":"success","tag":"tag","summary":{"locales_created":2,"translation_keys_created":162,"translation_keys_updated":10,"translation_keys_unmentioned":0,"translations_created":291,"translations_updated":3,"tags_created":2,"translation_keys_ignored":0},"created_at":"2015-01-28T09:52:53Z","updated_at":"2015-01-28T09:52:53Z"}
47+
{"id":"abcd1234cdef1234abcd1234cdef1234","filename":"example.json","format":"json","state":"success","tag":"tag","summary":{"locales_created":2,"translation_keys_created":162,"translation_keys_updated":10,"translation_keys_unmentioned":0,"translations_created":291,"translations_updated":3,"tags_created":2,"translation_keys_ignored":0},"user":{"id":"abcd1234cdef1234abcd1234cdef1234","username":"johndoe","name":"John Doe","gravatar_uid":"205e460b479e2e5b48aec07710c08d50"},"created_at":"2015-01-28T09:52:53Z","updated_at":"2015-01-28T09:52:53Z"}
4848
]
4949
)
5050
else :

0 commit comments

Comments
 (0)