Commit 1eeffe1c authored by Michael Fladischer's avatar Michael Fladischer

Update upstream source from tag 'upstream/9.3.0'

Update to upstream version '9.3.0'
with Debian dir f1593c5093a0cce50260a70a7898727f869ec510
parents 42c5bf78 dd6dc2dd
Dropbox for Python
==================
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v9.2.0
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v9.3.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
......
......@@ -357,7 +357,7 @@ class RateLimitError(bb.Struct):
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
......
This diff is collapsed.
......@@ -229,7 +229,8 @@ class DropboxTeamBase(object):
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
......@@ -266,7 +267,8 @@ class DropboxTeamBase(object):
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
......@@ -491,7 +493,7 @@ class DropboxTeamBase(object):
"""
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)
......@@ -564,7 +566,7 @@ class DropboxTeamBase(object):
: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`
......@@ -863,7 +865,7 @@ class DropboxTeamBase(object):
"""
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`
......@@ -1073,7 +1075,7 @@ class DropboxTeamBase(object):
"""
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`
......@@ -1426,7 +1428,7 @@ class DropboxTeamBase(object):
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`
......@@ -1470,6 +1472,15 @@ class DropboxTeamBase(object):
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,
......@@ -1488,6 +1499,8 @@ class DropboxTeamBase(object):
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`.
......@@ -1511,6 +1524,15 @@ class DropboxTeamBase(object):
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,
......@@ -1530,6 +1552,8 @@ class DropboxTeamBase(object):
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`.
......@@ -1769,7 +1793,7 @@ class DropboxTeamBase(object):
"""
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`
......@@ -1918,9 +1942,9 @@ class DropboxTeamBase(object):
</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
......
......@@ -382,7 +382,7 @@ Date_validator = bv.Timestamp(u'%Y-%m-%d')
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'[^/:?*<>"|]*')
......
......@@ -6,7 +6,7 @@ __all__ = [
# This should always be 0.0.0 in master. Only update this after tagging
# before release.
__version__ = '9.2.0'
__version__ = '9.3.0'
import contextlib
import json
......
......@@ -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.
......@@ -126,8 +126,8 @@ class CreateFileRequestArgs(bb.Struct):
@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
"""
......@@ -625,7 +625,7 @@ class FileRequest(bb.Struct):
"""
The number of files this file request has received.
:rtype: long
:rtype: int
"""
if self._file_count_present:
return self._file_count_value
......@@ -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.
"""
......@@ -1105,7 +1106,8 @@ class UpdateFileRequestArgs(bb.Struct):
@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
"""
......
This diff is collapsed.
......@@ -1399,7 +1399,7 @@ class ListPaperDocsArgs(bb.Struct):
Size limit per batch. The maximum number of docs that can be retrieved
per batch is 1000. Higher value results in invalid arguments error.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -1872,7 +1872,7 @@ class ListUsersOnFolderArgs(RefPaperDoc):
Size limit per batch. The maximum number of users that can be retrieved
per batch is 1000. Higher value results in invalid arguments error.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -2166,7 +2166,7 @@ class ListUsersOnPaperDocArgs(RefPaperDoc):
Size limit per batch. The maximum number of users that can be retrieved
per batch is 1000. Higher value results in invalid arguments error.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -2773,7 +2773,7 @@ class PaperDocCreateUpdateResult(bb.Struct):
"""
The Paper doc revision. Simply an ever increasing number.
:rtype: long
:rtype: int
"""
if self._revision_present:
return self._revision_value
......@@ -2971,7 +2971,7 @@ class PaperDocExportResult(bb.Struct):
"""
The Paper doc revision. Simply an ever increasing number.
:rtype: long
:rtype: int
"""
if self._revision_present:
return self._revision_value
......@@ -3200,7 +3200,7 @@ class PaperDocUpdateArgs(RefPaperDoc):
The latest doc revision. This value must match the head revision or an
error code will be returned. This is to prevent colliding writes.
:rtype: long
:rtype: int
"""
if self._revision_present:
return self._revision_value
......
......@@ -725,8 +725,8 @@ class AddFolderMemberError(bb.Union):
contains a bad invitation recipient.
:ivar cant_share_outside_team: Your team policy does not allow sharing
outside of the team.
:ivar long too_many_members: The value is the member limit that was reached.
:ivar long too_many_pending_invites: The value is the pending invite limit
:ivar int too_many_members: The value is the member limit that was reached.
:ivar int too_many_pending_invites: The value is the pending invite limit
that was reached.
:ivar rate_limit: The current user has hit the limit of invites they can
send per day. Try again in 24 hours.
......@@ -787,7 +787,7 @@ class AddFolderMemberError(bb.Union):
Create an instance of this class set to the ``too_many_members`` tag
with value ``val``.
:param long val:
:param int val:
:rtype: AddFolderMemberError
"""
return cls('too_many_members', val)
......@@ -798,7 +798,7 @@ class AddFolderMemberError(bb.Union):
Create an instance of this class set to the ``too_many_pending_invites``
tag with value ``val``.
:param long val:
:param int val:
:rtype: AddFolderMemberError
"""
return cls('too_many_pending_invites', val)
......@@ -929,7 +929,7 @@ class AddFolderMemberError(bb.Union):
Only call this if :meth:`is_too_many_members` is true.
:rtype: long
:rtype: int
"""
if not self.is_too_many_members():
raise AttributeError("tag 'too_many_members' not set")
......@@ -941,7 +941,7 @@ class AddFolderMemberError(bb.Union):
Only call this if :meth:`is_too_many_pending_invites` is true.
:rtype: long
:rtype: int
"""
if not self.is_too_many_pending_invites():
raise AttributeError("tag 'too_many_pending_invites' not set")
......@@ -1299,7 +1299,7 @@ class AudienceExceptions(bb.Struct):
@property
def count(self):
"""
:rtype: long
:rtype: int
"""
if self._count_present:
return self._count_value
......@@ -3152,7 +3152,7 @@ class FileLinkMetadata(SharedLinkMetadata):
"""
The file size in bytes.
:rtype: long
:rtype: int
"""
if self._size_present:
return self._size_value
......@@ -5729,7 +5729,7 @@ class InsufficientQuotaAmounts(bb.Struct):
"""
The amount of space needed to add the item (the size of the item).
:rtype: long
:rtype: int
"""
if self._space_needed_present:
return self._space_needed_value
......@@ -5752,7 +5752,7 @@ class InsufficientQuotaAmounts(bb.Struct):
"""
The amount of extra space needed to add the item.
:rtype: long
:rtype: int
"""
if self._space_shortage_present:
return self._space_shortage_value
......@@ -5775,7 +5775,7 @@ class InsufficientQuotaAmounts(bb.Struct):
"""
The amount of space left in the user's Dropbox, less than space_needed.
:rtype: long
:rtype: int
"""
if self._space_left_present:
return self._space_left_value
......@@ -7057,7 +7057,7 @@ class ListFileMembersArg(bb.Struct):
Number of members to return max per query. Defaults to 100 if no limit
is specified.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -7148,7 +7148,7 @@ class ListFileMembersBatchArg(bb.Struct):
Number of members to return max per query. Defaults to 10 if no limit is
specified.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -7482,7 +7482,7 @@ class ListFileMembersCountResult(bb.Struct):
The number of members on this file. This does not include inherited
members.
:rtype: long
:rtype: int
"""
if self._member_count_present:
return self._member_count_value
......@@ -7731,7 +7731,7 @@ class ListFilesArg(bb.Struct):
Number of files to return max per query. Defaults to 100 if no limit is
specified.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -8071,7 +8071,7 @@ class ListFolderMembersCursorArg(bb.Struct):
The maximum number of results that include members, groups and invitees
to return per request.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -8317,7 +8317,7 @@ class ListFoldersArgs(bb.Struct):
"""
The maximum number of results to return per request.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......
This diff is collapsed.
......@@ -208,7 +208,7 @@ class GroupSummary(bb.Struct):
"""
The number of members in the group.
:rtype: long
:rtype: int
"""
if self._member_count_present:
return self._member_count_value
......
......@@ -4639,7 +4639,7 @@ class DeviceDeleteOnUnlinkFailDetails(bb.Struct):
"""
The number of times that remote file deletion failed.
:rtype: long
:rtype: int
"""
if self._num_failures_present:
return self._num_failures_value
......@@ -5899,7 +5899,7 @@ class DomainInvitesEmailExistingUsersDetails(bb.Struct):
"""
Number of recipients.
:rtype: long
:rtype: int
"""
if self._num_recipients_present:
return self._num_recipients_value
......@@ -6662,7 +6662,7 @@ class DurationLogInfo(bb.Struct):
"""
Amount of time.
:rtype: long
:rtype: int
"""
if self._amount_present:
return self._amount_value
......@@ -29881,7 +29881,7 @@ class FileRequestDetails(bb.Struct):
"""
Asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._asset_index_present:
return self._asset_index_value
......@@ -31372,7 +31372,7 @@ class GetTeamEventsArg(bb.Struct):
fetch again using
:meth:`dropbox.dropbox.Dropbox.team_log_get_events_continue`.
:rtype: long
:rtype: int
"""
if self._limit_present:
return self._limit_value
......@@ -36071,7 +36071,7 @@ class MemberSpaceLimitsAddCustomQuotaDetails(bb.Struct):
"""
New custom quota value in bytes.
:rtype: long
:rtype: int
"""
if self._new_value_present:
return self._new_value_value
......@@ -36381,7 +36381,7 @@ class MemberSpaceLimitsChangeCustomQuotaDetails(bb.Struct):
"""
Previous custom quota value in bytes.
:rtype: long
:rtype: int
"""
if self._previous_value_present:
return self._previous_value_value
......@@ -36404,7 +36404,7 @@ class MemberSpaceLimitsChangeCustomQuotaDetails(bb.Struct):
"""
New custom quota value in bytes.
:rtype: long
:rtype: int
"""
if self._new_value_present:
return self._new_value_value
......@@ -36517,7 +36517,7 @@ class MemberSpaceLimitsChangePolicyDetails(bb.Struct):
Previous team default limit value in bytes. Might be missing due to
historical data gap.
:rtype: long
:rtype: int
"""
if self._previous_value_present:
return self._previous_value_value
......@@ -36544,7 +36544,7 @@ class MemberSpaceLimitsChangePolicyDetails(bb.Struct):
New team default limit value in bytes. Might be missing due to
historical data gap.
:rtype: long
:rtype: int
"""
if self._new_value_present:
return self._new_value_value
......@@ -39578,7 +39578,7 @@ class PaperContentAddToFolderDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -39601,7 +39601,7 @@ class PaperContentAddToFolderDetails(bb.Struct):
"""
Parent asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._parent_asset_index_present:
return self._parent_asset_index_value
......@@ -40046,7 +40046,7 @@ class PaperContentRemoveFromFolderDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -40069,7 +40069,7 @@ class PaperContentRemoveFromFolderDetails(bb.Struct):
"""
Parent asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._parent_asset_index_present:
return self._parent_asset_index_value
......@@ -44939,7 +44939,7 @@ class RelocateAssetReferencesLogInfo(bb.Struct):
"""
Source asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._src_asset_index_present:
return self._src_asset_index_value
......@@ -44962,7 +44962,7 @@ class RelocateAssetReferencesLogInfo(bb.Struct):
"""
Destination asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._dest_asset_index_present:
return self._dest_asset_index_value
......@@ -45444,7 +45444,7 @@ class SfAddGroupDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -45637,7 +45637,7 @@ class SfAllowNonMembersToViewSharedLinksDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -45815,7 +45815,7 @@ class SfExternalInviteWarnDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46021,7 +46021,7 @@ class SfFbInviteChangeRoleDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46218,7 +46218,7 @@ class SfFbInviteDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46378,7 +46378,7 @@ class SfFbUninviteDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46503,7 +46503,7 @@ class SfInviteGroupDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46612,7 +46612,7 @@ class SfTeamGrantAccessDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46763,7 +46763,7 @@ class SfTeamInviteChangeRoleDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -46960,7 +46960,7 @@ class SfTeamInviteDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -47120,7 +47120,7 @@ class SfTeamJoinDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -47223,7 +47223,7 @@ class SfTeamJoinFromOobLinkDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -47457,7 +47457,7 @@ class SfTeamUninviteDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -58324,7 +58324,7 @@ class SsoChangeSamlIdentityModeDetails(bb.Struct):
"""
Previous single sign-on identity mode.
:rtype: long
:rtype: int
"""
if self._previous_value_present:
return self._previous_value_value
......@@ -58347,7 +58347,7 @@ class SsoChangeSamlIdentityModeDetails(bb.Struct):
"""
New single sign-on identity mode.
:rtype: long
:rtype: int
"""
if self._new_value_present:
return self._new_value_value
......@@ -59542,7 +59542,7 @@ class TeamFolderDowngradeDetails(bb.Struct):
"""
Target asset position in the Assets list.
:rtype: long
:rtype: int
"""
if self._target_asset_index_present:
return self._target_asset_index_value
......@@ -1092,7 +1092,7 @@ class IndividualSpaceAllocation(bb.Struct):
"""
The total space allocated to the user's account (bytes).
:rtype: long
:rtype: int
"""
if self._allocated_present:
return self._allocated_value
......@@ -1440,7 +1440,7 @@ class SpaceUsage(bb.Struct):
"""
The user's total space usage (bytes).
:rtype: long
:rtype: int
"""
if self._used_present:
return self._used_value
......@@ -1543,7 +1543,7 @@ class TeamSpaceAllocation(bb.Struct):
"""
The total space currently used by the user's team (bytes).
:rtype: long
:rtype: int
"""
if self._used_present:
return self._used_value
......@@ -1566,7 +1566,7 @@ class TeamSpaceAllocation(bb.Struct):
"""
The total space allocated to the user's team (bytes).
:rtype: long
:rtype: int
"""
if self._allocated_present:
return self._allocated_value
......@@ -1591,7 +1591,7 @@ class TeamSpaceAllocation(bb.Struct):
means that no restriction is imposed on the user's quota within its
team).
:rtype: long
:rtype: int
"""
if self._user_within_team_space_allocated_present:
return self._user_within_team_space_allocated_value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment