mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-30 19:39:09 +00:00
fixed pull APIError calls (removed endpoint arg)
Former-commit-id: 5090eefdbd5b13bfda285d5480e79896dd3610a5
This commit is contained in:
parent
b1eff19ea4
commit
2130182212
@ -19,7 +19,7 @@ def get_team_competition():
|
|||||||
if json['success']:
|
if json['success']:
|
||||||
return json['competition']
|
return json['competition']
|
||||||
else:
|
else:
|
||||||
raise APIError(json, endpoint)
|
raise APIError(json)
|
||||||
|
|
||||||
def get_team():
|
def get_team():
|
||||||
endpoint = '/api/fetchTeamCompetition'
|
endpoint = '/api/fetchTeamCompetition'
|
||||||
@ -32,7 +32,7 @@ def get_team():
|
|||||||
if json['success']:
|
if json['success']:
|
||||||
return json['team']
|
return json['team']
|
||||||
else:
|
else:
|
||||||
raise APIError(json, endpoint)
|
raise APIError(json)
|
||||||
|
|
||||||
def get_team_match_data(competition, team_num):
|
def get_team_match_data(competition, team_num):
|
||||||
endpoint = '/api/fetchAllTeamMatchData'
|
endpoint = '/api/fetchAllTeamMatchData'
|
||||||
@ -47,7 +47,7 @@ def get_team_match_data(competition, team_num):
|
|||||||
if json['success']:
|
if json['success']:
|
||||||
return json['data'][team_num]
|
return json['data'][team_num]
|
||||||
else:
|
else:
|
||||||
raise APIError(json, endpoint)
|
raise APIError(json)
|
||||||
|
|
||||||
def get_teams_at_competition(competition):
|
def get_teams_at_competition(competition):
|
||||||
endpoint = '/api/fetchAllTeamNicknamesAtCompetition'
|
endpoint = '/api/fetchAllTeamNicknamesAtCompetition'
|
||||||
@ -61,4 +61,4 @@ def get_teams_at_competition(competition):
|
|||||||
if json['success']:
|
if json['success']:
|
||||||
return list(json['data'].keys())
|
return list(json['data'].keys())
|
||||||
else:
|
else:
|
||||||
raise APIError(json, endpoint)
|
raise APIError(json)
|
Loading…
Reference in New Issue
Block a user