Skip to content

Commit 30d82aa

Browse files
authored
Merge pull request #157 from box/client_collaboration_init
For consistency with other objects, can use `client.collaboration('box_id').do_something(...)` the same way we do with `Folder`, `File`, etc.
2 parents 5f7df73 + 9f5c943 commit 30d82aa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

boxsdk/client/client.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ def group(self, group_id):
109109
"""
110110
return Translator().translate('group')(session=self._session, object_id=group_id)
111111

112+
def collaboration(self, collab_id):
113+
"""
114+
Initialize a :class:`Collaboration` object, whose box id is collab_id.
115+
116+
:param collab_id:
117+
The box id of the :class:`Collaboration` object.
118+
:type collab_id:
119+
`unicode`
120+
:return:
121+
A :class:`Collaboration` object with the given group id.
122+
:rtype:
123+
:class:`Collaboration`
124+
"""
125+
return Translator().translate('collaboration')(session=self._session, object_id=collab_id)
126+
112127
def users(self, limit=None, offset=0, filter_term=None):
113128
"""
114129
Get a list of all users for the Enterprise along with their user_id, public_name, and login.

0 commit comments

Comments
 (0)