Commit bb2bb599 authored by Michael Fladischer's avatar Michael Fladischer

New upstream version 9.4.0

parent dd6dc2dd
......@@ -12,3 +12,4 @@ __pycache__/
*.pyc
*.pyo
*~
.venv
\ No newline at end of file
[MESSAGES CONTROL]
disable=C,R,file-ignored,fixme,locally-disabled,protected-access,useless-else-on-loop
disable=C,R,file-ignored,fixme,locally-disabled,protected-access,useless-else-on-loop,unnecessary-pass
enable=useless-suppression
[REPORTS]
......
# .readthedocs.yml
# Don't build any extra formats
# https://docs.readthedocs.io/en/latest/yaml-config.html#formats
formats: []
Dropbox for Python
==================
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v9.3.0
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v9.4.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
......
:mod:`dropbox.async_` -- Async
==============================
*As of Python 3.5,* ``async`` *is a reserved keyword. For versions of Python prior to 3.5, the objects documented can be imported from either* ``dropbox.async`` *or* ``dropbox.async_``. *For Python 3.5+, only* ``dropbox.async_`` *is supported.*
.. automodule:: dropbox.async_
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.auth` -- Auth
===========================
.. automodule:: dropbox.auth
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.common` -- Common
===============================
.. automodule:: dropbox.common
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.contacts` -- Contacts
===================================
.. automodule:: dropbox.contacts
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.dropbox` -- Dropbox
=================================
.. automodule:: dropbox.dropbox
:members:
:show-inheritance:
:inherited-members:
:special-members: __init__
:undoc-members:
:mod:`dropbox.exceptions` -- Exceptions
=======================================
.. automodule:: dropbox.exceptions
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.file_properties` -- File Properties
=================================================
.. automodule:: dropbox.file_properties
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.file_requests` -- File Requests
=============================================
.. automodule:: dropbox.file_requests
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.files` -- Files
=============================
.. automodule:: dropbox.files
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.oauth` -- OAuth
=============================
.. automodule:: dropbox.oauth
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.paper` -- Paper
=============================
.. automodule:: dropbox.paper
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.seen_state` -- Seen State
=======================================
.. automodule:: dropbox.seen_state
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.sharing` -- Sharing
=================================
.. automodule:: dropbox.sharing
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team` -- Team
===========================
.. automodule:: dropbox.team
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team_common` -- Team Common
=========================================
.. automodule:: dropbox.team_common
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team_log` -- Team Log
===================================
.. automodule:: dropbox.team_log
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team_policies` -- Team Policies
=============================================
.. automodule:: dropbox.team_policies
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.users` -- Users
=============================
.. automodule:: dropbox.users
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.users_common` -- Users Common
===========================================
.. automodule:: dropbox.users_common
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
......@@ -54,7 +54,7 @@ master_doc = 'index'
# General information about the project.
project = u'Dropbox for Python'
copyright = u'2015-2017, Dropbox, Inc.'
copyright = u'2015-2019, Dropbox, Inc.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......
......@@ -9,7 +9,25 @@ Dropbox for Python Documentation
.. toctree::
:maxdepth: 2
moduledoc
api/async
api/auth
api/common
api/contacts
api/dropbox
api/exceptions
api/file_properties
api/file_requests
api/files
api/oauth
api/paper
api/seen_state
api/sharing
api/team
api/team_common
api/team_log
api/team_policies
api/users
api/users_common
Indices and tables
==================
......
*****************
SDK Documentation
*****************
:mod:`dropbox.async` -- Async
============================================
.. automodule:: dropbox.async
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.auth` -- Auth
============================================
.. automodule:: dropbox.auth
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.common` -- Common
============================================
.. automodule:: dropbox.common
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.contacts` -- Contacts
============================================
.. automodule:: dropbox.contacts
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.dropbox` -- Dropbox
============================================
.. automodule:: dropbox.dropbox
:members:
:show-inheritance:
:inherited-members:
:special-members: __init__
:undoc-members:
:mod:`dropbox.exceptions` -- Exceptions
============================================
.. automodule:: dropbox.exceptions
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.file_properties` -- File Properties
============================================
.. automodule:: dropbox.file_properties
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.file_requests` -- File Requests
============================================
.. automodule:: dropbox.file_requests
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.files` -- Files
============================================
.. automodule:: dropbox.files
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.oauth` -- OAuth
============================================
.. automodule:: dropbox.oauth
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.paper` -- Paper
============================================
.. automodule:: dropbox.paper
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.seen_state` -- Seen State
============================================
.. automodule:: dropbox.seen_state
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.sharing` -- Sharing
============================================
.. automodule:: dropbox.sharing
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team` -- Team
============================================
.. automodule:: dropbox.team
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team_common` -- Team Common
============================================
.. automodule:: dropbox.team_common
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team_log` -- Team Log
============================================
.. automodule:: dropbox.team_log
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.team_policies` -- Team Policies
============================================
.. automodule:: dropbox.team_policies
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.users` -- Users
============================================
.. automodule:: dropbox.users
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
:mod:`dropbox.users_common` -- Users Common
============================================
.. automodule:: dropbox.users_common
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:
......@@ -4,4 +4,4 @@
# flake8: noqa
# pylint: skip-file
# If you have issues importing this module because Python recognizes it as a keyword, use async_ instead.
from async_ import *
from .async_ import *
......@@ -24,9 +24,9 @@ class LaunchResultBase(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar str async_job_id: This response indicates that the processing is
asynchronous. The string is an id that can be used to obtain the status
of the asynchronous job.
:ivar str async.LaunchResultBase.async_job_id: This response indicates that
the processing is asynchronous. The string is an id that can be used to
obtain the status of the asynchronous job.
"""
_catch_all = None
......@@ -63,8 +63,8 @@ class LaunchResultBase(bb.Union):
raise AttributeError("tag 'async_job_id' not set")
return self._value
def _process_custom_annotations(self, annotation_type, processor):
super(LaunchResultBase, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(LaunchResultBase, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'LaunchResultBase(%r, %r)' % (self._tag, self._value)
......@@ -81,7 +81,8 @@ class LaunchEmptyResult(LaunchResultBase):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar complete: The job finished synchronously and successfully.
:ivar async.LaunchEmptyResult.complete: The job finished synchronously and
successfully.
"""
# Attribute is overwritten below the class definition
......@@ -95,8 +96,8 @@ class LaunchEmptyResult(LaunchResultBase):
"""
return self._tag == 'complete'
def _process_custom_annotations(self, annotation_type, processor):
super(LaunchEmptyResult, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(LaunchEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'LaunchEmptyResult(%r, %r)' % (self._tag, self._value)
......@@ -107,8 +108,8 @@ class PollArg(bb.Struct):
"""
Arguments for methods that poll the status of an asynchronous job.
:ivar async_job_id: Id of the asynchronous job. This is the value of a
response returned from the method that launched the job.
:ivar async.PollArg.async_job_id: Id of the asynchronous job. This is the
value of a response returned from the method that launched the job.
"""
__slots__ = [
......@@ -149,8 +150,8 @@ class PollArg(bb.Struct):
self._async_job_id_value = None
self._async_job_id_present = False
def _process_custom_annotations(self, annotation_type, processor):
super(PollArg, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollArg, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'PollArg(async_job_id={!r})'.format(
......@@ -170,7 +171,8 @@ class PollResultBase(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar in_progress: The asynchronous job is still in progress.
:ivar async.PollResultBase.in_progress: The asynchronous job is still in
progress.
"""
_catch_all = None
......@@ -185,8 +187,8 @@ class PollResultBase(bb.Union):
"""
return self._tag == 'in_progress'
def _process_custom_annotations(self, annotation_type, processor):
super(PollResultBase, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollResultBase, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'PollResultBase(%r, %r)' % (self._tag, self._value)
......@@ -202,7 +204,8 @@ class PollEmptyResult(PollResultBase):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar complete: The asynchronous job has completed successfully.
:ivar async.PollEmptyResult.complete: The asynchronous job has completed
successfully.
"""
# Attribute is overwritten below the class definition
......@@ -216,8 +219,8 @@ class PollEmptyResult(PollResultBase):
"""
return self._tag == 'complete'
def _process_custom_annotations(self, annotation_type, processor):
super(PollEmptyResult, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'PollEmptyResult(%r, %r)' % (self._tag, self._value)
......@@ -232,10 +235,10 @@ class PollError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar invalid_async_job_id: The job ID is invalid.
:ivar internal_error: Something went wrong with the job on Dropbox's end.
You'll need to verify that the action you were taking succeeded, and if
not, try again. This should happen very rarely.
:ivar async.PollError.invalid_async_job_id: The job ID is invalid.
:ivar async.PollError.internal_error: Something went wrong with the job on
Dropbox's end. You'll need to verify that the action you were taking
succeeded, and if not, try again. This should happen very rarely.
"""
_catch_all = 'other'
......@@ -270,8 +273,8 @@ class PollError(bb.Union):
"""
return self._tag == 'other'
def _process_custom_annotations(self, annotation_type, processor):
super(PollError, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollError, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'PollError(%r, %r)' % (self._tag, self._value)
......
This diff is collapsed.
This diff is collapsed.
......@@ -18,14 +18,15 @@ class PathRoot(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar home: Paths are relative to the authenticating user's home namespace,
whether or not that user belongs to a team.
:ivar str root: Paths are relative to the authenticating user's root
namespace (This results in :field:`PathRootError.invalid_root` if the
user's root namespace has changed.).
:ivar str namespace_id: Paths are relative to given namespace id (This
results in :field:`PathRootError.no_permission` if you don't have access
to this namespace.).
:ivar common.PathRoot.home: Paths are relative to the authenticating user's
home namespace, whether or not that user belongs to a team.
:ivar str common.PathRoot.root: Paths are relative to the authenticating
user's root namespace (This results in
:field:`PathRootError.invalid_root` if the user's root namespace has
changed.).
:ivar str common.PathRoot.namespace_id: Paths are relative to given
namespace id (This results in :field:`PathRootError.no_permission` if
you don't have access to this namespace.).
"""
_catch_all = 'other'
......@@ -116,8 +117,8 @@ class PathRoot(bb.Union):
raise AttributeError("tag 'namespace_id' not set")
return self._value
def _process_custom_annotations(self, annotation_type, processor):
super(PathRoot, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PathRoot, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'PathRoot(%r, %r)' % (self._tag, self._value)
......@@ -130,10 +131,11 @@ class PathRootError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar RootInfo invalid_root: The root namespace id in Dropbox-API-Path-Root
header is not valid. The value of this error is use's latest root info.
:ivar no_permission: You don't have permission to access the namespace id in
Dropbox-API-Path-Root header.
:ivar RootInfo PathRootError.invalid_root: The root namespace id in
Dropbox-API-Path-Root header is not valid. The value of this error is
use's latest root info.
:ivar common.PathRootError.no_permission: You don't have permission to
access the namespace id in Dropbox-API-Path-Root header.
"""
_catch_all = 'other'
......@@ -190,8 +192,8 @@ class PathRootError(bb.Union):
raise AttributeError("tag 'invalid_root' not set")
return self._value
def _process_custom_annotations(self, annotation_type, processor):
super(PathRootError, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PathRootError, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'PathRootError(%r, %r)' % (self._tag, self._value)
......@@ -202,11 +204,12 @@ class RootInfo(bb.Struct):
"""
Information about current user's root.
:ivar root_namespace_id: The namespace ID for user's root namespace. It will
be the namespace ID of the shared team root if the user is member of a
team with a separate team root. Otherwise it will be same as
``RootInfo.home_namespace_id``.
:ivar home_namespace_id: The namespace ID for user's home namespace.
:ivar common.RootInfo.root_namespace_id: The namespace ID for user's root
namespace. It will be the namespace ID of the shared team root if the
user is member of a team with a separate team root. Otherwise it will be
same as ``RootInfo.home_namespace_id``.
:ivar common.RootInfo.home_namespace_id: The namespace ID for user's home
namespace.
"""
__slots__ = [
......@@ -278,8 +281,8 @@ class RootInfo(bb.Struct):
self._home_namespace_id_value = None
self._home_namespace_id_present = False
def _process_custom_annotations(self, annotation_type, processor):
super(RootInfo, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(RootInfo, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'RootInfo(root_namespace_id={!r}, home_namespace_id={!r})'.format(
......@@ -293,8 +296,8 @@ class TeamRootInfo(RootInfo):
"""
Root info when user is member of a team with a separate root namespace ID.
:ivar home_path: The path for user's home directory under the shared team
root.
:ivar common.TeamRootInfo.home_path: The path for user's home directory
under the shared team root.
"""
__slots__ = [
......@@ -338,8 +341,8 @@ class TeamRootInfo(RootInfo):
self._home_path_value = None
self._home_path_present = False
def _process_custom_annotations(self, annotation_type, processor):
super(TeamRootInfo, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(TeamRootInfo, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'TeamRootInfo(root_namespace_id={!r}, home_namespace_id={!r}, home_path={!r})'.format(
......@@ -367,8 +370,8 @@ class UserRootInfo(RootInfo):
super(UserRootInfo, self).__init__(root_namespace_id,
home_namespace_id)
def _process_custom_annotations(self, annotation_type, processor):
super(UserRootInfo, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(UserRootInfo, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'UserRootInfo(root_namespace_id={!r}, home_namespace_id={!r})'.format(
......
......@@ -21,7 +21,8 @@ except (ImportError, SystemError, ValueError):
class DeleteManualContactsArg(bb.Struct):
"""
:ivar email_addresses: List of manually added contacts to be deleted.
:ivar contacts.DeleteManualContactsArg.email_addresses: List of manually
added contacts to be deleted.
"""
__slots__ = [
......@@ -61,8 +62,8 @@ class DeleteManualContactsArg(bb.Struct):
self._email_addresses_value = None
self._email_addresses_present = False
def _process_custom_annotations(self, annotation_type, processor):
super(DeleteManualContactsArg, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(DeleteManualContactsArg, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'DeleteManualContactsArg(email_addresses={!r})'.format(
......@@ -77,9 +78,9 @@ class DeleteManualContactsError(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar list of [str] contacts_not_found: Can't delete contacts from this
list. Make sure the list only has manually added contacts. The deletion
was cancelled.
:ivar list of [str] contacts.DeleteManualContactsError.contacts_not_found:
Can't delete contacts from this list. Make sure the list only has
manually added contacts. The deletion was cancelled.
"""
_catch_all = 'other'
......@@ -126,8 +127,8 @@ class DeleteManualContactsError(bb.Union):
raise AttributeError("tag 'contacts_not_found' not set")
return self._value
def _process_custom_annotations(self, annotation_type, processor):
super(DeleteManualContactsError, self)._process_custom_annotations(annotation_type, processor)
def _process_custom_annotations(self, annotation_type, field_path, processor):
super(DeleteManualContactsError, self)._process_custom_annotations(annotation_type, field_path, processor)
def __repr__(self):
return 'DeleteManualContactsError(%r, %r)' % (self._tag, self._value)
......
......@@ -6,7 +6,7 @@ __all__ = [
# This should always be 0.0.0 in master. Only update this after tagging
# before release.
__version__ = '9.3.0'
__version__ = '9.4.0'
import contextlib
import json
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -20,22 +20,37 @@ class PlatformType(bb.Union):
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar web: The content was viewed on the web.
:ivar mobile: The content was viewed on a mobile client.
:ivar desktop: The content was viewed on a desktop client.
:ivar unknown: The content was viewed on an unknown platform.
:ivar seen_state.PlatformType.web: The content was viewed on the web.
:ivar seen_state.PlatformType.desktop: The content was viewed on a desktop
client.
:ivar seen_state.PlatformType.mobile_ios: The content was viewed on a mobile
iOS client.
:ivar seen_state.PlatformType.mobile_android: The content was viewed on a
mobile android client.
:ivar seen_state.PlatformType.api: The content was viewed from an API
client.
:ivar seen_state.PlatformType.unknown: The content was viewed on an unknown
platform.
:ivar seen_state.PlatformType.mobile: The content was viewed on a mobile
client. DEPRECATED: Use mobile_ios or mobile_android instead.
"""
_catch_all = 'other'
# Attribute is overwritten below the class definition
web = None
# Attribute is overwritten below the class definition
mobile = None
# Attribute is overwritten below the class definition
desktop = None
# Attribute is overwritten below the class definition
mobile_ios = None
# Attribute is overwritten below the class definition
mobile_android = None
# Attribute is overwritten below the class definition
api = None
# Attribute is overwritten below the class definition
unknown = None
# Attribute is overwritten below the class definition
mobile = None
# Attribute is overwritten below the class definition
other = None
def is_web(self):
......@@ -46,21 +61,37 @@ class PlatformType(bb.Union):
"""
return self._tag == 'web'