Commit c25bfcb5 authored by Michael Fladischer's avatar Michael Fladischer

Update upstream source from tag 'upstream/8.5.0'

Update to upstream version '8.5.0'
with Debian dir 3b2433ef8f1eee4980388c5abb1211d1fbfc0eb4
parents 56543680 b50124a7
Metadata-Version: 1.1 Metadata-Version: 1.1
Name: dropbox Name: dropbox
Version: 8.4.1 Version: 8.5.0
Summary: Official Dropbox API Client Summary: Official Dropbox API Client
Home-page: http://www.dropbox.com/developers Home-page: http://www.dropbox.com/developers
Author: Dropbox Author: Dropbox
...@@ -9,7 +9,7 @@ License: MIT License ...@@ -9,7 +9,7 @@ License: MIT License
Description: Dropbox for Python Description: Dropbox for Python
================== ==================
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.4.1 .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.5.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python :target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable .. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
......
Dropbox for Python Dropbox for Python
================== ==================
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.4.1 .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.5.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python :target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable .. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
......
Metadata-Version: 1.1 Metadata-Version: 1.1
Name: dropbox Name: dropbox
Version: 8.4.1 Version: 8.5.0
Summary: Official Dropbox API Client Summary: Official Dropbox API Client
Home-page: http://www.dropbox.com/developers Home-page: http://www.dropbox.com/developers
Author: Dropbox Author: Dropbox
...@@ -9,7 +9,7 @@ License: MIT License ...@@ -9,7 +9,7 @@ License: MIT License
Description: Dropbox for Python Description: Dropbox for Python
================== ==================
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.4.1 .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.5.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python :target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable .. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify. # Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa # flake8: noqa
# pylint: skip-file # pylint: skip-file
try: try:
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify. # Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa # flake8: noqa
# pylint: skip-file # pylint: skip-file
try: try:
......
...@@ -139,8 +139,8 @@ class DropboxBase(object): ...@@ -139,8 +139,8 @@ class DropboxBase(object):
path, path,
property_template_ids): property_template_ids):
""" """
Remove the specified property group from the file. To remove specific Permanently removes the specified property group from the file. To
property field key value pairs, see remove specific property field key value pairs, see
:meth:`file_properties_properties_update`. To update a template, see :meth:`file_properties_properties_update`. To update a template, see
:meth:`file_properties_templates_update_for_user` or :meth:`file_properties_templates_update_for_user` or
:meth:`file_properties_templates_update_for_team`. Templates can't be :meth:`file_properties_templates_update_for_team`. Templates can't be
...@@ -192,6 +192,31 @@ class DropboxBase(object): ...@@ -192,6 +192,31 @@ class DropboxBase(object):
) )
return r return r
def file_properties_properties_search_continue(self,
cursor):
"""
Once a cursor has been retrieved from
:meth:`file_properties_properties_search`, use this to paginate through
all search results.
:param str cursor: The cursor returned by your last call to
:meth:`file_properties_properties_search` or
:meth:`file_properties_properties_search_continue`.
:rtype: :class:`dropbox.file_properties.PropertiesSearchResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.file_properties.PropertiesSearchContinueError`
"""
arg = file_properties.PropertiesSearchContinueArg(cursor)
r = self.request(
file_properties.properties_search_continue,
'file_properties',
arg,
None,
)
return r
def file_properties_properties_update(self, def file_properties_properties_update(self,
path, path,
update_property_groups): update_property_groups):
...@@ -230,7 +255,7 @@ class DropboxBase(object): ...@@ -230,7 +255,7 @@ class DropboxBase(object):
""" """
Add a template associated with a team. See Add a template associated with a team. See
:meth:`file_properties_properties_add` to add properties to a file or :meth:`file_properties_properties_add` to add properties to a file or
folder. folder. Note: this endpoint will create team-owned templates.
:rtype: :class:`dropbox.file_properties.AddTemplateResult` :rtype: :class:`dropbox.file_properties.AddTemplateResult`
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
...@@ -363,6 +388,58 @@ class DropboxBase(object): ...@@ -363,6 +388,58 @@ class DropboxBase(object):
) )
return r return r
def file_properties_templates_remove_for_team(self,
template_id):
"""
Permanently removes the specified template created from
:meth:`file_properties_templates_add_for_user`. All properties
associated with the template will also be removed. This action cannot be
undone.
:param str template_id: An identifier for a template created by
:meth:`file_properties_templates_add_for_user` or
:meth:`file_properties_templates_add_for_team`.
:rtype: None
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.file_properties.TemplateError`
"""
arg = file_properties.RemoveTemplateArg(template_id)
r = self.request(
file_properties.templates_remove_for_team,
'file_properties',
arg,
None,
)
return None
def file_properties_templates_remove_for_user(self,
template_id):
"""
Permanently removes the specified template created from
:meth:`file_properties_templates_add_for_user`. All properties
associated with the template will also be removed. This action cannot be
undone.
:param str template_id: An identifier for a template created by
:meth:`file_properties_templates_add_for_user` or
:meth:`file_properties_templates_add_for_team`.
:rtype: None
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.file_properties.TemplateError`
"""
arg = file_properties.RemoveTemplateArg(template_id)
r = self.request(
file_properties.templates_remove_for_user,
'file_properties',
arg,
None,
)
return None
def file_properties_templates_update_for_team(self, def file_properties_templates_update_for_team(self,
template_id, template_id,
name=None, name=None,
...@@ -554,6 +631,7 @@ class DropboxBase(object): ...@@ -554,6 +631,7 @@ class DropboxBase(object):
include_media_info=False, include_media_info=False,
include_deleted=False, include_deleted=False,
include_has_explicit_shared_members=False, include_has_explicit_shared_members=False,
include_property_groups=None,
include_property_templates=None): include_property_templates=None):
""" """
Returns the metadata for a file or folder. This is an alpha endpoint Returns the metadata for a file or folder. This is an alpha endpoint
...@@ -569,10 +647,15 @@ class DropboxBase(object): ...@@ -569,10 +647,15 @@ class DropboxBase(object):
If this raises, ApiError.reason is of type: If this raises, ApiError.reason is of type:
:class:`dropbox.files.AlphaGetMetadataError` :class:`dropbox.files.AlphaGetMetadataError`
""" """
warnings.warn(
'alpha/get_metadata is deprecated. Use get_metadata.',
DeprecationWarning,
)
arg = files.AlphaGetMetadataArg(path, arg = files.AlphaGetMetadataArg(path,
include_media_info, include_media_info,
include_deleted, include_deleted,
include_has_explicit_shared_members, include_has_explicit_shared_members,
include_property_groups,
include_property_templates) include_property_templates)
r = self.request( r = self.request(
files.alpha_get_metadata, files.alpha_get_metadata,
...@@ -598,14 +681,16 @@ class DropboxBase(object): ...@@ -598,14 +681,16 @@ class DropboxBase(object):
:meth:`files_upload_session_start`. :meth:`files_upload_session_start`.
:param bytes f: Contents to upload. :param bytes f: Contents to upload.
:param Nullable property_groups: List of custom properties to add to
file.
:rtype: :class:`dropbox.files.FileMetadata` :rtype: :class:`dropbox.files.FileMetadata`
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type: If this raises, ApiError.reason is of type:
:class:`dropbox.files.UploadErrorWithProperties` :class:`dropbox.files.UploadErrorWithProperties`
""" """
warnings.warn(
'alpha/upload is deprecated. Use alpha/upload.',
DeprecationWarning,
)
arg = files.CommitInfoWithProperties(path, arg = files.CommitInfoWithProperties(path,
mode, mode,
autorename, autorename,
...@@ -1032,7 +1117,8 @@ class DropboxBase(object): ...@@ -1032,7 +1117,8 @@ class DropboxBase(object):
path, path,
include_media_info=False, include_media_info=False,
include_deleted=False, include_deleted=False,
include_has_explicit_shared_members=False): include_has_explicit_shared_members=False,
include_property_groups=None):
""" """
Returns the metadata for a file or folder. Note: Metadata for the root Returns the metadata for a file or folder. Note: Metadata for the root
folder is unsupported. folder is unsupported.
...@@ -1047,6 +1133,10 @@ class DropboxBase(object): ...@@ -1047,6 +1133,10 @@ class DropboxBase(object):
:param bool include_has_explicit_shared_members: If true, the results :param bool include_has_explicit_shared_members: If true, the results
will include a flag for each file indicating whether or not that will include a flag for each file indicating whether or not that
file has any explicit members. file has any explicit members.
:param Nullable include_property_groups: If set to a valid list of
template IDs, ``FileMetadata.property_groups`` is set if there
exists property data associated with the file and each of the listed
templates.
:rtype: :class:`dropbox.files.Metadata` :rtype: :class:`dropbox.files.Metadata`
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
...@@ -1056,7 +1146,8 @@ class DropboxBase(object): ...@@ -1056,7 +1146,8 @@ class DropboxBase(object):
arg = files.GetMetadataArg(path, arg = files.GetMetadataArg(path,
include_media_info, include_media_info,
include_deleted, include_deleted,
include_has_explicit_shared_members) include_has_explicit_shared_members,
include_property_groups)
r = self.request( r = self.request(
files.get_metadata, files.get_metadata,
'files', 'files',
...@@ -1266,7 +1357,8 @@ class DropboxBase(object): ...@@ -1266,7 +1357,8 @@ class DropboxBase(object):
include_has_explicit_shared_members=False, include_has_explicit_shared_members=False,
include_mounted_folders=True, include_mounted_folders=True,
limit=None, limit=None,
shared_link=None): shared_link=None,
include_property_groups=None):
""" """
Starts returning the contents of a folder. If the result's Starts returning the contents of a folder. If the result's
``ListFolderResult.has_more`` field is ``True``, call ``ListFolderResult.has_more`` field is ``True``, call
...@@ -1315,6 +1407,10 @@ class DropboxBase(object): ...@@ -1315,6 +1407,10 @@ class DropboxBase(object):
this field is present, ``ListFolderArg.path`` will be relative to this field is present, ``ListFolderArg.path`` will be relative to
root of the shared link. Only non-recursive mode is supported for root of the shared link. Only non-recursive mode is supported for
shared link. shared link.
:param Nullable include_property_groups: If set to a valid list of
template IDs, ``FileMetadata.property_groups`` is set if there
exists property data associated with the file and each of the listed
templates.
:rtype: :class:`dropbox.files.ListFolderResult` :rtype: :class:`dropbox.files.ListFolderResult`
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
...@@ -1328,7 +1424,8 @@ class DropboxBase(object): ...@@ -1328,7 +1424,8 @@ class DropboxBase(object):
include_has_explicit_shared_members, include_has_explicit_shared_members,
include_mounted_folders, include_mounted_folders,
limit, limit,
shared_link) shared_link,
include_property_groups)
r = self.request( r = self.request(
files.list_folder, files.list_folder,
'files', 'files',
...@@ -1369,7 +1466,8 @@ class DropboxBase(object): ...@@ -1369,7 +1466,8 @@ class DropboxBase(object):
include_has_explicit_shared_members=False, include_has_explicit_shared_members=False,
include_mounted_folders=True, include_mounted_folders=True,
limit=None, limit=None,
shared_link=None): shared_link=None,
include_property_groups=None):
""" """
A way to quickly get a cursor for the folder's state. Unlike A way to quickly get a cursor for the folder's state. Unlike
:meth:`files_list_folder`, :meth:`files_list_folder_get_latest_cursor` :meth:`files_list_folder`, :meth:`files_list_folder_get_latest_cursor`
...@@ -1399,6 +1497,10 @@ class DropboxBase(object): ...@@ -1399,6 +1497,10 @@ class DropboxBase(object):
this field is present, ``ListFolderArg.path`` will be relative to this field is present, ``ListFolderArg.path`` will be relative to
root of the shared link. Only non-recursive mode is supported for root of the shared link. Only non-recursive mode is supported for
shared link. shared link.
:param Nullable include_property_groups: If set to a valid list of
template IDs, ``FileMetadata.property_groups`` is set if there
exists property data associated with the file and each of the listed
templates.
:rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult` :rtype: :class:`dropbox.files.ListFolderGetLatestCursorResult`
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
...@@ -1412,7 +1514,8 @@ class DropboxBase(object): ...@@ -1412,7 +1514,8 @@ class DropboxBase(object):
include_has_explicit_shared_members, include_has_explicit_shared_members,
include_mounted_folders, include_mounted_folders,
limit, limit,
shared_link) shared_link,
include_property_groups)
r = self.request( r = self.request(
files.list_folder_get_latest_cursor, files.list_folder_get_latest_cursor,
'files', 'files',
...@@ -1928,7 +2031,8 @@ class DropboxBase(object): ...@@ -1928,7 +2031,8 @@ class DropboxBase(object):
mode=files.WriteMode.add, mode=files.WriteMode.add,
autorename=False, autorename=False,
client_modified=None, client_modified=None,
mute=False): mute=False,
property_groups=None):
""" """
Create a new file with the contents provided in the request. Do not use Create a new file with the contents provided in the request. Do not use
this to upload a file larger than 150 MB. Instead, create an upload this to upload a file larger than 150 MB. Instead, create an upload
...@@ -1951,6 +2055,8 @@ class DropboxBase(object): ...@@ -1951,6 +2055,8 @@ class DropboxBase(object):
modifications in their Dropbox account via notifications in the modifications in their Dropbox account via notifications in the
client software. If ``True``, this tells the clients that this client software. If ``True``, this tells the clients that this
modification shouldn't result in a user notification. modification shouldn't result in a user notification.
:param Nullable property_groups: List of custom properties to add to
file.
:rtype: :class:`dropbox.files.FileMetadata` :rtype: :class:`dropbox.files.FileMetadata`
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
...@@ -1961,7 +2067,8 @@ class DropboxBase(object): ...@@ -1961,7 +2067,8 @@ class DropboxBase(object):
mode, mode,
autorename, autorename,
client_modified, client_modified,
mute) mute,
property_groups)
r = self.request( r = self.request(
files.upload, files.upload,
'files', 'files',
......
...@@ -681,6 +681,91 @@ class DropboxTeamBase(object): ...@@ -681,6 +681,91 @@ class DropboxTeamBase(object):
) )
return r return r
def team_member_space_limits_excluded_users_add(self,
users=None):
"""
Add users to member space limits excluded users list.
:param Nullable users: List of users to be added/removed.
:rtype: :class:`dropbox.team.ExcludedUsersUpdateResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.ExcludedUsersUpdateError`
"""
arg = team.ExcludedUsersUpdateArg(users)
r = self.request(
team.member_space_limits_excluded_users_add,
'team',
arg,
None,
)
return r
def team_member_space_limits_excluded_users_list(self,
limit=1000):
"""
List member space limits excluded users.
:param long limit: Number of results to return per call.
:rtype: :class:`dropbox.team.ExcludedUsersListResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.ExcludedUsersListError`
"""
arg = team.ExcludedUsersListArg(limit)
r = self.request(
team.member_space_limits_excluded_users_list,
'team',
arg,
None,
)
return r
def team_member_space_limits_excluded_users_list_continue(self,
cursor):
"""
Continue listing member space limits excluded users.
:param str cursor: Indicates from what point to get the next set of
users.
:rtype: :class:`dropbox.team.ExcludedUsersListResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.ExcludedUsersListContinueError`
"""
arg = team.ExcludedUsersListContinueArg(cursor)
r = self.request(
team.member_space_limits_excluded_users_list_continue,
'team',
arg,
None,
)
return r
def team_member_space_limits_excluded_users_remove(self,
users=None):
"""
Remove users from member space limits excluded users list.
:param Nullable users: List of users to be added/removed.
:rtype: :class:`dropbox.team.ExcludedUsersUpdateResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.ExcludedUsersUpdateError`
"""
arg = team.ExcludedUsersUpdateArg(users)
r = self.request(
team.member_space_limits_excluded_users_remove,
'team',
arg,
None,
)
return r
def team_member_space_limits_get_custom_quota(self, def team_member_space_limits_get_custom_quota(self,
users): users):
""" """
...@@ -728,7 +813,7 @@ class DropboxTeamBase(object): ...@@ -728,7 +813,7 @@ class DropboxTeamBase(object):
def team_member_space_limits_set_custom_quota(self, def team_member_space_limits_set_custom_quota(self,
users_and_quotas): users_and_quotas):
""" """
Set users custom quota. Custom quota has to be at least 25GB. A maximum Set users custom quota. Custom quota has to be at least 15GB. A maximum
of 1000 members can be specified in a single call. of 1000 members can be specified in a single call.
:param list users_and_quotas: List of users and their custom quotas. :param list users_and_quotas: List of users and their custom quotas.
...@@ -736,7 +821,7 @@ class DropboxTeamBase(object): ...@@ -736,7 +821,7 @@ class DropboxTeamBase(object):
:raises: :class:`dropbox.exceptions.ApiError` :raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type: If this raises, ApiError.reason is of type:
:class:`dropbox.team.CustomQuotaError` :class:`dropbox.team.SetCustomQuotaError`
""" """
arg = team.SetCustomQuotaArg(users_and_quotas) arg = team.SetCustomQuotaArg(users_and_quotas)
r = self.request( r = self.request(
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify. # Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa # flake8: noqa
# pylint: skip-file # pylint: skip-file
try: try:
...@@ -11,75 +12,17 @@ except (SystemError, ValueError): ...@@ -11,75 +12,17 @@ except (SystemError, ValueError):
import stone_validators as bv import stone_validators as bv
import stone_base as bb import stone_base as bb
class InvalidPathRootError(object):
"""
:ivar path_root: The latest path root id for user's team if the user is
still in a team.
"""
__slots__ = [
'_path_root_value',
'_path_root_present',
]
_has_required_fields = False
def __init__(self,
path_root=None):
self._path_root_value = None
self._path_root_present = False
if path_root is not None:
self.path_root = path_root
@property
def path_root(self):
"""
The latest path root id for user's team if the user is still in a team.
:rtype: str
"""
if self._path_root_present:
return self._path_root_value
else:
return None
@path_root.setter
def path_root(self, val):
if val is None:
del self.path_root
return
val = self._path_root_validator.validate(val)
self._path_root_value = val
self._path_root_present = True
@path_root.deleter
def path_root(self):
self._path_root_value = None
self._path_root_present = False
def __repr__(self):
return 'InvalidPathRootError(path_root={!r})'.format(
self._path_root_value,
)
InvalidPathRootError_validator = bv.Struct(InvalidPathRootError)
class PathRoot(bb.Union): class PathRoot(bb.Union):
""" """
This class acts as a tagged union. Only one of the ``is_*`` methods will This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method. corresponding ``get_*`` method.
:ivar home: Paths are relative to the authenticating user's home directory, :ivar home: Paths are relative to the authenticating user's home namespace,
whether or not that user belongs to a team. whether or not that user belongs to a team.
:ivar member_home: Paths are relative to the authenticating team member's :ivar str root: Paths are relative to the authenticating user's root
home directory. (This results in ``PathRootError.invalid`` if the user namespace (This results in :field:`PathRootError.invalid_root` if the
does not belong to a team.). user's root namespace has changed.).
:ivar str team: Paths are relative to the given team directory. (This
results in :field:`PathRootError.invalid` if the user is not a member of
the team associated with that path root id.).
:ivar user_home: Paths are relative to the user's home directory. (This
results in ``PathRootError.invalid`` if the belongs to a team.).
:ivar str namespace_id: Paths are relative to given namespace id (This :ivar str namespace_id: Paths are relative to given namespace id (This
results in :field:`PathRootError.no_permission` if you don't have access results in :field:`PathRootError.no_permission` if you don't have access
to this namespace.). to this namespace.).
...@@ -89,22 +32,18 @@ class PathRoot(bb.Union): ...@@ -89,22 +32,18 @@ class PathRoot(bb.Union):
# Attribute is overwritten below the class definition # Attribute is overwritten below the class definition
home = None home = None
# Attribute is overwritten below the class definition # Attribute is overwritten below the class definition
member_home = None
# Attribute is overwritten below the class definition
user_home = None
# Attribute is overwritten below the class definition
other = None other = None
@classmethod @classmethod
def team(cls, val): def root(cls, val):
""" """
Create an instance of this class set to the ``team`` tag with value Create an instance of this class set to the ``root`` tag with value
``val``. ``val``.
:param str val: :param str val:
:rtype: PathRoot :rtype: PathRoot
""" """
return cls('team', val) return cls('root', val)
@classmethod @classmethod
def namespace_id(cls, val): def namespace_id(cls, val):
...@@ -125,29 +64,13 @@ class PathRoot(bb.Union): ...@@ -125,29 +64,13 @@ class PathRoot(bb.Union):
""" """
return self._tag == 'home' return self._tag == 'home'
def is_member_home(self): def is_root(self):
"""
Check if the union tag is ``member_home``.
:rtype: bool
"""
return self._tag == 'member_home'
def is_team(self):
""" """
Check if the union tag is ``team``. Check if the union tag is ``root``.
:rtype: bool :rtype: bool
""" """
return self._tag == 'team' return self._tag == 'root'
def is_user_home(self):
"""
Check if the union tag is ``user_home``.
:rtype: bool
"""
return self._tag == 'user_home'
def is_namespace_id(self): def is_namespace_id(self):
""" """
...@@ -165,18 +88,18 @@ class PathRoot(bb.Union): ...@@ -165,18 +88,18 @@ class PathRoot(bb.Union):
""" """
return self._tag == 'other' return self._tag == 'other'
def get_team(self): def get_root(self):
""" """
Paths are relative to the given team directory. (This results in Paths are relative to the authenticating user's root namespace (This
``PathRootError.invalid`` if the user is not a member of the team results in ``PathRootError.invalid_root`` if the user's root namespace
associated with that path root id.). has changed.).
Only call this if :meth:`is_team` is true. Only call this if :meth:`is_root` is true.