Skip to content

Commit 6ef42eb

Browse files
jhodges10sjkaliski
authored andcommitted
Implement get_all_teams() to return all teams (#12)
* Implement get_all_teams() to return all teams I think this should work based on what we talked about in Slack, but it is untested so if you have a dev environment - it's worth running it through that first. Also, feel free to adjust the copy I added to the `get_teams()` method talking about `get_all_teams()`. * Fixed endpoint and copy.
1 parent 05aea23 commit 6ef42eb

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

frameioclient/client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,25 @@ def get_me(self):
3232

3333
def get_teams(self, account_id):
3434
"""
35-
Get teams owned by the account.
36-
35+
Get teams owned by the account.
36+
(To return all teams, use get_all_teams())
37+
3738
:Args:
3839
account_id (string): The account id.
3940
"""
4041
endpoint = '/accounts/{}/teams'.format(account_id)
4142
return self._api_call('get', endpoint)
4243

44+
def get_all_teams(self):
45+
"""
46+
Get all teams for the authenticated user.
47+
48+
:Args:
49+
account_id (string): The account id.
50+
"""
51+
endpoint = '/teams'
52+
return self._api_call('get', endpoint)
53+
4354
def get_projects(self, team_id):
4455
"""
4556
Get projects owned by the team.

0 commit comments

Comments
 (0)