Skip to content

Commit

Permalink
Merge pull request #58 from Frameio/jh/get-team-members
Browse files Browse the repository at this point in the history
Adds client.get_team_members()
  • Loading branch information
jhodges10 committed Jul 9, 2020
2 parents 394f396 + 52030a0 commit f89a91f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ bump-major:
bump2version major

bump-patch:
bump2version patch
bump2version patch

clean:
find . -name "*.pyc" -exec rm -f {} \;
12 changes: 11 additions & 1 deletion frameioclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,16 @@ def get_all_teams(self, **kwargs):
endpoint = '/teams'
return self._api_call('get', endpoint, kwargs)

def get_team_members(self, team_id):
"""
Get the member list for a given team_id.
:Args:
team_id (string): The team id.
"""
endpoint = '/teams/{}/members'.format(team_id)
return self._api_call('get', endpoint)

def get_projects(self, team_id, **kwargs):
"""
Get projects owned by the team.
Expand Down Expand Up @@ -236,7 +246,7 @@ def get_collaborators(self, project_id, **kwargs):
:Args:
project_id (string): the project's id
"""
endpoint = "/projects/{}/collaborators".format(project_id)
endpoint = "/projects/{}/collaborators?include=project_role".format(project_id)
return self._api_call('get', endpoint, kwargs)

def get_pending_collaborators(self, project_id, **kwargs):
Expand Down

0 comments on commit f89a91f

Please sign in to comment.