diff --git a/.codegen.json b/.codegen.json index df12184..882477b 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "e12401a", "specHash": "1698c95", "version": "0.6.3" } +{ "engineHash": "a8e8651", "specHash": "1698c95", "version": "0.6.3" } diff --git a/box_sdk_gen/managers/chunked_uploads.py b/box_sdk_gen/managers/chunked_uploads.py index a9fd4b2..44244af 100644 --- a/box_sdk_gen/managers/chunked_uploads.py +++ b/box_sdk_gen/managers/chunked_uploads.py @@ -465,7 +465,7 @@ def create_file_upload_session_commit( ) return deserialize(response.data, Files) - def reducer(self, acc: PartAccumulator, chunk: ByteStream) -> PartAccumulator: + def _reducer(self, acc: PartAccumulator, chunk: ByteStream) -> PartAccumulator: last_index: int = acc.last_index parts: List[UploadPart] = acc.parts chunk_buffer: Buffer = read_byte_stream(chunk) @@ -532,7 +532,7 @@ def upload_big_file( chunks_iterator: Iterator = iterate_chunks(file, part_size) results: PartAccumulator = reduce_iterator( chunks_iterator, - self.reducer, + self._reducer, PartAccumulator( last_index=-1, parts=[], diff --git a/docs/chunked_uploads.md b/docs/chunked_uploads.md index 69861a9..f17f650 100644 --- a/docs/chunked_uploads.md +++ b/docs/chunked_uploads.md @@ -9,8 +9,7 @@ This is a manager for chunked uploads (allowed for files at least 20MB). - [Remove upload session](#remove-upload-session) - [List parts](#list-parts) - [Commit upload session](#commit-upload-session) -- [](#) -- [](#) +- [Upload_big_file](#upload-big-file) ## Create upload session @@ -21,7 +20,11 @@ This operation is performed by calling function `create_file_upload_session`. See the endpoint docs at [API Reference](https://developer.box.com/reference/post-files-upload-sessions/). -_Currently we don't have an example for calling `create_file_upload_session` in integration tests_ + + +```python +self.create_file_upload_session(parent_folder_id, file_size, file_name) +``` ### Arguments @@ -77,7 +80,11 @@ This operation is performed by calling function `get_file_upload_session_by_id`. See the endpoint docs at [API Reference](https://developer.box.com/reference/get-files-upload-sessions-id/). -_Currently we don't have an example for calling `get_file_upload_session_by_id` in integration tests_ + + +```python +self.get_file_upload_session_by_id(upload_session_id) +``` ### Arguments @@ -101,7 +108,11 @@ This operation is performed by calling function `upload_file_part`. See the endpoint docs at [API Reference](https://developer.box.com/reference/put-files-upload-sessions-id/). -_Currently we don't have an example for calling `upload_file_part` in integration tests_ + + +```python +self.upload_file_part(acc.upload_session_id, generate_byte_stream_from_buffer(chunk_buffer), digest, content_range) +``` ### Arguments @@ -159,7 +170,11 @@ This operation is performed by calling function `get_file_upload_session_parts`. See the endpoint docs at [API Reference](https://developer.box.com/reference/get-files-upload-sessions-id-parts/). -_Currently we don't have an example for calling `get_file_upload_session_parts` in integration tests_ + + +```python +self.get_file_upload_session_parts(upload_session_id) +``` ### Arguments @@ -188,7 +203,11 @@ This operation is performed by calling function `create_file_upload_session_comm See the endpoint docs at [API Reference](https://developer.box.com/reference/post-files-upload-sessions-id-commit/). -_Currently we don't have an example for calling `create_file_upload_session_commit` in integration tests_ + + +```python +self.create_file_upload_session_commit(upload_session_id, parts, digest) +``` ### Arguments @@ -215,35 +234,12 @@ Inspect the upload session to get more information about the progress of processing the chunks, then retry committing the file when all chunks have processed. -## - -This operation is performed by calling function `reducer`. - -See the endpoint docs at -[API Reference](https://developer.box.com/reference//). - -_Currently we don't have an example for calling `reducer` in integration tests_ - -### Arguments - -- acc `PartAccumulator` - - -- chunk `ByteStream` - - - -### Returns - -This function returns a value of type `PartAccumulator`. +## Upload_big_file -## +Starts the process of chunk uploading a big file. Should return a File object representing uploaded file. This operation is performed by calling function `upload_big_file`. -See the endpoint docs at -[API Reference](https://developer.box.com/reference//). - - - ```python client.chunked_uploads.upload_big_file(file_byte_stream, file_name, file_size, parent_folder_id) ``` diff --git a/docs/zip_downloads.md b/docs/zip_downloads.md index 9e9dcbc..a0ced1a 100644 --- a/docs/zip_downloads.md +++ b/docs/zip_downloads.md @@ -3,7 +3,7 @@ - [Create zip download](#create-zip-download) - [Download zip archive](#download-zip-archive) - [Get zip download status](#get-zip-download-status) -- [](#) +- [Download ZIP](#download-zip) ## Create zip download @@ -132,14 +132,11 @@ This function returns a value of type `ZipDownloadStatus`. Returns the status of the `zip` archive that is being downloaded. -## +## Download ZIP -This operation is performed by calling function `download_zip`. - -See the endpoint docs at -[API Reference](https://developer.box.com/reference//). +Creates a zip and downloads its content - +This operation is performed by calling function `download_zip`. ```python client.zip_downloads.download_zip([DownloadZipItems(id=file_1.id, type=DownloadZipItemsTypeField.FILE.value), DownloadZipItems(id=file_2.id, type=DownloadZipItemsTypeField.FILE.value), DownloadZipItems(id=folder_1.id, type=DownloadZipItemsTypeField.FOLDER.value)], download_file_name='zip')