Example #1
0
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
Example #2
0
 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)
Example #3
0
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
Example #4
0
    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()
Example #5
0
def get_full_name():
    name = get_info(('Default', 'full_names_players'))
    return name
Example #6
0
def get_color():
    color = get_info(('Default', 'color'))
    return color