@@ -60,7 +60,7 @@ def from_url(self, parent_asset_id, name, url):
6060
6161 Example::
6262
63- client.create_asset (
63+ client.assets.from_url (
6464 parent_asset_id="123abc",
6565 name="ExampleFile.mp4",
6666 type="file",
@@ -70,6 +70,7 @@ def from_url(self, parent_asset_id, name, url):
7070
7171 payload = {
7272 "name" : name ,
73+ "type" : "file" ,
7374 "source" : {
7475 "url" : url
7576 }
@@ -88,7 +89,7 @@ def update(self, asset_id, **kwargs):
8889 the fields to update
8990
9091 Example::
91- client.update_asset ("adeffee123342", name="updated_filename.mp4")
92+ client.assets.update ("adeffee123342", name="updated_filename.mp4")
9293 """
9394 endpoint = '/assets/{}' .format (asset_id )
9495 return self .client ._api_call ('put' , endpoint , kwargs )
@@ -103,7 +104,7 @@ def copy(self, destination_folder_id, **kwargs):
103104 id (string): The id of the asset you want to copy.
104105
105106 Example::
106- client.copy_asset ("adeffee123342", id="7ee008c5-49a2-f8b5-997d-8b64de153c30")
107+ client.assets.copy ("adeffee123342", id="7ee008c5-49a2-f8b5-997d-8b64de153c30")
107108 """
108109 endpoint = '/assets/{}/copy' .format (destination_folder_id )
109110 return self .client ._api_call ('post' , endpoint , kwargs )
@@ -118,7 +119,7 @@ def bulk_copy(self, destination_folder_id, asset_list=[], copy_comments=False):
118119 copy_comments (boolean): Whether or not to copy comments: True or False.
119120
120121 Example::
121- client.bulk_copy_assets ("adeffee123342", asset_list=["7ee008c5-49a2-f8b5-997d-8b64de153c30", \
122+ client.assets.buly_copy ("adeffee123342", asset_list=["7ee008c5-49a2-f8b5-997d-8b64de153c30", \
122123 "7ee008c5-49a2-f8b5-997d-8b64de153c30"], copy_comments=True)
123124 """
124125
@@ -160,8 +161,14 @@ def _upload(self, asset, file):
160161 uploader = FrameioUploader (asset , file )
161162 uploader .upload ()
162163
163- def upload_folder (self , destination_id , folderpath ):
164- pass
164+ # def upload_folder(self, destination_id, folderpath):
165+ # try:
166+ # if os.path.isdir(folderpath):
167+ # # Good it's a directory, we can keep going
168+
169+ # except OSError:
170+ # if not os.path.exists(folderpath):
171+ # sys.exit("Folder doesn't exist, exiting...")
165172
166173 def build_asset_info (self , filepath ):
167174 full_path = os .path .abspath (filepath )
0 commit comments