Skip to content

Commit

Permalink
generated with codegen at box/box-codegen@d8b234c and spec at box/box…
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build committed Aug 31, 2023
1 parent 569c8fc commit fd99ce3
Show file tree
Hide file tree
Showing 63 changed files with 525 additions and 1,071 deletions.
6 changes: 1 addition & 5 deletions docs/authorization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# AuthorizationManager


- [Authorize user](#authorize-user)

## Authorize user
Expand All @@ -18,7 +17,7 @@ This operation is performed by calling function `get_authorize`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/get-authorize/).

*Currently we don't have an example for calling `get_authorize` in integration tests*
_Currently we don't have an example for calling `get_authorize` in integration tests_

### Arguments

Expand All @@ -35,11 +34,8 @@ See the endpoint docs at
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `None`.

Does not return any data, but rather should be used in the browser.


23 changes: 9 additions & 14 deletions docs/avatars.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# AvatarsManager


- [Get user avatar](#get-user-avatar)
- [Add or update user avatar](#add-or-update-user-avatar)
- [Delete user avatar](#delete-user-avatar)
Expand All @@ -15,6 +14,7 @@ See the endpoint docs at
[API Reference](https://developer.box.com/reference/get-users-id-avatar/).

<!-- sample get_users_id_avatar -->

```python
client.avatars.get_user_avatar(user_id=user.id)
```
Expand All @@ -26,7 +26,6 @@ client.avatars.get_user_avatar(user_id=user.id)
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `ByteStream`.
Expand All @@ -35,7 +34,6 @@ When an avatar can be found for the user the
image data will be returned in the body of the
response.


## Add or update user avatar

Adds or updates a user avatar.
Expand All @@ -46,6 +44,7 @@ See the endpoint docs at
[API Reference](https://developer.box.com/reference/post-users-id-avatar/).

<!-- sample post_users_id_avatar -->

```python
client.avatars.create_user_avatar(user_id=user.id, pic=decode_base_64_byte_stream('iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEW10NBjBBbqAAAAH0lEQVRoge3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABmmDh1QAAAABJRU5ErkJggg=='), pic_file_name='avatar.png', pic_content_type='image/png')
```
Expand All @@ -57,21 +56,19 @@ client.avatars.create_user_avatar(user_id=user.id, pic=decode_base_64_byte_strea
- pic `ByteStream`
- The image file to be uploaded to Box. Accepted file extensions are `.jpg` or `.png`. The maximum file size is 1MB.
- pic_file_name `Optional[str]`
-
-
- pic_content_type `Optional[str]`
-
-
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `UserAvatar`.

* `ok`: Returns the `pic_urls` object with URLs to existing
user avatars that were updated.* `created`: Returns the `pic_urls` object with URLS to user avatars
uploaded to Box with the request.

- `ok`: Returns the `pic_urls` object with URLs to existing
user avatars that were updated.\* `created`: Returns the `pic_urls` object with URLS to user avatars
uploaded to Box with the request.

## Delete user avatar

Expand All @@ -84,6 +81,7 @@ See the endpoint docs at
[API Reference](https://developer.box.com/reference/delete-users-id-avatar/).

<!-- sample delete_users_id_avatar -->

```python
client.avatars.delete_user_avatar(user_id=user.id)
```
Expand All @@ -95,11 +93,8 @@ client.avatars.delete_user_avatar(user_id=user.id)
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `None`.

* `no_content`: Removes the avatar and returns an empty response.


- `no_content`: Removes the avatar and returns an empty response.
43 changes: 14 additions & 29 deletions docs/chunked_uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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*
_Currently we don't have an example for calling `create_file_upload_session` in integration tests_

### Arguments

Expand All @@ -32,14 +32,12 @@ See the endpoint docs at
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `UploadSession`.

Returns a new upload session.


## Create upload session for existing file

Creates an upload session for an existing file.
Expand All @@ -49,27 +47,25 @@ This operation is performed by calling function `create_file_upload_session_for_
See the endpoint docs at
[API Reference](https://developer.box.com/reference/post-files-id-upload-sessions/).

*Currently we don't have an example for calling `create_file_upload_session_for_existing_file` in integration tests*
_Currently we don't have an example for calling `create_file_upload_session_for_existing_file` in integration tests_

### Arguments

- file_id `str`
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
- file_size `int`
- The total number of bytes of the file to be uploaded
- file_name `Optional[str]`
- The optional new name of new file
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `UploadSession`.

Returns a new upload session.


## Get upload session

Return information about an upload session.
Expand All @@ -79,7 +75,7 @@ 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*
_Currently we don't have an example for calling `get_file_upload_session_by_id` in integration tests_

### Arguments

Expand All @@ -88,14 +84,12 @@ See the endpoint docs at
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `UploadSession`.

Returns an upload session object.


## Upload part of file

Updates a chunk of an upload session for a file.
Expand All @@ -105,7 +99,7 @@ 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*
_Currently we don't have an example for calling `upload_file_part` in integration tests_

### Arguments

Expand All @@ -114,20 +108,18 @@ See the endpoint docs at
- request_body `ByteStream`
- Request body of uploadFilePart method
- digest `str`
- The [RFC3230][1] message digest of the chunk uploaded. Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is as `sha=BASE64_ENCODED_DIGEST`. To get the value for the `SHA` digest, use the openSSL command to encode the file part: `openssl sha1 -binary <FILE_PART_NAME> | base64` [1]: https://tools.ietf.org/html/rfc3230
- The [RFC3230][1] message digest of the chunk uploaded. Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is as `sha=BASE64_ENCODED_DIGEST`. To get the value for the `SHA` digest, use the openSSL command to encode the file part: `openssl sha1 -binary <FILE_PART_NAME> | base64` [1]: https://tools.ietf.org/html/rfc3230
- content_range `str`
- The byte range of the chunk. Must not overlap with the range of a part already uploaded this session. Each part’s size must be exactly equal in size to the part size specified in the upload session that you created. One exception is the last part of the file, as this can be smaller. When providing the value for `content-range`, remember that: * The lower bound of each part's byte range must be a multiple of the part size. * The higher bound must be a multiple of the part size - 1.
- The byte range of the chunk. Must not overlap with the range of a part already uploaded this session. Each part’s size must be exactly equal in size to the part size specified in the upload session that you created. One exception is the last part of the file, as this can be smaller. When providing the value for `content-range`, remember that: _ The lower bound of each part's byte range must be a multiple of the part size. _ The higher bound must be a multiple of the part size - 1.
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `UploadedPart`.

Chunk has been uploaded successfully.


## Remove upload session

Abort an upload session and discard all data uploaded.
Expand All @@ -139,7 +131,7 @@ This operation is performed by calling function `delete_file_upload_session_by_i
See the endpoint docs at
[API Reference](https://developer.box.com/reference/delete-files-upload-sessions-id/).

*Currently we don't have an example for calling `delete_file_upload_session_by_id` in integration tests*
_Currently we don't have an example for calling `delete_file_upload_session_by_id` in integration tests_

### Arguments

Expand All @@ -148,15 +140,13 @@ See the endpoint docs at
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `None`.

A blank response is returned if the session was
successfully aborted.


## List parts

Return a list of the chunks uploaded to the upload
Expand All @@ -167,27 +157,25 @@ 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*
_Currently we don't have an example for calling `get_file_upload_session_parts` in integration tests_

### Arguments

- upload_session_id `str`
- The ID of the upload session. Example: "D5E3F7A"
- offset `Optional[int]`
- The offset of the item at which to begin the response. Queries with offset parameter value exceeding 10000 will be rejected with a 400 response.
- The offset of the item at which to begin the response. Queries with offset parameter value exceeding 10000 will be rejected with a 400 response.
- limit `Optional[int]`
- The maximum number of items to return per page.
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `UploadParts`.

Returns a list of parts that have been uploaded.


## Commit upload session

Close an upload session and create a file from the
Expand All @@ -198,7 +186,7 @@ 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*
_Currently we don't have an example for calling `create_file_upload_session_commit` in integration tests_

### Arguments

Expand All @@ -207,15 +195,14 @@ See the endpoint docs at
- parts `List[UploadPart]`
- The list details for the uploaded parts
- digest `str`
- The [RFC3230][1] message digest of the whole file. Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is as `sha=BASE64_ENCODED_DIGEST`. [1]: https://tools.ietf.org/html/rfc3230
- The [RFC3230][1] message digest of the whole file. Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is as `sha=BASE64_ENCODED_DIGEST`. [1]: https://tools.ietf.org/html/rfc3230
- if_match `Optional[str]`
- Ensures this item hasn't recently changed before making changes. Pass in the item's last observed `etag` value into this header and the endpoint will fail with a `412 Precondition Failed` if it has changed since.
- Ensures this item hasn't recently changed before making changes. Pass in the item's last observed `etag` value into this header and the endpoint will fail with a `412 Precondition Failed` if it has changed since.
- if_none_match `Optional[str]`
- Ensures an item is only returned if it has changed. Pass in the item's last observed `etag` value into this header and the endpoint will fail with a `304 Not Modified` if the item has not changed since.
- Ensures an item is only returned if it has changed. Pass in the item's last observed `etag` value into this header and the endpoint will fail with a `304 Not Modified` if the item has not changed since.
- extra_headers `Optional[Dict[str, Optional[str]]]`
- Extra headers that will be included in the HTTP request.


### Returns

This function returns a value of type `Files`.
Expand All @@ -225,5 +212,3 @@ Returns the file object in a list.Returns when all chunks have been uploaded but
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.


Loading

0 comments on commit fd99ce3

Please sign in to comment.