def HotFuzzPlayer(playerguess): #returns a tuple, index [0] is for playername, index [2] is for playerID return extractOne(playerguess, playerdict)
def get(self, playerguess): playername = extractOne(playerguess, playerdict)[0] data = fixer([d.__dict__ for d in Players.query.filter_by(PLAYER_NAME=playername)]) return jsonify({playername: data})
def HotFuzzTeam(teamguess): #returns a tuple, index [0] is for teamname, index [2] is for teamID return extractOne(teamguess, teamdict)
def get(self, teamguess): teamname = extractOne(teamguess, teamdict)[0] data = fixer([d.__dict__ for d in Teams.query.filter_by(TEAM_NAME=teamname)]) return jsonify({teamname: data})