def getTeamPlayers(team): url = "http://api.football-data.org/v1/teams/" + team + "/players" print("url: " + url) return formatTeamPlayersResponse( jsonResponse.executeJson(requests.get(url, headers=headers), False))
def getTeamInfo(team): url = "http://api.football-data.org/v1/teams/" url += team print("url: " + url) return formatTeamInfoResponse( jsonResponse.executeJson(requests.get(url, headers=headers), True))
def getLeagueTableInfo(id): resultsList = {} url = "http://api.football-data.org/v1/competitions/" url += id + "/leagueTable" print(url) return formatLeagueTableInfoResponse( jsonResponse.executeJson(requests.get(url, headers=headers), False))
def getAllCompetitions(): url = "http://api.football-data.org/v1/competitions" return formatCompetitionsResponse( jsonResponse.executeJson(requests.get(url, headers=headers), True))
def getTeam(leagueId): url = "http://api.football-data.org/v1/competitions/" url += str(leagueId) + "/teams" return jsonResponse.executeJson(requests.get(url, headers=headers), False)
def getDataFromAllCompetitions(): url = "http://api.football-data.org/v1/competitions" return jsonResponse.executeJson(requests.get(url, headers=headers), False)