@@ -67,7 +67,9 @@ def get_schema(self, project_type: int, version: str):
6767 },
6868 )
6969
70- async def _sync_large_annotation (self , team_id , project_id , item_id ):
70+ async def _sync_large_annotation (
71+ self , team_id , project_id , item_id , transform_version : str = None
72+ ):
7173 sync_params = {
7274 "team_id" : team_id ,
7375 "project_id" : project_id ,
@@ -77,6 +79,8 @@ async def _sync_large_annotation(self, team_id, project_id, item_id):
7779 "current_source" : "main" ,
7880 "desired_source" : "secondary" ,
7981 }
82+ if transform_version :
83+ sync_params ["transform_version" ] = transform_version
8084 sync_url = urljoin (
8185 self .get_assets_provider_url (),
8286 self .URL_START_FILE_SYNC .format (item_id = item_id ),
@@ -120,11 +124,12 @@ async def get_big_annotation(
120124 "annotation_type" : "MAIN" ,
121125 "version" : "V1.00" ,
122126 }
123- if transform_version :
124- query_params ["desired_transform_version" ] = transform_version
125127
126128 await self ._sync_large_annotation (
127- team_id = project .team_id , project_id = project .id , item_id = item .id
129+ team_id = project .team_id ,
130+ project_id = project .id ,
131+ item_id = item .id ,
132+ transform_version = transform_version ,
128133 )
129134
130135 async with AIOHttpSession (
@@ -202,6 +207,7 @@ async def download_big_annotation(
202207 download_path : str ,
203208 item : entities .BaseItemEntity ,
204209 callback : Callable = None ,
210+ transform_version : str = None ,
205211 ):
206212 item_id = item .id
207213 item_name = item .name
@@ -218,7 +224,10 @@ async def download_big_annotation(
218224 )
219225
220226 await self ._sync_large_annotation (
221- team_id = project .team_id , project_id = project .id , item_id = item_id
227+ team_id = project .team_id ,
228+ project_id = project .id ,
229+ item_id = item_id ,
230+ transform_version = transform_version ,
222231 )
223232
224233 async with AIOHttpSession (
@@ -252,12 +261,15 @@ async def download_small_annotations(
252261 download_path : str ,
253262 item_ids : List [int ],
254263 callback : Callable = None ,
264+ transform_version : str = None ,
255265 ):
256266 query_params = {
257267 "team_id" : project .team_id ,
258268 "project_id" : project .id ,
259269 "folder_id" : folder .id ,
260270 }
271+ if transform_version :
272+ query_params ["transform_version" ] = transform_version
261273 handler = StreamedAnnotations (
262274 headers = self .client .default_headers ,
263275 reporter = reporter ,
0 commit comments