def competition_leaderboard_cli(self,
                                    competition,
                                    competition_opt=None,
                                    path=None,
                                    view=False,
                                    download=False,
                                    csv_display=False,
                                    quiet=False):
        """ a wrapper for competition_leaderbord_view that will print the
            results as a table or comma separated values

            Parameters
            ==========
            competition: the competition name to view leadboard for
            competition_opt: an alternative competition option provided by cli
            path: a path to download to, if download is True
            view: if True, show the results in the terminal as csv or table
            download: if True, download the entire leaderboard
            csv_display: if True, print comma separated values instead of table
            quiet: suppress verbose output (default is False)
        """
        competition = competition or competition_opt
        if not view and not download:
            raise ValueError('Either --show or --download must be specified')

        if competition is None:
            competition = self.get_config_value(self.CONFIG_NAME_COMPETITION)
            if competition is not None and not quiet:
                print('Using competition: ' + competition)

        if competition is None:
            raise ValueError('No competition specified')

        if download:
            self.competition_leaderboard_download(competition, path, quiet)

        if view:
            results = self.competition_leaderboard_view(competition)
            fields = ['teamId', 'teamName', 'submissionDate', 'score']
            if results:
                if csv_display:
                    self.print_csv(results, fields)
                else:
                    self.print_table(results, fields)
            else:
                print('No results found')
def competition_leaderboard_cli ( self , competition , competition_opt = None , path = None , view = False , download = False , csv_display = False , quiet = False ) : competition = competition or competition_opt if not view and not download : raise ValueError ( 'Either --show or --download must be specified' ) if competition is None : competition = self . get_config_value ( self . CONFIG_NAME_COMPETITION ) if competition is not None and not quiet : print ( 'Using competition: ' + competition ) if competition is None : raise ValueError ( 'No competition specified' ) if download : self . competition_leaderboard_download ( competition , path , quiet ) if view : results = self . competition_leaderboard_view ( competition ) fields = [ 'teamId' , 'teamName' , 'submissionDate' , 'score' ] if results : if csv_display : self . print_csv ( results , fields ) else : self . print_table ( results , fields ) else : print ( 'No results found' )
a wrapper for competition_leaderbord_view that will print the
            results as a table or comma separated values

            Parameters
            ==========
            competition: the competition name to view leadboard for
            competition_opt: an alternative competition option provided by cli
            path: a path to download to, if download is True
            view: if True, show the results in the terminal as csv or table
            download: if True, download the entire leaderboard
            csv_display: if True, print comma separated values instead of table
            quiet: suppress verbose output (default is False)