def get_season_year(): try: season = get_info(('Default', 'season')) except: data = get_data("https://data.nba.net/10s/prod/v1/today.json") season = data['teamSitesOnly']['seasonYear'] return season
def create_widgets(self): self.SB = ScoreBoardUI() self.B = BoxScoreUI() self.S = ScheduleUI(next=True, last=True, full=False) #add to display self.TL = TeamLeadersUI(player_info_obj=self.PI) self.ST = StandingsUI(div_stand=get_info(('Default', 'div_stand')), team_info_obj=self.TI)
def get_team(): try: team = get_info(('Default', 'team')) if team == 'None': raise ConfigError except: print(f"Reseting config info, re open app") quick_config_reset() return team
def dashboard(self, scoreboard=True, boxscore=True, score=True, teamleaders=True, standings=True): if scoreboard: self.SB.display(horiz=True) #config option if boxscore: self.B.display() if score: self.S.display() if teamleaders: self.TL.display() if standings: self.ST.display(div_stand=get_info(('Default', 'div_stand'))) self.options()
def get_full_name(): name = get_info(('Default', 'full_names_players')) return name
def get_color(): color = get_info(('Default', 'color')) return color