@@ -219,7 +219,7 @@ def get_asset_children(self, asset_id, **kwargs):
219
219
endpoint = '/assets/{}/children' .format (asset_id )
220
220
return self ._api_call ('get' , endpoint , kwargs )
221
221
222
- def move_asset (self , destination_folder , id )
222
+ def move_asset (self , destination_folder , ** kwargs ):
223
223
"""
224
224
Move an asset.
225
225
@@ -235,9 +235,34 @@ def move_asset(self, destination_folder, id)
235
235
id="123abc",
236
236
)
237
237
"""
238
- endpoint = '/assets/{}/children ' .format (destination_folder )
238
+ endpoint = '/assets/{}/move ' .format (destination_folder )
239
239
return self ._api_call ('post' , endpoint , payload = kwargs )
240
240
241
+ def bulk_move_assets (self , destination_folder_id , asset_list = []):
242
+ """
243
+ Bulk copy assets
244
+
245
+ :Args:
246
+ destination_folder_id (string): The id of the folder you want to move your assets into.
247
+ :Kwargs:
248
+ asset_list (list): A list of the asset IDs you want to move.
249
+
250
+ Example::
251
+ client.bulk_copy_assets("adeffee123342", asset_list=["7ee008c5-49a2-f8b5-997d-8b64de153c30", \
252
+ "7ee008c5-49a2-f8b5-997d-8b64de153c30"])
253
+ """
254
+
255
+ payload = {"batch" : []}
256
+ new_list = list ()
257
+
258
+ for asset in asset_list :
259
+ payload ['batch' ].append ({"id" : asset })
260
+
261
+ print (payload )
262
+
263
+ endpoint = '/batch/assets/{}/move' .format (destination_folder_id )
264
+ return self ._api_call ('post' , endpoint , payload )
265
+
241
266
def create_asset (self , parent_asset_id , ** kwargs ):
242
267
"""
243
268
Create an asset.
0 commit comments