Skip to content

Commit 668fe0c

Browse files
committed
Updated docstrings
1 parent 4441994 commit 668fe0c

5 files changed

Lines changed: 32 additions & 25 deletions

File tree

frameioclient/service/assets.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

frameioclient/service/comments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def create(self, asset_id, **kwargs):
1212
1313
Example::
1414
15-
client.create_comment(
15+
client.comments.create(
1616
asset_id="123abc",
1717
text="Hello world"
1818
)
@@ -51,7 +51,7 @@ def update(self, comment_id, **kwargs):
5151
5252
Example::
5353
54-
client.create_comment(
54+
client.comments.update(
5555
comment_id="123abc",
5656
text="Hello world"
5757
)
@@ -80,7 +80,7 @@ def reply(self, comment_id, **kwargs):
8080
8181
Example::
8282
83-
client.reply_comment(
83+
client.comments.reply(
8484
comment_id="123abc",
8585
text="Hello world"
8686
)

frameioclient/service/links.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def create(self, project_id, **kwargs):
1212
1313
Example::
1414
15-
client.create_review_link(
15+
client.review_links.create(
1616
project_id="123",
1717
name="My Review Link",
1818
password="abc123"
@@ -50,7 +50,7 @@ def get_assets(self, link_id):
5050
5151
Example::
5252
53-
client.get_review_link_items(
53+
client.review_links.get_assets(
5454
link_id="123"
5555
)
5656
"""
@@ -68,7 +68,7 @@ def update_assets(self, link_id, **kwargs):
6868
6969
Example::
7070
71-
client.update_review_link_assets(
71+
client.review_links.update_assets(
7272
link_id="123",
7373
asset_ids=["abc","def"]
7474
)
@@ -87,7 +87,7 @@ def update_settings(self, link_id, **kwargs):
8787
8888
Example::
8989
90-
client.update_review_link(
90+
client.review_links.update_settings(
9191
link_id,
9292
expires_at="2020-04-08T12:00:00+00:00",
9393
is_active=False,
@@ -111,7 +111,7 @@ def create(self, asset_id, **kwargs):
111111
112112
Example::
113113
114-
client.create_presentation_link(
114+
client.presentation_links.create(
115115
asset_id="9cee7966-4066-b326-7db1-f9e6f5e929e4",
116116
title="My fresh presentation",
117117
password="abc123"

frameioclient/service/logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def list(self, account_id):
99
1010
Example::
1111
12-
client.get_audit_logs(
12+
client.logs.list(
1313
account_id="6bdcb4d9-9a2e-a765-4548-ae6b27a6c024"
1414
)
1515
"""

frameioclient/service/teams.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Team(Service):
55
def create(self, account_id, **kwargs):
66
"""
7-
Create a Team.
7+
Create a Team
88
99
:Args:
1010
account_id (string): The account id you want to create this Team under.
@@ -13,7 +13,7 @@ def create(self, account_id, **kwargs):
1313
1414
Example::
1515
16-
client.create_team(
16+
client.teams.create(
1717
account_id="6bdcb4d9-4548-4548-4548-27a6c024ae6b",
1818
name="My Awesome Project",
1919
)
@@ -24,8 +24,8 @@ def create(self, account_id, **kwargs):
2424

2525
def list(self, account_id, **kwargs):
2626
"""
27-
Get teams owned by the account.
28-
(To return all teams, use get_all_teams())
27+
Get teams owned by the specified account.
28+
(To return all teams, use list_all())
2929
3030
:Args:
3131
account_id (string): The account id.
@@ -45,30 +45,30 @@ def list_all(self, **kwargs):
4545

4646
def get(self, team_id):
4747
"""
48-
Get's a team by id
48+
Get team by id
4949
5050
:Args:
51-
team_id (string): the team's id
51+
team_id (string): the Team's id
5252
"""
5353
endpoint = '/teams/{}'.format(team_id)
5454
return self.client._api_call('get', endpoint)
5555

5656
def get_members(self, team_id):
5757
"""
58-
Get the member list for a given team_id.
58+
Get the member list for a given Team.
5959
6060
:Args:
61-
team_id (string): The team id.
61+
team_id (string): The Team id.
6262
"""
6363
endpoint = '/teams/{}/members'.format(team_id)
6464
return self.client._api_call('get', endpoint)
6565

6666
def list_projects(self, team_id, **kwargs):
6767
"""
68-
Get projects owned by the team.
68+
Get projects owned by the Team.
6969
7070
:Args:
71-
team_id (string): The team id.
71+
team_id (string): The Team id.
7272
"""
7373
endpoint = '/teams/{}/projects'.format(team_id)
7474
return self.client._api_call('get', endpoint, kwargs)

0 commit comments

Comments
 (0)