Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -2787,6 +2787,71 @@ def team_team_folder_restore(self, team_folder_id):
)
return r

def team_team_folder_space_limit_get(self, team_folder_id):
"""
Returns the space limit configuration of a team folder. See
:class:`dropbox.team.TeamFolderSpaceLimitCapsType` for how space limits
are enforced.

Route attributes:
scope: team_data.content.read

:param team_folder_id: The ID of the team folder.
:type team_folder_id: str
:rtype: :class:`dropbox.team.TeamFolderGetSpaceLimitResponse`
"""
arg = team.TeamFolderIdArg(team_folder_id)
r = self.request(
team.team_folder_space_limit_get,
"team",
arg,
None,
)
return r

def team_team_folder_space_limit_set(
self, team_folder_id, space_limit_bytes, caps_type, notification_target
):
"""
Sets the space limit configuration of a team folder, replacing any
existing configuration. See
:class:`dropbox.team.TeamFolderSpaceLimitCapsType` for how space limits
are enforced.

Route attributes:
scope: team_data.content.write

:param space_limit_bytes: The maximum total size, in bytes, of all
content in the team folder and its subfolders. When ``caps_type`` is
``TeamFolderSpaceLimitCapsType.soft`` or
``TeamFolderSpaceLimitCapsType.hard``, this must be at least 2 GB
(2147483648 bytes). It must never exceed the team's total storage
capacity. When ``caps_type`` is
``TeamFolderSpaceLimitCapsType.off``, the value is stored but has no
effect, and it may be 0.
:type space_limit_bytes: int
:param caps_type: The caps type to apply to the specified team folder.
:type caps_type: :class:`dropbox.team.TeamFolderSpaceLimitCapsType`
:param notification_target: Who receives usage notifications for the
specified team folder.
:type notification_target: :class:`dropbox.team.TeamFolderSpaceLimitNotificationTarget`
:rtype: None
:raises: :class:`.exceptions.ApiError`

If this raises, ApiError will contain:
:class:`dropbox.team.TeamFolderSetSpaceLimitError`
"""
arg = team.TeamFolderSetSpaceLimitArg(
team_folder_id, space_limit_bytes, caps_type, notification_target
)
r = self.request(
team.team_folder_space_limit_set,
"team",
arg,
None,
)
return None

def team_team_folder_update_sync_settings(
self, team_folder_id, sync_setting=None, content_sync_settings=None
):
Expand Down
Loading
Loading