This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nba_api.stats.endpoints import* | |
class Game: | |
def __init__(self): | |
self.game_id = 123 | |
self.home_team_name = 'HoMeTeAm' | |
self.home_team_id = 123 | |
self.away_team_name = 'AwAyTeAm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Game import Game | |
from nba_api.stats.endpoints import scoreboardv2 | |
import time | |
import datetime | |
today = datetime.date.today() #setting todays date | |
#today = '2018-10-04' #use to test past/future events | |
df_today_games = scoreboardv2.ScoreboardV2('0', today, '00').game_header.get_data_frame() #finds games for specific day and includes live status, periods |