Skip to content

Commit

Permalink
Add create_team() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jhodges10 committed May 25, 2020
1 parent 4eeb9ae commit cbdd8a3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions frameioclient/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
import requests
import warnings
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from .download import FrameioDownloader
Expand Down Expand Up @@ -83,10 +84,6 @@ def get_me(self):
"""
return self._api_call('get', '/me')



'{"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"}}}'

def create_team(self, account_id, **kwargs):
"""
Create a Team.
Expand All @@ -98,15 +95,15 @@ def create_team(self, account_id, **kwargs):
Example::
client.create_project(
client.create_team(
account_id="6bdcb4d9-4548-4548-4548-27a6c024ae6b",
name="My Awesome Project",
)
"""
warnings.warn('You will need to make sure your token supports team.create scopes.')
endpoint = '/accounts/{}/teams'.format(account_id)
return self._api_call('post', endpoint, payload=kwargs)


def get_teams(self, account_id, **kwargs):
"""
Get teams owned by the account.
Expand Down

0 comments on commit cbdd8a3

Please sign in to comment.