Skip to content

Commit b0d0384

Browse files
authored
Adding group variant tag for devdocs (#602)
1 parent a55cbc6 commit b0d0384

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/usage/collaboration.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ email_of_invitee = '[email protected]'
4949
collaboration = client.folder(folder_id='22222').collaborate_with_login(email_of_invitee, CollaborationRole.VIEWER)
5050
```
5151

52+
Or, you can invite a group using the group id
53+
54+
<!-- sample post_collaborations group-->
55+
```python
56+
from boxsdk.object.collaboration import CollaborationRole
57+
58+
group = client.group(group_id='11111')
59+
collaboration = client.folder(folder_id='22222').collaborate(group, CollaborationRole.VIEWER)
60+
61+
collaborator = collaboration.accessible_by
62+
item = collaboration.item
63+
has_accepted = 'has' if collaboration.status == 'accepted' else 'has not'
64+
print('{0} {1} accepted the collaboration to folder "{2}"'.format(collaborator.name, has_accepted, item.name))
65+
```
66+
5267
> __Note:__ The `can_view_path` parameter is currently only available for collaborations on folders.
5368
5469
[collaborate]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.item.Item.collaborate

0 commit comments

Comments
 (0)