Skip to content

Commit

Permalink
Updated spec
Browse files Browse the repository at this point in the history
  • Loading branch information
starforever committed Dec 12, 2018
1 parent 86d1c55 commit aed19be
Show file tree
Hide file tree
Showing 14 changed files with 975 additions and 317 deletions.
2 changes: 1 addition & 1 deletion dropbox/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def retry_after(self):
The number of seconds that the app should wait before making another
request.
:rtype: long
:rtype: int
"""
if self._retry_after_present:
return self._retry_after_value
Expand Down
230 changes: 159 additions & 71 deletions dropbox/base.py

Large diffs are not rendered by default.

46 changes: 35 additions & 11 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def team_devices_list_members_devices(self,
include_desktop_clients=True,
include_mobile_clients=True):
"""
List all device sessions of a team.
List all device sessions of a team. Permission : Team member file
access.
:param Nullable cursor: At the first call to the
:meth:`team_devices_list_members_devices` the cursor shouldn't be
Expand Down Expand Up @@ -266,7 +267,8 @@ def team_devices_list_team_devices(self,
include_desktop_clients=True,
include_mobile_clients=True):
"""
List all device sessions of a team.
List all device sessions of a team. Permission : Team member file
access.
:param Nullable cursor: At the first call to the
:meth:`team_devices_list_team_devices` the cursor shouldn't be
Expand Down Expand Up @@ -491,7 +493,7 @@ def team_groups_list(self,
"""
Lists groups on a team. Permission : Team Information.
:param long limit: Number of results to return per call.
:param int limit: Number of results to return per call.
:rtype: :class:`dropbox.team.GroupsListResult`
"""
arg = team.GroupsListArg(limit)
Expand Down Expand Up @@ -564,7 +566,7 @@ def team_groups_members_list(self,
:param group: The group whose members are to be listed.
:type group: :class:`dropbox.team.GroupSelector`
:param long limit: Number of results to return per call.
:param int limit: Number of results to return per call.
:rtype: :class:`dropbox.team.GroupsMembersListResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -863,7 +865,7 @@ def team_member_space_limits_excluded_users_list(self,
"""
List member space limits excluded users.
:param long limit: Number of results to return per call.
:param int limit: Number of results to return per call.
:rtype: :class:`dropbox.team.ExcludedUsersListResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -1073,7 +1075,7 @@ def team_members_list(self,
"""
Lists members of a team. Permission : Team information.
:param long limit: Number of results to return per call.
:param int limit: Number of results to return per call.
:param bool include_removed: Whether to return removed members.
:rtype: :class:`dropbox.team.MembersListResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -1426,7 +1428,7 @@ def team_namespaces_list(self,
folders may be owned by other users or other teams. Duplicates may occur
in the list.
:param long limit: Specifying a value here has no effect.
:param int limit: Specifying a value here has no effect.
:rtype: :class:`dropbox.team.TeamNamespacesListResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -1470,6 +1472,15 @@ def team_properties_template_add(self,
name,
description,
fields):
"""
Permission : Team member file access.
:rtype: :class:`dropbox.team.AddTemplateResult`
:raises: :class:`.exceptions.ApiError`
If this raises, ApiError will contain:
:class:`dropbox.team.ModifyTemplateError`
"""
warnings.warn(
'properties/template/add is deprecated.',
DeprecationWarning,
Expand All @@ -1488,6 +1499,8 @@ def team_properties_template_add(self,
def team_properties_template_get(self,
template_id):
"""
Permission : Team member file access.
:param str template_id: An identifier for template added by route See
:meth:`team_templates_add_for_user` or
:meth:`team_templates_add_for_team`.
Expand All @@ -1511,6 +1524,15 @@ def team_properties_template_get(self,
return r

def team_properties_template_list(self):
"""
Permission : Team member file access.
:rtype: :class:`dropbox.team.ListTemplateResult`
:raises: :class:`.exceptions.ApiError`
If this raises, ApiError will contain:
:class:`dropbox.team.TemplateError`
"""
warnings.warn(
'properties/template/list is deprecated.',
DeprecationWarning,
Expand All @@ -1530,6 +1552,8 @@ def team_properties_template_update(self,
description=None,
add_fields=None):
"""
Permission : Team member file access.
:param str template_id: An identifier for template added by See
:meth:`team_templates_add_for_user` or
:meth:`team_templates_add_for_team`.
Expand Down Expand Up @@ -1769,7 +1793,7 @@ def team_team_folder_list(self,
"""
Lists all team folders. Permission : Team member file access.
:param long limit: The maximum number of results to return per request.
:param int limit: The maximum number of results to return per request.
:rtype: :class:`dropbox.team.TeamFolderListResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -1918,9 +1942,9 @@ def team_log_get_events(self,
</developers/documentation/http/teams#team-features-get_values>`_ to
check for this feature. Permission : Team Auditing.
:param long limit: The maximal number of results to return per call.
Note that some calls may not return ``limit`` number of events, and
may even return no events, even with `has_more` set to true. In this
:param int limit: The maximal number of results to return per call. Note
that some calls may not return ``limit`` number of events, and may
even return no events, even with `has_more` set to true. In this
case, callers should fetch again using
:meth:`team_log_get_events_continue`.
:param Nullable account_id: Filter the events by account ID. Return ony
Expand Down
2 changes: 1 addition & 1 deletion dropbox/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def __repr__(self):
DisplayName_validator = bv.String(min_length=1, pattern=u'[^/:?*<>"|]*')
DisplayNameLegacy_validator = bv.String()
DropboxTimestamp_validator = bv.Timestamp(u'%Y-%m-%dT%H:%M:%SZ')
EmailAddress_validator = bv.String(max_length=255, pattern=u"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$")
EmailAddress_validator = bv.String(max_length=255, pattern=u"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$")
# A ISO639-1 code.
LanguageCode_validator = bv.String(min_length=2)
NamePart_validator = bv.String(min_length=1, max_length=100, pattern=u'[^/:?*<>"|]*')
Expand Down
14 changes: 8 additions & 6 deletions dropbox/file_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CreateFileRequestArgs(bb.Struct):
files will be sent. For apps with the app folder permission, this will
be relative to the app folder.
:ivar deadline: The deadline for the file request. Deadlines can only be set
by Pro and Business accounts.
by Professional and Business accounts.
:ivar open: Whether or not the file request should be open. If the file
request is closed, it will not accept any file submissions, but it can
be opened later.
Expand Down Expand Up @@ -126,8 +126,8 @@ def destination(self):
@property
def deadline(self):
"""
The deadline for the file request. Deadlines can only be set by Pro and
Business accounts.
The deadline for the file request. Deadlines can only be set by
Professional and Business accounts.
:rtype: FileRequestDeadline
"""
Expand Down Expand Up @@ -625,7 +625,7 @@ def file_count(self):
"""
The number of files this file request has received.
:rtype: long
:rtype: int
"""
if self._file_count_present:
return self._file_count_value
Expand Down Expand Up @@ -979,7 +979,8 @@ class UpdateFileRequestArgs(bb.Struct):
:ivar destination: The new path of the folder in the Dropbox where uploaded
files will be sent. For apps with the app folder permission, this will
be relative to the app folder.
:ivar deadline: The new deadline for the file request.
:ivar deadline: The new deadline for the file request. Deadlines can only be
set by Professional and Business accounts.
:ivar open: Whether to set this file request as open or closed.
"""

Expand Down Expand Up @@ -1105,7 +1106,8 @@ def destination(self):
@property
def deadline(self):
"""
The new deadline for the file request.
The new deadline for the file request. Deadlines can only be set by
Professional and Business accounts.
:rtype: UpdateFileRequestDeadline
"""
Expand Down
Loading

0 comments on commit aed19be

Please sign in to comment.