Skip to content

Commit b817a01

Browse files
DropboxBotjorges26
and
jorges26
authored
Automated Spec Update (dropbox#324)
822caa80810d2248730a0c6c61309d45f0063f29 Change Notes: Files Namespace: - Add paper/create, paper/update routes - Add PaperCreateArg, PaperCreateResult, PaperCreateArg, PaperCreateResult, PaperUpdateArg, PaperUpdateResult structs - Add ImportFormat, PaperContentError, PaperCreateError, PaperDocUpdatePolicy, PaperUpdateError unions - Update Comments Team Log Generated Namespace: - Add GovernancePolicyContentDisposedDetails, GovernancePolicyContentDisposedType structs - Add DispositionActionType union - Update ClassificationType union to include pii - Update EventDetails union to include governance_policy_content_disposed_details - Update EventType union to include governance_policy_content_disposed - Update EventTypeArg uniont to include governance_policy_content_disposed - Update Comments Team Reports Namespace: - Deprecate reports/get_storage, reports/get_activity, reports/get_membership, reports/get_devices routes Co-authored-by: jorges26 <[email protected]> Co-authored-by: DropboxBot <[email protected]> Co-authored-by: jorges26 <[email protected]>
1 parent 250b116 commit b817a01

File tree

5 files changed

+1014
-7
lines changed

5 files changed

+1014
-7
lines changed

dropbox/base.py

+67
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,73 @@ def files_move_batch_check(self,
23352335
)
23362336
return r
23372337

2338+
def files_paper_create(self,
2339+
f,
2340+
path,
2341+
import_format):
2342+
"""
2343+
Creates a new Paper doc with the provided content.
2344+
2345+
:param bytes f: Contents to upload.
2346+
:param str path: The fully qualified path to the location in the user's
2347+
Dropbox where the Paper Doc should be created. This should include
2348+
the document's title and end with .paper.
2349+
:param import_format: The format of the provided data.
2350+
:type import_format: :class:`dropbox.files.ImportFormat`
2351+
:rtype: :class:`dropbox.files.PaperCreateResult`
2352+
:raises: :class:`.exceptions.ApiError`
2353+
2354+
If this raises, ApiError will contain:
2355+
:class:`dropbox.files.PaperCreateError`
2356+
"""
2357+
arg = files.PaperCreateArg(path,
2358+
import_format)
2359+
r = self.request(
2360+
files.paper_create,
2361+
'files',
2362+
arg,
2363+
f,
2364+
)
2365+
return r
2366+
2367+
def files_paper_update(self,
2368+
f,
2369+
path,
2370+
import_format,
2371+
doc_update_policy,
2372+
paper_revision=None):
2373+
"""
2374+
Updates an existing Paper doc with the provided content.
2375+
2376+
:param bytes f: Contents to upload.
2377+
:param str path: Path in the user's Dropbox to update. The path must
2378+
correspond to a Paper doc or an error will be returned.
2379+
:param import_format: The format of the provided data.
2380+
:type import_format: :class:`dropbox.files.ImportFormat`
2381+
:param doc_update_policy: How the provided content should be applied to
2382+
the doc.
2383+
:type doc_update_policy: :class:`dropbox.files.PaperDocUpdatePolicy`
2384+
:param Nullable[int] paper_revision: The latest doc revision. Required
2385+
when doc_update_policy is update. This value must match the current
2386+
revision of the doc or error revision_mismatch will be returned.
2387+
:rtype: :class:`dropbox.files.PaperUpdateResult`
2388+
:raises: :class:`.exceptions.ApiError`
2389+
2390+
If this raises, ApiError will contain:
2391+
:class:`dropbox.files.PaperUpdateError`
2392+
"""
2393+
arg = files.PaperUpdateArg(path,
2394+
import_format,
2395+
doc_update_policy,
2396+
paper_revision)
2397+
r = self.request(
2398+
files.paper_update,
2399+
'files',
2400+
arg,
2401+
f,
2402+
)
2403+
return r
2404+
23382405
def files_permanently_delete(self,
23392406
path,
23402407
parent_rev=None):

dropbox/base_team.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,8 @@ def team_reports_get_activity(self,
19271927
start_date=None,
19281928
end_date=None):
19291929
"""
1930-
Retrieves reporting data about a team's user activity.
1930+
Retrieves reporting data about a team's user activity. Deprecated: Will
1931+
be removed on July 1st 2021.
19311932
19321933
:param Nullable[datetime] start_date: Optional starting date
19331934
(inclusive). If start_date is None or too long ago, this field will
@@ -1957,7 +1958,8 @@ def team_reports_get_devices(self,
19571958
start_date=None,
19581959
end_date=None):
19591960
"""
1960-
Retrieves reporting data about a team's linked devices.
1961+
Retrieves reporting data about a team's linked devices. Deprecated: Will
1962+
be removed on July 1st 2021.
19611963
19621964
:param Nullable[datetime] start_date: Optional starting date
19631965
(inclusive). If start_date is None or too long ago, this field will
@@ -1987,7 +1989,8 @@ def team_reports_get_membership(self,
19871989
start_date=None,
19881990
end_date=None):
19891991
"""
1990-
Retrieves reporting data about a team's membership.
1992+
Retrieves reporting data about a team's membership. Deprecated: Will be
1993+
removed on July 1st 2021.
19911994
19921995
:param Nullable[datetime] start_date: Optional starting date
19931996
(inclusive). If start_date is None or too long ago, this field will
@@ -2017,7 +2020,8 @@ def team_reports_get_storage(self,
20172020
start_date=None,
20182021
end_date=None):
20192022
"""
2020-
Retrieves reporting data about a team's storage usage.
2023+
Retrieves reporting data about a team's storage usage. Deprecated: Will
2024+
be removed on July 1st 2021.
20212025
20222026
:param Nullable[datetime] start_date: Optional starting date
20232027
(inclusive). If start_date is None or too long ago, this field will

0 commit comments

Comments
 (0)