Skip to content

Commit 45ccf50

Browse files
authored
Automated Spec Update (#388)
65585e4d2e93fd84087b48bbaf1bbf396a4b1126 Change Notes: files Namespace - Add upload_session/finish_batch:2 route Co-authored-by: DropboxBot <DropboxBot@users.noreply.github.com>
1 parent d1fcec4 commit 45ccf50

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

dropbox/base.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,6 +3015,39 @@ def files_upload_session_finish_batch(self,
30153015
)
30163016
return r
30173017

3018+
def files_upload_session_finish_batch_v2(self,
3019+
entries):
3020+
"""
3021+
This route helps you commit many files at once into a user's Dropbox.
3022+
Use :meth:`files_upload_session_start` and
3023+
:meth:`files_upload_session_append_v2` to upload file contents. We
3024+
recommend uploading many files in parallel to increase throughput. Once
3025+
the file contents have been uploaded, rather than calling
3026+
:meth:`files_upload_session_finish`, use this route to finish all your
3027+
upload sessions in a single request. ``UploadSessionStartArg.close`` or
3028+
``UploadSessionAppendArg.close`` needs to be true for the last
3029+
:meth:`files_upload_session_start` or
3030+
:meth:`files_upload_session_append_v2` call of each upload session. The
3031+
maximum size of a file one can upload to an upload session is 350 GB. We
3032+
allow up to 1000 entries in a single request. Calls to this endpoint
3033+
will count as data transport calls for any Dropbox Business teams with a
3034+
limit on the number of data transport calls allowed per month. For more
3035+
information, see the `Data transport limit page
3036+
<https://www.dropbox.com/developers/reference/data-transport-limit>`_.
3037+
3038+
:param List[:class:`dropbox.files.UploadSessionFinishArg`] entries:
3039+
Commit information for each file in the batch.
3040+
:rtype: :class:`dropbox.files.UploadSessionFinishBatchResult`
3041+
"""
3042+
arg = files.UploadSessionFinishBatchArg(entries)
3043+
r = self.request(
3044+
files.upload_session_finish_batch_v2,
3045+
'files',
3046+
arg,
3047+
None,
3048+
)
3049+
return r
3050+
30183051
def files_upload_session_finish_batch_check(self,
30193052
async_job_id):
30203053
"""

dropbox/files.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13146,6 +13146,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
1314613146
'host': u'api',
1314713147
'style': u'rpc'},
1314813148
)
13149+
upload_session_finish_batch_v2 = bb.Route(
13150+
'upload_session/finish_batch',
13151+
2,
13152+
False,
13153+
UploadSessionFinishBatchArg_validator,
13154+
UploadSessionFinishBatchResult_validator,
13155+
bv.Void(),
13156+
{'auth': u'user',
13157+
'host': u'api',
13158+
'style': u'rpc'},
13159+
)
1314913160
upload_session_finish_batch_check = bb.Route(
1315013161
'upload_session/finish_batch/check',
1315113162
1,
@@ -13232,6 +13243,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
1323213243
'upload_session/append': upload_session_append,
1323313244
'upload_session/finish': upload_session_finish,
1323413245
'upload_session/finish_batch': upload_session_finish_batch,
13246+
'upload_session/finish_batch:2': upload_session_finish_batch_v2,
1323513247
'upload_session/finish_batch/check': upload_session_finish_batch_check,
1323613248
'upload_session/start': upload_session_start,
1323713249
}

spec

Submodule spec updated 1 file

0 commit comments

Comments
 (0)