Skip to content

Commit cbdd8a3

Browse files
committed
Add create_team() function
1 parent 4eeb9ae commit cbdd8a3

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

frameioclient/client.py

Lines changed: 3 additions & 6 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,10 +84,6 @@ def get_me(self):
8384
"""
8485
return self._api_call('get', '/me')
8586

86-
87-
88-
'{"admin_only_actions":{"lifecycle":false},"dark_theme":false,"email_branding":{"image":{"type":"image/jpeg","uploaded":false}},"image":{"type":"image/jpeg","uploaded":false},"solo":false,"watermark":{"image":{"alpha":0.5,"image":{"type":"image/jpeg","uploaded":false},"position":"top_left"},"text":{"alpha":0.5,"position":"top"}}}'
89-
9087
def create_team(self, account_id, **kwargs):
9188
"""
9289
Create a Team.
@@ -98,15 +95,15 @@ def create_team(self, account_id, **kwargs):
9895
9996
Example::
10097
101-
client.create_project(
98+
client.create_team(
10299
account_id="6bdcb4d9-4548-4548-4548-27a6c024ae6b",
103100
name="My Awesome Project",
104101
)
105102
"""
103+
warnings.warn('You will need to make sure your token supports team.create scopes.')
106104
endpoint = '/accounts/{}/teams'.format(account_id)
107105
return self._api_call('post', endpoint, payload=kwargs)
108106

109-
110107
def get_teams(self, account_id, **kwargs):
111108
"""
112109
Get teams owned by the account.

0 commit comments

Comments
 (0)