Skip to content

Commit 8c2962a

Browse files
authored
Merge pull request #10 from Frameio/fixes
minor fixes for comment methods
2 parents f7b01e8 + 4d430d2 commit 8c2962a

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

frameioclient/client.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ def get_projects(self, team_id):
5050
endpoint = '/teams/{}/projects'.format(team_id)
5151
return self._api_call('get', endpoint)
5252

53-
def create_project(self, **kwargs):
53+
def create_project(self, team_id, **kwargs):
5454
"""
5555
Create a project.
5656
57+
:Args:
58+
team_id (string): The team id.
5759
:Kwargs:
5860
(optional) kwargs: additional request parameters.
5961
@@ -64,7 +66,8 @@ def create_project(self, **kwargs):
6466
name="My Awesome Project",
6567
)
6668
"""
67-
return self._api_call('post', '/projects', payload=kwargs)
69+
endpoint = '/teams/{}/projects'.format(team_id)
70+
return self._api_call('post', endpoint, payload=kwargs)
6871

6972
def get_project(self, project_id):
7073
"""
@@ -160,7 +163,7 @@ def create_comment(self, asset_id, **kwargs):
160163
)
161164
"""
162165
endpoint = '/assets/{}/comments'.format(asset_id)
163-
return self.api_call('post', endpoint, payload=kwargs)
166+
return self._api_call('post', endpoint, payload=kwargs)
164167

165168
def update_comment(self, comment_id, **kwargs):
166169
"""
@@ -179,7 +182,7 @@ def update_comment(self, comment_id, **kwargs):
179182
)
180183
"""
181184
endpoint = '/comments/{}'.format(comment_id)
182-
return self.api_call('post', endpoint, payload=kwargs)
185+
return self._api_call('post', endpoint, payload=kwargs)
183186

184187
def delete_comment(self, comment_id):
185188
"""
@@ -189,4 +192,4 @@ def delete_comment(self, comment_id):
189192
comment_id (string): The comment id.
190193
"""
191194
endpoint = '/comments/{}'.format(comment_id)
192-
return self.api_call('delete', endpoint)
195+
return self._api_call('delete', endpoint)

frameioclient/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def upload(self):
2525

2626
total_size = self.asset['filesize']
2727
upload_urls = self.asset['upload_urls']
28-
size = int(math.floor(total_size / len(upload_urls)))
28+
size = int(math.ceil(total_size / len(upload_urls)))
2929

3030
for i, chunk in enumerate(self._read_chunk(self.file, size)):
3131
proc = Process(target=self._upload_chunk, args=(upload_urls[i], chunk,))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name='frameioclient',
8-
version='0.3.0',
8+
version='0.3.1',
99
description='Client library for the Frame.io API',
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)