Skip to content

Commit da30ff2

Browse files
committed
Add single asset copy
1 parent 8a7a018 commit da30ff2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

frameioclient/client.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,21 @@ def update_asset(self, asset_id, **kwargs):
230230
endpoint = '/assets/{}'.format(asset_id)
231231
return self._api_call('put', endpoint, kwargs)
232232

233+
def copy_asset(self, destination_folder_id, **kwargs):
234+
"""
235+
Copy an asset
236+
237+
:Args:
238+
asset_id (string): The asset_id you want to copy
239+
:Kwargs:
240+
id (string): The id of the folder you want to put it into
241+
242+
Example::
243+
client.copy_asset("adeffee123342", id="7ee008c5-49a2-f8b5-997d-8b64de153c30")
244+
"""
245+
endpoint = '/assets/{}/copy'.format(destination_folder_id)
246+
return self._api_call('post', endpoint, kwargs)
247+
233248
def delete_asset(self, asset_id):
234249
"""
235250
Delete an asset

0 commit comments

Comments
 (0)