dropbox 12.2.2__tar.gz → 12.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/workflows/ci.yml +0 -1
- {dropbox-12.2.2/dropbox.egg-info → dropbox-12.2.3}/PKG-INFO +1 -2
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/_version.py +3 -3
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/base.py +172 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/base_team.py +66 -6
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/content_hash.py +4 -2
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/dropbox_client.py +9 -9
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/files.py +19 -5
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/openid.py +12 -6
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/riviera.py +1539 -89
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/sharing.py +25 -4
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/team.py +2065 -2029
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/team_log.py +1078 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/users.py +5 -2
- {dropbox-12.2.2 → dropbox-12.2.3/dropbox.egg-info}/PKG-INFO +1 -2
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox.egg-info/requires.txt +0 -1
- dropbox-12.2.3/dropbox.egg-info/scm_version.json +8 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/pyproject.toml +1 -1
- {dropbox-12.2.2 → dropbox-12.2.3}/test/integration/test_dropbox.py +28 -11
- {dropbox-12.2.2 → dropbox-12.2.3}/test/requirements.txt +0 -1
- {dropbox-12.2.2 → dropbox-12.2.3}/test/unit/test_content_hash.py +26 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/unit/test_dropbox_unit.py +57 -2
- dropbox-12.2.2/dropbox.egg-info/scm_version.json +0 -8
- {dropbox-12.2.2 → dropbox-12.2.3}/.coveragerc +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/ISSUE_TEMPLATE/question_help.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/dependabot.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/pull_request_template.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/workflows/codeql.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/workflows/coverage.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/workflows/pypiupload.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.github/workflows/spec_update.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.gitignore +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.gitmodules +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.pylintrc +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/.readthedocs.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/CODE_OF_CONDUCT.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/CONTRIBUTING.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/LICENSE +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/MANIFEST.in +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/README.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/UPGRADING.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/codecov.yml +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/Makefile +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/_static/.gitkeep +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/async.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/auth.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/common.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/contacts.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/dropbox.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/exceptions.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/file_properties.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/file_requests.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/file_transfer.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/files.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/oauth.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/paper.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/seen_state.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/sharing.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/team.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/team_common.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/team_log.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/team_policies.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/users.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/api/users_common.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/conf.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/index.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/make.bat +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/docs/tutorial.rst +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/__init__.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/_http.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/account.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/account_id.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/async.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/async_.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/auth.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/check.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/common.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/contacts.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/exceptions.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/file_properties.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/file_requests.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/file_transfer.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/oauth.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/paper.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/secondary_emails.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/seen_state.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/session.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/stone_base.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/stone_serializers.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/stone_validators.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/team_common.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/team_policies.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox/users_common.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox.egg-info/SOURCES.txt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox.egg-info/dependency_links.txt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox.egg-info/not-zip-safe +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox.egg-info/scm_file_list.json +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/dropbox.egg-info/top_level.txt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/back-up-and-restore/README.md +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/back-up-and-restore/backup-and-restore-example.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/back-up-and-restore/my-file.txt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/file_transfer.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/oauth/commandline-oauth-pkce.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/oauth/commandline-oauth-scopes.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/oauth/commandline-oauth.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/example/updown.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/generate_base_client.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/generator/dropbox_python_client.stoneg.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/requirements.txt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/scripts/release_note_generator.sh +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/scripts/update_version.sh +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/setup.cfg +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/fixtures/Costa Rican Frog.jpg +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/fixtures/dropbox_song.mp3 +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/fixtures/foo.txt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/integration/expired-certs.crt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/integration/trusted-certs.crt +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/unit/test_file_transfer.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/test/unit/test_http.py +0 -0
- {dropbox-12.2.2 → dropbox-12.2.3}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dropbox
|
|
3
|
-
Version: 12.2.
|
|
3
|
+
Version: 12.2.3
|
|
4
4
|
Summary: Official Dropbox API Client
|
|
5
5
|
Author-email: Dropbox <dev-platform@dropbox.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -24,7 +24,6 @@ Requires-Dist: requests>=2.16.2
|
|
|
24
24
|
Requires-Dist: stone<4,>=3.5.3
|
|
25
25
|
Provides-Extra: test
|
|
26
26
|
Requires-Dist: pytest; extra == "test"
|
|
27
|
-
Requires-Dist: mock; extra == "test"
|
|
28
27
|
Requires-Dist: pytest-mock; extra == "test"
|
|
29
28
|
Requires-Dist: coverage; extra == "test"
|
|
30
29
|
Requires-Dist: stone<4,>=3.5.3; extra == "test"
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '12.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (12, 2,
|
|
21
|
+
__version__ = version = '12.2.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (12, 2, 3)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g3dfe03e64'
|
|
@@ -4505,6 +4505,79 @@ class DropboxBase(object):
|
|
|
4505
4505
|
# ------------------------------------------
|
|
4506
4506
|
# Routes in riviera namespace
|
|
4507
4507
|
|
|
4508
|
+
def riviera_download_transform_output(self, output_handle):
|
|
4509
|
+
"""
|
|
4510
|
+
Download the output of a completed `get_transform_async` job. Pass the
|
|
4511
|
+
`output_handle` from the job's `complete` result. The body is the
|
|
4512
|
+
produced file, and the `Dropbox-API-Result` header describes it. A
|
|
4513
|
+
handle can only be redeemed by the user who requested the transform, and
|
|
4514
|
+
only until its `expires_ts`; after that this route fails with
|
|
4515
|
+
`expired_handle_error`, and the transform has to be requested again. A
|
|
4516
|
+
handle that was never valid, or that belongs to another user, fails with
|
|
4517
|
+
`user_error`.
|
|
4518
|
+
|
|
4519
|
+
Route attributes:
|
|
4520
|
+
scope: files.content.read
|
|
4521
|
+
|
|
4522
|
+
:param output_handle: The `output_handle` from a `complete`
|
|
4523
|
+
`get_transform_async/check` result.
|
|
4524
|
+
:type output_handle: str
|
|
4525
|
+
:rtype: (:class:`dropbox.riviera.DownloadTransformOutputResult`,
|
|
4526
|
+
:class:`requests.models.Response`)
|
|
4527
|
+
:raises: :class:`.exceptions.ApiError`
|
|
4528
|
+
|
|
4529
|
+
If this raises, ApiError will contain:
|
|
4530
|
+
:class:`dropbox.riviera.TransformApiV2Error`
|
|
4531
|
+
|
|
4532
|
+
If you do not consume the entire response body, then you must call close
|
|
4533
|
+
on the response object, otherwise you will max out your available
|
|
4534
|
+
connections. We recommend using the `contextlib.closing
|
|
4535
|
+
<https://docs.python.org/2/library/contextlib.html#contextlib.closing>`_
|
|
4536
|
+
context manager to ensure this.
|
|
4537
|
+
"""
|
|
4538
|
+
arg = riviera.DownloadTransformOutputArgs(output_handle)
|
|
4539
|
+
r = self.request(
|
|
4540
|
+
riviera.download_transform_output,
|
|
4541
|
+
"riviera",
|
|
4542
|
+
arg,
|
|
4543
|
+
None,
|
|
4544
|
+
)
|
|
4545
|
+
return r
|
|
4546
|
+
|
|
4547
|
+
def riviera_download_transform_output_to_file(self, download_path, output_handle):
|
|
4548
|
+
"""
|
|
4549
|
+
Download the output of a completed `get_transform_async` job. Pass the
|
|
4550
|
+
`output_handle` from the job's `complete` result. The body is the
|
|
4551
|
+
produced file, and the `Dropbox-API-Result` header describes it. A
|
|
4552
|
+
handle can only be redeemed by the user who requested the transform, and
|
|
4553
|
+
only until its `expires_ts`; after that this route fails with
|
|
4554
|
+
`expired_handle_error`, and the transform has to be requested again. A
|
|
4555
|
+
handle that was never valid, or that belongs to another user, fails with
|
|
4556
|
+
`user_error`.
|
|
4557
|
+
|
|
4558
|
+
Route attributes:
|
|
4559
|
+
scope: files.content.read
|
|
4560
|
+
|
|
4561
|
+
:param str download_path: Path on local machine to save file.
|
|
4562
|
+
:param output_handle: The `output_handle` from a `complete`
|
|
4563
|
+
`get_transform_async/check` result.
|
|
4564
|
+
:type output_handle: str
|
|
4565
|
+
:rtype: :class:`dropbox.riviera.DownloadTransformOutputResult`
|
|
4566
|
+
:raises: :class:`.exceptions.ApiError`
|
|
4567
|
+
|
|
4568
|
+
If this raises, ApiError will contain:
|
|
4569
|
+
:class:`dropbox.riviera.TransformApiV2Error`
|
|
4570
|
+
"""
|
|
4571
|
+
arg = riviera.DownloadTransformOutputArgs(output_handle)
|
|
4572
|
+
r = self.request(
|
|
4573
|
+
riviera.download_transform_output,
|
|
4574
|
+
"riviera",
|
|
4575
|
+
arg,
|
|
4576
|
+
None,
|
|
4577
|
+
)
|
|
4578
|
+
self._save_body_to_file(download_path, r[1])
|
|
4579
|
+
return r[0]
|
|
4580
|
+
|
|
4508
4581
|
def riviera_get_keyframes_async(
|
|
4509
4582
|
self, file_id_or_url=None, scene_change_threshold=0.0, include_images=False
|
|
4510
4583
|
):
|
|
@@ -4927,6 +5000,105 @@ class DropboxBase(object):
|
|
|
4927
5000
|
)
|
|
4928
5001
|
return r
|
|
4929
5002
|
|
|
5003
|
+
def riviera_get_transform_async(
|
|
5004
|
+
self, transform_type, file_id_or_url=None, thumbnail=None, image=None, video_frame=None
|
|
5005
|
+
):
|
|
5006
|
+
"""
|
|
5007
|
+
Asynchronous file transformation: produces a new file from an existing
|
|
5008
|
+
one. One route covers many conversions. Name the source file in
|
|
5009
|
+
`file_id_or_url`, say what you want back in `transform_type`, and supply
|
|
5010
|
+
that type's options message if it needs one: - `pdf`: documents and
|
|
5011
|
+
images, to PDF. - `html`: spreadsheets, to HTML, preserving the sheet
|
|
5012
|
+
layout. - `image`: images and single document pages, to JPEG or PNG. -
|
|
5013
|
+
`thumbnail`: any thumbnailable source, resized to a named size bucket. -
|
|
5014
|
+
`image_pdf`: documents, to a page image rendered by way of PDF. -
|
|
5015
|
+
`video_frame`: one still frame from a video, at a requested offset. The
|
|
5016
|
+
accepted input formats differ per transform -- they are not one shared
|
|
5017
|
+
list -- and each is the intersection of the source format with the
|
|
5018
|
+
pipeline that transform uses: - `pdf` and `image_pdf`: word-processing,
|
|
5019
|
+
presentation and spreadsheet documents (.doc, .docx, .ppt, .pptx, .xls,
|
|
5020
|
+
.xlsx, .odt, .odp, .ods, .rtf, .epub, .gdoc, .gslides, .hwp, .ai, .eps,
|
|
5021
|
+
.dwg among others). Images are not accepted. - `html`: spreadsheets only
|
|
5022
|
+
-- .xls, .xlsm, .xlsx, .ods, .gsheet. This is the complete list. Note
|
|
5023
|
+
that .csv and .txt are *not* accepted here. - `image`: the documents
|
|
5024
|
+
above, plus .pdf and .html, plus the iWork and design formats .pages,
|
|
5025
|
+
.key, .numbers, .sketch, .xd, .indd and .psd, plus .avif, .heic, .svg
|
|
5026
|
+
and camera RAW, plus fonts (.otf, .ttf), plus video. Formats a browser
|
|
5027
|
+
can already display (.bmp, .gif, .ico, .jpeg, .png, .tif, .tiff, .webp)
|
|
5028
|
+
are not accepted; use `thumbnail` for those. - `thumbnail`: everything
|
|
5029
|
+
`image` accepts, plus .bmp, .gif, .ico, .jpeg, .png, .tif, .tiff, .webp
|
|
5030
|
+
and JPEG 2000. - `video_frame`: .3g2, .3gp, .3gpp, .3gpp2, .asf, .avi,
|
|
5031
|
+
.dv, .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf,
|
|
5032
|
+
.ogv, .rm, .ts, .vob, .webm, .wmv. This is the complete list. These
|
|
5033
|
+
lists track Riviera's capability registry
|
|
5034
|
+
(`dropbox/riviera/supported_types/previews_supported_types.yaml`), which
|
|
5035
|
+
is generated and authoritative; treat it rather than this comment as the
|
|
5036
|
+
final word. Formats the requested transform does not support fail with
|
|
5037
|
+
`unsupported_format_error`. Options belonging to a different transform
|
|
5038
|
+
type than the one requested fail with `invalid_options_error`. The
|
|
5039
|
+
produced bytes are not returned by this route, and not by its `/check`
|
|
5040
|
+
poll either. Poll `get_transform_async/check` with the returned async
|
|
5041
|
+
job ID until it reports `complete` or `failed`; a `complete` result
|
|
5042
|
+
carries a `TransformOutput` whose `output_handle`
|
|
5043
|
+
`download_transform_output` exchanges for the bytes. Splitting retrieval
|
|
5044
|
+
out this way is what lets the route return outputs larger than an async
|
|
5045
|
+
result can carry.
|
|
5046
|
+
|
|
5047
|
+
Route attributes:
|
|
5048
|
+
scope: files.content.read
|
|
5049
|
+
|
|
5050
|
+
:param file_id_or_url: Identifier of the source file to transform.
|
|
5051
|
+
Callers must set exactly one of the `FileIdOrUrl` variants. The
|
|
5052
|
+
referenced file must be in a format the requested `transform_type`
|
|
5053
|
+
supports; see the route description for the per-transform format
|
|
5054
|
+
lists. Requests against unsupported formats fail with
|
|
5055
|
+
`unsupported_format_error`.
|
|
5056
|
+
:type file_id_or_url: Nullable[:class:`dropbox.riviera.FileIdOrUrl`]
|
|
5057
|
+
:param transform_type: What to produce from the source file. Required.
|
|
5058
|
+
:type transform_type: :class:`dropbox.riviera.TransformType`
|
|
5059
|
+
:param thumbnail: Options for `TransformType.thumbnail`.
|
|
5060
|
+
:type thumbnail: Nullable[:class:`dropbox.riviera.ThumbnailOptions`]
|
|
5061
|
+
:param image: Options for `TransformType.image` and
|
|
5062
|
+
`TransformType.image_pdf`.
|
|
5063
|
+
:type image: Nullable[:class:`dropbox.riviera.ImageOptions`]
|
|
5064
|
+
:param video_frame: Options for `TransformType.video_frame`.
|
|
5065
|
+
:type video_frame: Nullable[:class:`dropbox.riviera.VideoFrameOptions`]
|
|
5066
|
+
:rtype: :class:`dropbox.async_.LaunchResultBase`
|
|
5067
|
+
"""
|
|
5068
|
+
arg = riviera.TransformArgs(transform_type, file_id_or_url, thumbnail, image, video_frame)
|
|
5069
|
+
r = self.request(
|
|
5070
|
+
riviera.get_transform_async,
|
|
5071
|
+
"riviera",
|
|
5072
|
+
arg,
|
|
5073
|
+
None,
|
|
5074
|
+
)
|
|
5075
|
+
return r
|
|
5076
|
+
|
|
5077
|
+
def riviera_get_transform_async_check(self, async_job_id):
|
|
5078
|
+
"""
|
|
5079
|
+
Returns the status or result of specified get_transform_async task.
|
|
5080
|
+
|
|
5081
|
+
Route attributes:
|
|
5082
|
+
scope: files.content.read
|
|
5083
|
+
|
|
5084
|
+
:param async_job_id: Id of the asynchronous job. This is the value of a
|
|
5085
|
+
response returned from the method that launched the job.
|
|
5086
|
+
:type async_job_id: str
|
|
5087
|
+
:rtype: :class:`dropbox.riviera.GetTransformAsyncCheckResult`
|
|
5088
|
+
:raises: :class:`.exceptions.ApiError`
|
|
5089
|
+
|
|
5090
|
+
If this raises, ApiError will contain:
|
|
5091
|
+
:class:`dropbox.async_.PollError`
|
|
5092
|
+
"""
|
|
5093
|
+
arg = async_.PollArg(async_job_id)
|
|
5094
|
+
r = self.request(
|
|
5095
|
+
riviera.get_transform_async_check,
|
|
5096
|
+
"riviera",
|
|
5097
|
+
arg,
|
|
5098
|
+
None,
|
|
5099
|
+
)
|
|
5100
|
+
return r
|
|
5101
|
+
|
|
4930
5102
|
# ------------------------------------------
|
|
4931
5103
|
# Routes in sharing namespace
|
|
4932
5104
|
|
|
@@ -1424,7 +1424,7 @@ class DropboxTeamBase(object):
|
|
|
1424
1424
|
|
|
1425
1425
|
def team_members_bulk_suspend(self, members):
|
|
1426
1426
|
"""
|
|
1427
|
-
|
|
1427
|
+
Deprecated compatibility alias for MembersSuspendBatch.
|
|
1428
1428
|
|
|
1429
1429
|
Route attributes:
|
|
1430
1430
|
scope: members.write
|
|
@@ -1432,14 +1432,18 @@ class DropboxTeamBase(object):
|
|
|
1432
1432
|
:param members: Must contain between 1 and 500 targets. The launch
|
|
1433
1433
|
handler also rejects duplicate client item IDs and duplicate member
|
|
1434
1434
|
selectors.
|
|
1435
|
-
:type members: List[:class:`dropbox.team.
|
|
1435
|
+
:type members: List[:class:`dropbox.team.MembersSuspendBatchTarget`]
|
|
1436
1436
|
:rtype: :class:`dropbox.async_.LaunchResultBase`
|
|
1437
1437
|
:raises: :class:`.exceptions.ApiError`
|
|
1438
1438
|
|
|
1439
1439
|
If this raises, ApiError will contain:
|
|
1440
|
-
:class:`dropbox.team.
|
|
1440
|
+
:class:`dropbox.team.MembersSuspendBatchError`
|
|
1441
1441
|
"""
|
|
1442
|
-
|
|
1442
|
+
warnings.warn(
|
|
1443
|
+
"members/bulk_suspend is deprecated.",
|
|
1444
|
+
DeprecationWarning,
|
|
1445
|
+
)
|
|
1446
|
+
arg = team.MembersSuspendBatchArg(members)
|
|
1443
1447
|
r = self.request(
|
|
1444
1448
|
team.members_bulk_suspend,
|
|
1445
1449
|
"team",
|
|
@@ -1450,7 +1454,7 @@ class DropboxTeamBase(object):
|
|
|
1450
1454
|
|
|
1451
1455
|
def team_members_bulk_suspend_job_status_check(self, async_job_id):
|
|
1452
1456
|
"""
|
|
1453
|
-
|
|
1457
|
+
Deprecated compatibility alias for MembersSuspendBatchJobStatusCheck.
|
|
1454
1458
|
|
|
1455
1459
|
Route attributes:
|
|
1456
1460
|
scope: members.write
|
|
@@ -1458,12 +1462,16 @@ class DropboxTeamBase(object):
|
|
|
1458
1462
|
:param async_job_id: Id of the asynchronous job. This is the value of a
|
|
1459
1463
|
response returned from the method that launched the job.
|
|
1460
1464
|
:type async_job_id: str
|
|
1461
|
-
:rtype: :class:`dropbox.team.
|
|
1465
|
+
:rtype: :class:`dropbox.team.MembersSuspendBatchJobStatus`
|
|
1462
1466
|
:raises: :class:`.exceptions.ApiError`
|
|
1463
1467
|
|
|
1464
1468
|
If this raises, ApiError will contain:
|
|
1465
1469
|
:class:`dropbox.async_.PollError`
|
|
1466
1470
|
"""
|
|
1471
|
+
warnings.warn(
|
|
1472
|
+
"members/bulk_suspend/job_status/check is deprecated.",
|
|
1473
|
+
DeprecationWarning,
|
|
1474
|
+
)
|
|
1467
1475
|
arg = async_.PollArg(async_job_id)
|
|
1468
1476
|
r = self.request(
|
|
1469
1477
|
team.members_bulk_suspend_job_status_check,
|
|
@@ -2264,6 +2272,58 @@ class DropboxTeamBase(object):
|
|
|
2264
2272
|
)
|
|
2265
2273
|
return None
|
|
2266
2274
|
|
|
2275
|
+
def team_members_suspend_batch(self, members):
|
|
2276
|
+
"""
|
|
2277
|
+
Launch a member suspension batch. The server enforces a maximum of 500
|
|
2278
|
+
members.
|
|
2279
|
+
|
|
2280
|
+
Route attributes:
|
|
2281
|
+
scope: members.write
|
|
2282
|
+
|
|
2283
|
+
:param members: Must contain between 1 and 500 targets. The launch
|
|
2284
|
+
handler also rejects duplicate client item IDs and duplicate member
|
|
2285
|
+
selectors.
|
|
2286
|
+
:type members: List[:class:`dropbox.team.MembersSuspendBatchTarget`]
|
|
2287
|
+
:rtype: :class:`dropbox.async_.LaunchResultBase`
|
|
2288
|
+
:raises: :class:`.exceptions.ApiError`
|
|
2289
|
+
|
|
2290
|
+
If this raises, ApiError will contain:
|
|
2291
|
+
:class:`dropbox.team.MembersSuspendBatchError`
|
|
2292
|
+
"""
|
|
2293
|
+
arg = team.MembersSuspendBatchArg(members)
|
|
2294
|
+
r = self.request(
|
|
2295
|
+
team.members_suspend_batch,
|
|
2296
|
+
"team",
|
|
2297
|
+
arg,
|
|
2298
|
+
None,
|
|
2299
|
+
)
|
|
2300
|
+
return r
|
|
2301
|
+
|
|
2302
|
+
def team_members_suspend_batch_job_status_check(self, async_job_id):
|
|
2303
|
+
"""
|
|
2304
|
+
Poll a previously launched member suspension batch job.
|
|
2305
|
+
|
|
2306
|
+
Route attributes:
|
|
2307
|
+
scope: members.write
|
|
2308
|
+
|
|
2309
|
+
:param async_job_id: Id of the asynchronous job. This is the value of a
|
|
2310
|
+
response returned from the method that launched the job.
|
|
2311
|
+
:type async_job_id: str
|
|
2312
|
+
:rtype: :class:`dropbox.team.MembersSuspendBatchJobStatus`
|
|
2313
|
+
:raises: :class:`.exceptions.ApiError`
|
|
2314
|
+
|
|
2315
|
+
If this raises, ApiError will contain:
|
|
2316
|
+
:class:`dropbox.async_.PollError`
|
|
2317
|
+
"""
|
|
2318
|
+
arg = async_.PollArg(async_job_id)
|
|
2319
|
+
r = self.request(
|
|
2320
|
+
team.members_suspend_batch_job_status_check,
|
|
2321
|
+
"team",
|
|
2322
|
+
arg,
|
|
2323
|
+
None,
|
|
2324
|
+
)
|
|
2325
|
+
return r
|
|
2326
|
+
|
|
2267
2327
|
def team_members_unsuspend(self, user):
|
|
2268
2328
|
"""
|
|
2269
2329
|
Unsuspend a member from a team. Permission : Team member management
|
|
@@ -128,8 +128,10 @@ class StreamHasher(object):
|
|
|
128
128
|
return b
|
|
129
129
|
|
|
130
130
|
def write(self, b):
|
|
131
|
-
self.
|
|
132
|
-
|
|
131
|
+
written = self._f.write(b)
|
|
132
|
+
if written:
|
|
133
|
+
self._hasher.update(b[:written])
|
|
134
|
+
return written
|
|
133
135
|
|
|
134
136
|
def __iter__(self):
|
|
135
137
|
return self
|
|
@@ -268,8 +268,12 @@ class _DropboxTransport(object):
|
|
|
268
268
|
|
|
269
269
|
return self.__class__(
|
|
270
270
|
oauth2_access_token or self._oauth2_access_token,
|
|
271
|
-
max_retries_on_error
|
|
272
|
-
|
|
271
|
+
self._max_retries_on_error if max_retries_on_error is None else max_retries_on_error,
|
|
272
|
+
(
|
|
273
|
+
self._max_retries_on_rate_limit
|
|
274
|
+
if max_retries_on_rate_limit is None
|
|
275
|
+
else max_retries_on_rate_limit
|
|
276
|
+
),
|
|
273
277
|
user_agent or self._raw_user_agent,
|
|
274
278
|
session or self._session,
|
|
275
279
|
headers or self._headers,
|
|
@@ -444,13 +448,9 @@ class _DropboxTransport(object):
|
|
|
444
448
|
scope = " ".join(scope)
|
|
445
449
|
body["scope"] = scope
|
|
446
450
|
|
|
447
|
-
timeout = DEFAULT_TIMEOUT
|
|
448
|
-
if self._timeout:
|
|
449
|
-
timeout = self._timeout
|
|
450
|
-
|
|
451
451
|
attempt = 0
|
|
452
452
|
while True:
|
|
453
|
-
res = self._session.post(url, data=body, timeout=
|
|
453
|
+
res = self._session.post(url, data=body, timeout=self._timeout)
|
|
454
454
|
try:
|
|
455
455
|
self.raise_dropbox_error_for_resp(res)
|
|
456
456
|
break
|
|
@@ -775,8 +775,8 @@ class _DropboxTransport(object):
|
|
|
775
775
|
:type http_resp: :class:`requests.models.Response`
|
|
776
776
|
:rtype: None
|
|
777
777
|
"""
|
|
778
|
-
with
|
|
779
|
-
with
|
|
778
|
+
with contextlib.closing(http_resp):
|
|
779
|
+
with open(download_path, "wb") as f:
|
|
780
780
|
for c in http_resp.iter_content(chunksize):
|
|
781
781
|
f.write(c)
|
|
782
782
|
|
|
@@ -2912,6 +2912,13 @@ class FileStatus(bb.Union):
|
|
|
2912
2912
|
This class acts as a tagged union. Only one of the ``is_*`` methods will
|
|
2913
2913
|
return true. To get the associated value of a tag (if one exists), use the
|
|
2914
2914
|
corresponding ``get_*`` method.
|
|
2915
|
+
|
|
2916
|
+
:ivar FileStatus.deleted:
|
|
2917
|
+
Field is deprecated. Deprecated. Deleted-file search does not work and
|
|
2918
|
+
should not be used. Use
|
|
2919
|
+
:meth:`dropbox.dropbox_client.Dropbox.files_list_folder` with
|
|
2920
|
+
``ListFolderArg.include_deleted`` set to ``True`` to enumerate deleted
|
|
2921
|
+
entries; this does not provide equivalent full-text search.
|
|
2915
2922
|
"""
|
|
2916
2923
|
|
|
2917
2924
|
_catch_all = "other"
|
|
@@ -5620,6 +5627,8 @@ MoveIntoFamilyError_validator = bv.Union(MoveIntoFamilyError)
|
|
|
5620
5627
|
|
|
5621
5628
|
class MoveIntoVaultError(bb.Union):
|
|
5622
5629
|
"""
|
|
5630
|
+
Deprecated: the server no longer emits this error.
|
|
5631
|
+
|
|
5623
5632
|
This class acts as a tagged union. Only one of the ``is_*`` methods will
|
|
5624
5633
|
return true. To get the associated value of a tag (if one exists), use the
|
|
5625
5634
|
corresponding ``get_*`` method.
|
|
@@ -6628,8 +6637,9 @@ class RelocationError(bb.Union):
|
|
|
6628
6637
|
:ivar RelocationError.cant_move_shared_folder:
|
|
6629
6638
|
Can't move the shared folder to the given destination.
|
|
6630
6639
|
:ivar RelocationError.cant_move_into_vault:
|
|
6631
|
-
Some content cannot be moved into Vault under
|
|
6632
|
-
detailed error.
|
|
6640
|
+
Field is deprecated. Some content cannot be moved into Vault under
|
|
6641
|
+
certain circumstances, see detailed error. Deprecated: the server no
|
|
6642
|
+
longer emits this error.
|
|
6633
6643
|
:vartype RelocationError.cant_move_into_vault: MoveIntoVaultError
|
|
6634
6644
|
:ivar RelocationError.cant_move_into_family:
|
|
6635
6645
|
Some content cannot be moved into the Family Room folder under certain
|
|
@@ -6890,8 +6900,9 @@ class RelocationError(bb.Union):
|
|
|
6890
6900
|
|
|
6891
6901
|
def get_cant_move_into_vault(self):
|
|
6892
6902
|
"""
|
|
6893
|
-
Some content cannot be moved into Vault under
|
|
6894
|
-
detailed error.
|
|
6903
|
+
Field is deprecated. Some content cannot be moved into Vault under
|
|
6904
|
+
certain circumstances, see detailed error. Deprecated: the server no
|
|
6905
|
+
longer emits this error.
|
|
6895
6906
|
|
|
6896
6907
|
Only call this if :meth:`is_cant_move_into_vault` is true.
|
|
6897
6908
|
|
|
@@ -8650,7 +8661,10 @@ class SearchOptions(bb.Struct):
|
|
|
8650
8661
|
Specified property of the order of search results. By default, results
|
|
8651
8662
|
are sorted by relevance.
|
|
8652
8663
|
:ivar SearchOptions.file_status:
|
|
8653
|
-
Restricts search to the given file status.
|
|
8664
|
+
Restricts search to the given file status. The ``FileStatus.deleted``
|
|
8665
|
+
value is deprecated and should not be used. This also applies to
|
|
8666
|
+
searches continued with
|
|
8667
|
+
:meth:`dropbox.dropbox_client.Dropbox.files_search_continue`.
|
|
8654
8668
|
:ivar SearchOptions.filename_only:
|
|
8655
8669
|
Restricts search to only match on filenames.
|
|
8656
8670
|
:ivar SearchOptions.file_extensions:
|
|
@@ -128,18 +128,24 @@ UserInfoError_validator = bv.Union(UserInfoError)
|
|
|
128
128
|
class UserInfoResult(bb.Struct):
|
|
129
129
|
"""
|
|
130
130
|
:ivar UserInfoResult.family_name:
|
|
131
|
-
Last name of user.
|
|
131
|
+
Last name of the user.
|
|
132
132
|
:ivar UserInfoResult.given_name:
|
|
133
|
-
First name of user.
|
|
133
|
+
First name of the user.
|
|
134
134
|
:ivar UserInfoResult.email:
|
|
135
|
-
|
|
135
|
+
The user's email address. Be aware it's possible that the user has since
|
|
136
|
+
lost access to their email. Note: email is not a unique or stable
|
|
137
|
+
identifier for a Dropbox account. Users can change their email, and
|
|
138
|
+
emails can be reused by different accounts. Apps should not use email as
|
|
139
|
+
a key for account identification; use ``sub`` instead.
|
|
136
140
|
:ivar UserInfoResult.email_verified:
|
|
137
|
-
If user is
|
|
141
|
+
If the user's email address is verified.
|
|
138
142
|
:ivar UserInfoResult.iss:
|
|
139
|
-
Issuer of token (in this case Dropbox).
|
|
143
|
+
Issuer of the token (in this case Dropbox).
|
|
140
144
|
:ivar UserInfoResult.sub:
|
|
141
145
|
An identifier for the user. This is the Dropbox account_id, a string
|
|
142
|
-
value such as dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc.
|
|
146
|
+
value such as dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc. The account_id
|
|
147
|
+
is a unique and stable identifier for a Dropbox account, suitable for
|
|
148
|
+
use as a key in authentication and account management.
|
|
143
149
|
"""
|
|
144
150
|
|
|
145
151
|
__slots__ = [
|