def update_event_data_files( global_config, year, event, directory ): result = False event_code = CompAlias.get_eventcode_by_alias(event) my_team = global_config['my_team'] # for now, we only support updating files in the EventData directory, so only continue if that's the # directory that was specified. if directory.upper() == 'EVENTDATA': # call each of the get_event_xxx() functions to attempt to retrieve the json data. This action # will also store the json payload to the EventData directory completing the desired # operation get_event_standings_json( global_config, year, event_code ) get_event_rank_list_json( global_config, year, event_code ) get_event_stats_json( global_config, year, event_code, 'oprs' ) get_event_matchresults_json(global_config, year, event_code, 'qual') get_event_matchresults_json(global_config, year, event_code, 'quarters') get_event_matchresults_json(global_config, year, event_code, 'semis') get_event_matchresults_json(global_config, year, event_code, 'finals') get_event_matchresults_json(global_config, year, event_code, 'qual', my_team) get_event_matchresults_json(global_config, year, event_code, 'quarters', my_team) get_event_matchresults_json(global_config, year, event_code, 'semis', my_team) get_event_matchresults_json(global_config, year, event_code, 'finals', my_team) get_event_matchschedule_json(global_config, year, event_code, my_team) get_event_matchschedule_json(global_config, year, event_code) result = True return result
def get_comp_and_eventcode_list(season=None): my_config = ScoutingAppMainWebServer.global_config complist = list() if season == None: season = my_config["this_season"] this_comp = my_config["this_competition"] complist.append((this_comp, CompAlias.get_eventcode_by_alias(this_comp))) other_competitions = CompAlias.get_comp_and_eventcode_list() for comp in other_competitions: if comp and comp[0].upper() != my_config["this_competition"].upper(): complist.append(comp) return complist