Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"points_against": 1266.6599999999999,
"points_for": 1409.24,
"rank": 2,
"streak": {
"type": "win",
"value": "1"
}
},
"url": "https://football.fantasysports.yahoo.com/archive/nfl/2014/729259/1",
"waiver_priority": 9
}
"""
team_key = self.get_league_key() + ".t." + str(team_id)
return self.query(
"https://fantasysports.yahooapis.com/fantasy/v2/team/" + str(team_key) +
";out=metadata,stats,standings,roster,draftresults,matchups", ["team"], Team)
base_manager.email = y_manager.email
base_manager.name = y_manager.nickname
base_team.managers.append(base_manager)
base_team.manager_str = ", ".join([manager.name for manager in base_team.managers])
base_team.team_id = str(y_team.team_id)
base_team.points = float(y_team.points)
base_team.projected_points = float(y_team.projected_points)
base_team.waiver_priority = y_team.waiver_priority
if league.is_faab:
base_team.faab = int(y_team.faab_balance) if y_team.faab_balance else 0
base_team.url = y_team.url
team_standings_info = Team({})
for ranked_team in self.league_info.standings.teams:
ranked_team = ranked_team.get("team")
if int(ranked_team.team_id) == int(base_team.team_id):
team_standings_info = ranked_team # type: Team
if team_standings_info.streak_type == "win":
streak_type = "W"
elif team_standings_info.streak_type == "loss":
streak_type = "L"
else:
streak_type = "T"
base_team.division = team_division
base_team.current_record = BaseRecord(
wins=int(team_standings_info.wins),
losses=int(team_standings_info.losses),
"draft_position": 4,
"has_draft_grade": 1,
"draft_grade": "B",
"draft_recap_url": "https://football.fantasysports.yahoo.com/archive/nfl/2014/729259/1/draftrecap",
"managers": {
"manager": {
"guid": "BMACD7S5UXV7JIQX4PGGUVQJAU",
"manager_id": "1",
"nickname": "--hidden--"
}
}
}
"""
team_key = self.get_league_key() + ".t." + str(team_id)
return self.query(
"https://fantasysports.yahooapis.com/fantasy/v2/team/" + str(team_key) + "/metadata", ["team"], Team)