Skip to content

Commit e8abbb5

Browse files
authored
fix: added missing api_call decorators on multiput calls (#653)
1 parent 2208047 commit e8abbb5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

boxsdk/object/upload_session.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66
from typing import Any, Optional, TYPE_CHECKING, Iterable, IO
77

8+
from boxsdk.util.api_call_decorator import api_call
89
from boxsdk.util.chunked_uploader import ChunkedUploader
910
from .base_object import BaseObject
1011
from ..pagination.limit_offset_based_dict_collection import LimitOffsetBasedDictCollection
@@ -28,6 +29,7 @@ def get_url(self, *args: Any) -> str:
2829
*args
2930
).replace(self.session.api_config.BASE_API_URL, self.session.api_config.UPLOAD_URL)
3031

32+
@api_call
3133
def get_parts(self, limit: Optional[int] = None, offset: Optional[int] = None) -> 'BoxObjectCollection':
3234
"""
3335
Get a list of parts uploaded so far.
@@ -48,6 +50,7 @@ def get_parts(self, limit: Optional[int] = None, offset: Optional[int] = None) -
4850
return_full_pages=False,
4951
)
5052

53+
@api_call
5154
def upload_part_bytes(
5255
self,
5356
part_bytes: bytes,
@@ -89,6 +92,7 @@ def upload_part_bytes(
8992
)
9093
return response.json()['part']
9194

95+
@api_call
9296
def commit(
9397
self,
9498
content_sha1: bytes,
@@ -134,6 +138,7 @@ def commit(
134138
response_object=entry,
135139
)
136140

141+
@api_call
137142
def abort(self) -> bool:
138143
"""
139144
Abort an upload session, cancelling the upload and removing any parts that have already been uploaded.

0 commit comments

Comments
 (0)