Exemplo n.º 1
0
def show_player_sets(tournament_name,
                     event,
                     player_tag,
                     filter_completed=False,
                     filter_current=True,
                     filter_future=True):
    """Returns all players from a tournament"""
    tournament = show_with_brackets(tournament_name, event)

    player = None
    bracket_sets = []

    for bracket_id in tournament['bracket_ids']:
        player_sets = brackets.sets_played_by_player(bracket_id, player_tag,
                                                     filter_completed,
                                                     filter_current,
                                                     filter_future)
        if len(player_sets) == 0:
            continue

        if player is None:
            player = player_sets['player']

        _sets = player_sets['sets']
        bracket_sets = bracket_sets + _sets

    return {'player': player, 'sets': bracket_sets}
Exemplo n.º 2
0
def show_player_sets(tournament_name, event, player_tag):
    """Returns all players from a tournament"""
    tournament = show_with_brackets(tournament_name, event)

    player = None
    bracket_sets = []

    for bracket_id in tournament['bracket_ids']:
        player_sets = brackets.sets_played_by_player(bracket_id, player_tag)
        if len(player_sets) == 0:
            continue

        if player is None:
            player = player_sets['player']

        _sets = player_sets['sets']
        bracket_sets = bracket_sets + _sets

    return {'player': player, 'sets': bracket_sets}