Skip to content

Commit 84d46e6

Browse files
authored
Merge branch 'master' into nicholasks/add-tags-query-string-arg
2 parents 09f742a + 9b11573 commit 84d46e6

8 files changed

Lines changed: 59 additions & 7 deletions

File tree

build/lib/syncsketch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
from .syncsketch import SyncSketchAPI
1010

11-
__version__ = "1.0.8.3"
11+
__version__ = "1.0.8.5"
1212
__author__ = "SyncSketch Dev Team"
1313
__credits__ = "Philip Floetotto, Yafes Sahin, Brady Endres"

build/lib/syncsketch/syncsketch.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# @Author: floepi
44
# @Date: 2015-06-04 17:42:44
55
# @Last Modified by: Nícholas Kegler
6-
# @Last Modified time: 2021-03-02
6+
# @Last Modified time: 2021-05-03
77
#!/usr/local/bin/python
88

99
from __future__ import absolute_import, division, print_function
@@ -606,6 +606,26 @@ def connect_item_to_review(self, item_id, review_id):
606606
print("A new improved method for this will be added soon.")
607607
return "Deprecated"
608608

609+
def move_items(self, new_review_id, item_data):
610+
"""
611+
Move items from one review to another
612+
613+
item_data should be a list of dictionaries with the old review id and the item id.
614+
The items in the list will be moved to the new review for the param new_review_id
615+
616+
:param new_review_id: int
617+
:param item_data: list [ dict { review_id: int, item_id: int} ]
618+
:return:
619+
"""
620+
621+
return self._get_json_response(
622+
"move-review-items/",
623+
method="post",
624+
api_version="v2",
625+
postData={"new_review_id": new_review_id, "item_data": item_data},
626+
raw_response=True,
627+
)
628+
609629
"""
610630
Frames (Sketches / Comments)
611631
"""
@@ -753,6 +773,12 @@ def get_user_by_email(self, email):
753773
def get_users_by_project_id(self, project_id):
754774
return self._get_json_response("all-project-users/{}".format(project_id), api_version="v2")
755775

776+
def get_connections_by_user_id(self, user_id, account_id):
777+
"""
778+
Get all project and account connections for a user. Good for checking access for a user that might have left...
779+
"""
780+
return self._get_json_response("user/{}/connections/account/{}".format(user_id, account_id), api_version="v2")
781+
756782
def get_user_by_id(self, userId):
757783
return self._get_json_response("simpleperson/%s" % userId)
758784

12.1 KB
Binary file not shown.

dist/syncsketch-1.0.8.5.tar.gz

10.8 KB
Binary file not shown.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# @Author: yafes
22
# @Date: 2018-11-20 17:36:16
33
# @Last Modified by: Brady Endres
4-
# @Last Modified time: 2021-02-23
4+
# @Last Modified time: 2021-04-06
55

66
from setuptools import setup, find_packages
77

@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="syncsketch",
13-
version="1.0.8.3",
13+
version="1.0.8.5",
1414
description="SyncSketch Python API",
1515
author="Philip Floetotto",
1616
author_email="phil@syncsketch.com",

syncsketch.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: syncsketch
3-
Version: 1.0.8.3
3+
Version: 1.0.8.5
44
Summary: SyncSketch Python API
55
Home-page: https://github.com/syncsketch/python-api
66
Author: Philip Floetotto

syncsketch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
from .syncsketch import SyncSketchAPI
1010

11-
__version__ = "1.0.8.3"
11+
__version__ = "1.0.8.5"
1212
__author__ = "SyncSketch Dev Team"
1313
__credits__ = "Philip Floetotto, Yafes Sahin, Brady Endres"

syncsketch/syncsketch.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# @Author: floepi
44
# @Date: 2015-06-04 17:42:44
55
# @Last Modified by: Nícholas Kegler
6-
# @Last Modified time: 2021-03-02
6+
# @Last Modified time: 2021-05-03
77
#!/usr/local/bin/python
88

99
from __future__ import absolute_import, division, print_function
@@ -606,6 +606,26 @@ def connect_item_to_review(self, item_id, review_id):
606606
print("A new improved method for this will be added soon.")
607607
return "Deprecated"
608608

609+
def move_items(self, new_review_id, item_data):
610+
"""
611+
Move items from one review to another
612+
613+
item_data should be a list of dictionaries with the old review id and the item id.
614+
The items in the list will be moved to the new review for the param new_review_id
615+
616+
:param new_review_id: int
617+
:param item_data: list [ dict { review_id: int, item_id: int} ]
618+
:return:
619+
"""
620+
621+
return self._get_json_response(
622+
"move-review-items/",
623+
method="post",
624+
api_version="v2",
625+
postData={"new_review_id": new_review_id, "item_data": item_data},
626+
raw_response=True,
627+
)
628+
609629
"""
610630
Frames (Sketches / Comments)
611631
"""
@@ -753,6 +773,12 @@ def get_user_by_email(self, email):
753773
def get_users_by_project_id(self, project_id):
754774
return self._get_json_response("all-project-users/{}".format(project_id), api_version="v2")
755775

776+
def get_connections_by_user_id(self, user_id, account_id):
777+
"""
778+
Get all project and account connections for a user. Good for checking access for a user that might have left...
779+
"""
780+
return self._get_json_response("user/{}/connections/account/{}".format(user_id, account_id), api_version="v2")
781+
756782
def get_user_by_id(self, userId):
757783
return self._get_json_response("simpleperson/%s" % userId)
758784

0 commit comments

Comments
 (0)