def shots(self): game_shots = [] for team in self.teams: shots_url = "http://stats.nba.com/stats/shotchartdetail?Season=" + self.season + "&SeasonType=Regular+Season&LeagueID=00&TeamID=" + str( team ) + "&PlayerID=0&GameID=" + self.game_id + "&Outcome=&Location=&Month=0&SeasonSegment=&DateFrom=&DateTo=&OpponentTeamID=0&VsConference=&VsDivision=&Position=&RookieYear=&GameSegment=&Period=0&LastNGames=0&ContextFilter=&ContextMeasure=FG_PCT&display-mode=performance&zone-mode=zone&zoneOverlays=false&zoneDetails=false&viewShots=true" game_shots += helper.get_data_from_url(shots_url, 0) return game_shots
def get_sportvu_data_for_stat(season, season_type, player_or_team, measure_type, start_date="", end_date=""): url = ( "http://stats.nba.com/stats/leaguedashptstats?College=&Conference=&Country=&DateFrom=" + start_date + "&DateTo=" + end_date + "&Division=&DraftPick=&DraftYear=&GameScope=&Height=&LastNGames=0&LeagueID=00&Location=&Month=0&OpponentTeamID=0&Outcome=&PORound=0&PerMode=Totals&PlayerExperience=&PlayerOrTeam=" + player_or_team + "&PlayerPosition=&PtMeasureType=" + measure_type + "&Season=" + season + "&SeasonSegment=&SeasonType=" + season_type + "&StarterBench=&TeamID=0&VsConference=&VsDivision=&Weight=" ) return helper.get_data_from_url(url, 0)
def pbp(self): return helper.get_data_from_url(self.pbp_url, 0)
def speed(self): return helper.get_data_from_url(self.speed_url, 0)
def rebounding(self): return helper.get_data_from_url(self.rebounding_url, 0)
def passing(self): return helper.get_data_from_url(self.passing_url, 0)
def defense(self): return helper.get_data_from_url(self.defense_url, 0)
def game_summary(self): return helper.get_data_from_url(self.summary_url, 0)
def misc_boxscore_team(self): return helper.get_data_from_url(self.misc_boxscore_url, 1)
def four_factors_boxscore_team(self): return helper.get_data_from_url(self.four_factors_boxscore_url, 1)
def usage_boxscore(self): return helper.get_data_from_url(self.usage_boxscore_url, 0)
def scoring_boxscore_team(self): return helper.get_data_from_url(self.scoring_boxscore_url, 1)
def advanced_boxscore_team(self): return helper.get_data_from_url(self.advanced_boxscore_url, 1)
def traditional_boxscore_team(self): return helper.get_data_from_url(self.traditional_boxscore_url, 1)
def player_tracking_boxscore_team(self): return helper.get_data_from_url(self.player_tracking_boxscore_url, 1)
def line_score(self): return helper.get_data_from_url(self.summary_url, 5)
def touches(self): return helper.get_data_from_url(self.touches_url, 0)
def drives(self): return helper.get_data_from_url(self.drives_url, 0)
def pull_up_shoot(self): return helper.get_data_from_url(self.pull_up_shoot_url, 0)
def shooting(self): return helper.get_data_from_url(self.shooting_url, 0)
def catch_shoot(self): return helper.get_data_from_url(self.catch_shoot_url, 0)
def traditional_boxscore_q4(self): return helper.get_data_from_url(self.traditional_boxscore_url_q4, 0)
def shots(self): game_shots = [] for team in self.teams: shots_url = "http://stats.nba.com/stats/shotchartdetail?Season="+self.season+"&SeasonType=Regular+Season&LeagueID=00&TeamID="+str(team)+"&PlayerID=0&GameID="+self.game_id+"&Outcome=&Location=&Month=0&SeasonSegment=&DateFrom=&DateTo=&OpponentTeamID=0&VsConference=&VsDivision=&Position=&RookieYear=&GameSegment=&Period=0&LastNGames=0&ContextFilter=&ContextMeasure=FG_PCT&display-mode=performance&zone-mode=zone&zoneOverlays=false&zoneDetails=false&viewShots=true" game_shots += helper.get_data_from_url(shots_url, 0) return game_shots