def delete_team(team_id):
"""
Delete a team with the provided team ID.
"""
headers = api_utils.generate_headers('rw')
try:
response = requests.delete(_url((team_id,))[1], headers=headers)
if response_utils.response_error(response): # Check response has no errors
click.echo('Delete team failed.', err=True)
sys.exit(1)
elif response.status_code == 204:
click.echo('Deleted team with id: %s.' % team_id)
except requests.exceptions.RequestException as error:
click.echo(error, err=True)
sys.exit(1)
评论列表
文章目录