Skip to content

Commit

Permalink
Updated spec
Browse files Browse the repository at this point in the history
Files namespace:
- Added too_many_write_operations in UploadSessionFinishError.
- Removed PathRootError and invalid_path_root in LookupError. (breaking change)
- Added team_folder to WriteError.

Sharing namespace:
- Added access_level to LinkSettings.
- Added change_access_level to LinkAction.
- Added access_level and audience_restricting_shared_folder to SharedContentLinkMetadataBase.
- Added access_type and expected_link_metadata to SharedFileMetadata.
- Added path to ParentFolderAccessInfo.
- Added actions to UpdateFolderPolicyArg.
- Added team_folder to UpdateFolderPolicyError.

Stone Cfg namespace:
- Added allow_app_folder_app attribute.
- Added takes_path_root attribute.

Team namespace:
- Added route token/get_authenticated_admin.
- Added route features/get_values.
- Added expires to ActiveWebSession.
- Added cursor and has_more to TeamFolderListResult for pagination.
- Added route team_folder/list/continue.
- Made member_given_name and member_surname optional in MemberAddArg. (breaking change)

User namepsace:
- Moved AccountType from user namespace to user_common namespace.

Added TeamLog namespace.
  • Loading branch information
mbogosian committed May 11, 2017
1 parent 2b2b8bf commit 69959f5
Show file tree
Hide file tree
Showing 21 changed files with 41,721 additions and 867 deletions.
16 changes: 16 additions & 0 deletions docs/moduledoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ SDK Documentation
:special-members: __init__
:undoc-members:

:mod:`dropbox.auth` -- Auth
============================================
.. automodule:: dropbox.auth
:members:
:show-inheritance:
:special-members: __init__
:undoc-members:

:mod:`dropbox.files` -- Files
============================================
.. automodule:: dropbox.files
Expand Down Expand Up @@ -56,6 +64,14 @@ SDK Documentation
: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.users` -- Users
============================================
.. automodule:: dropbox.users
Expand Down
1 change: 1 addition & 0 deletions dropbox/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,4 @@ def __repr__(self):

ROUTES = {
}

1 change: 1 addition & 0 deletions dropbox/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,3 +720,4 @@ def __repr__(self):
'token/from_oauth1': token_from_oauth1,
'token/revoke': token_revoke,
}

182 changes: 132 additions & 50 deletions dropbox/base.py

Large diffs are not rendered by default.

74 changes: 72 additions & 2 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file

from abc import ABCMeta, abstractmethod
import warnings
Expand All @@ -14,8 +12,10 @@
sharing,
team,
team_common,
team_log,
team_policies,
users,
users_common,
)


Expand Down Expand Up @@ -181,6 +181,31 @@ def team_devices_revoke_device_session_batch(self,
)
return r

def team_features_get_values(self,
features):
"""
Get the values for one or more featues. This route allows you to check
your account's capability for what feature you can access or what value
you have for certain features. Permission : Team information.
:param list features: A list of features in
:class:`dropbox.team.Feature`. If the list is empty, this route will
return :class:`dropbox.team.FeaturesGetValuesBatchError`.
:rtype: :class:`dropbox.team.FeaturesGetValuesBatchResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.FeaturesGetValuesBatchError`
"""
arg = team.FeaturesGetValuesBatchArg(features)
r = self.request(
team.features_get_values,
'team',
arg,
None,
)
return r

def team_get_info(self):
"""
Retrieves information about a team.
Expand Down Expand Up @@ -1335,6 +1360,30 @@ def team_team_folder_list(self,
)
return r

def team_team_folder_list_continue(self,
cursor):
"""
Once a cursor has been retrieved from :meth:`team_team_folder_list`, use
this to paginate through all team folders. Permission : Team member file
access.
:param str cursor: Indicates from what point to get the next set of team
folders.
:rtype: :class:`dropbox.team.TeamFolderListResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.TeamFolderListContinueError`
"""
arg = team.TeamFolderListContinueArg(cursor)
r = self.request(
team.team_folder_list_continue,
'team',
arg,
None,
)
return r

def team_team_folder_permanently_delete(self,
team_folder_id):
"""
Expand Down Expand Up @@ -1376,3 +1425,24 @@ def team_team_folder_rename(self,
None,
)
return r

def team_token_get_authenticated_admin(self):
"""
Returns the member profile of the admin who generated the team access
token used to make the call.
:rtype: :class:`dropbox.team.TokenGetAuthenticatedAdminResult`
:raises: :class:`dropbox.exceptions.ApiError`
If this raises, ApiError.reason is of type:
:class:`dropbox.team.TokenGetAuthenticatedAdminError`
"""
arg = None
r = self.request(
team.token_get_authenticated_admin,
'team',
arg,
None,
)
return r

2 changes: 2 additions & 0 deletions dropbox/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
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}$")
NamePart_validator = bv.String(min_length=1, max_length=100, pattern=u'[^/:?*<>"|]*')
NamespaceId_validator = bv.String(pattern=u'[-_0-9a-zA-Z:]+')
SessionId_validator = bv.String()
SharedFolderId_validator = NamespaceId_validator
ROUTES = {
}

Loading

0 comments on commit 69959f5

Please sign in to comment.