Skip to content

Commit 33c3d77

Browse files
authored
Merge pull request #38 from Frameio/DEVREL-300-create-team
Add create_team()
2 parents edb2e5e + 6b7357e commit 33c3d77

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

frameioclient/client.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22
import requests
3+
import warnings
34
from requests.adapters import HTTPAdapter
45
from requests.packages.urllib3.util.retry import Retry
56
from .download import FrameioDownloader
@@ -83,6 +84,26 @@ def get_me(self):
8384
"""
8485
return self._api_call('get', '/me')
8586

87+
def create_team(self, account_id, **kwargs):
88+
"""
89+
Create a Team.
90+
91+
:Args:
92+
account_id (string): The account id you want to create this Team under.
93+
:Kwargs:
94+
(optional) kwargs: additional request parameters.
95+
96+
Example::
97+
98+
client.create_team(
99+
account_id="6bdcb4d9-4548-4548-4548-27a6c024ae6b",
100+
name="My Awesome Project",
101+
)
102+
"""
103+
warnings.warn('Note: Your token must support team.create scopes')
104+
endpoint = '/accounts/{}/teams'.format(account_id)
105+
return self._api_call('post', endpoint, payload=kwargs)
106+
86107
def get_teams(self, account_id, **kwargs):
87108
"""
88109
Get teams owned by the account.

0 commit comments

Comments
 (0)