def get_team_scores(self, team, time, show_upcoming, use_12_hour_format):
team_id = self.team_names.get(team, None)<EOL>time_frame = '<STR_LIT:n>' if show_upcoming else '<STR_LIT:p>'<EOL>if team_id:<EOL><INDENT>try:<EOL><INDENT>req = self._get('<STR_LIT>'.format(<EOL>team_id=team_id, time_frame=time_frame, time=time))<EOL>team_scores = req.json()<EOL>if len(team_scores["<STR_LIT>"]) == <NUM_LIT:0>:<EOL><INDENT>click.secho("<STR_LIT>"<EOL>"<STR_LIT>", fg="<STR_LIT>", bold=True)<EOL><DEDENT>else:<EOL><INDENT>self.writer.team_scores(team_scores, time, show_upcoming, use_12_hour_format)<EOL><DEDENT><DEDENT>except APIErrorException as e:<EOL><INDENT>click.secho(e.args[<NUM_LIT:0>],<EOL>fg="<STR_LIT>", bold=True)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>click.secho("<STR_LIT>",<EOL>fg="<STR_LIT>", bold=True)<EOL><DEDENT>
Queries the API and gets the particular team scores