Skip to content

Commit f89a91f

Browse files
authored
Merge pull request #58 from Frameio/jh/get-team-members
Adds client.get_team_members()
2 parents 394f396 + 52030a0 commit f89a91f

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ bump-major:
1111
bump2version major
1212

1313
bump-patch:
14-
bump2version patch
14+
bump2version patch
15+
16+
clean:
17+
find . -name "*.pyc" -exec rm -f {} \;

frameioclient/client.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,16 @@ def get_all_teams(self, **kwargs):
209209
endpoint = '/teams'
210210
return self._api_call('get', endpoint, kwargs)
211211

212+
def get_team_members(self, team_id):
213+
"""
214+
Get the member list for a given team_id.
215+
216+
:Args:
217+
team_id (string): The team id.
218+
"""
219+
endpoint = '/teams/{}/members'.format(team_id)
220+
return self._api_call('get', endpoint)
221+
212222
def get_projects(self, team_id, **kwargs):
213223
"""
214224
Get projects owned by the team.
@@ -236,7 +246,7 @@ def get_collaborators(self, project_id, **kwargs):
236246
:Args:
237247
project_id (string): the project's id
238248
"""
239-
endpoint = "/projects/{}/collaborators".format(project_id)
249+
endpoint = "/projects/{}/collaborators?include=project_role".format(project_id)
240250
return self._api_call('get', endpoint, kwargs)
241251

242252
def get_pending_collaborators(self, project_id, **kwargs):

0 commit comments

Comments
 (0)