Exemplo n.º 1
0
def cards(deck_type: Optional[str] = None) -> str:
    tournament_only = validate_deck_type(
        deck_type, [DeckType.ALL, DeckType.TOURNAMENT]) == DeckType.TOURNAMENT
    query = request.args.get('fq')
    if query is None:
        query = ''
    all_cards = cs.load_cards(season_id=get_season_id(),
                              tournament_only=tournament_only)
    view = Cards(all_cards, query=query, tournament_only=tournament_only)
    return view.page()
Exemplo n.º 2
0
def cards_tournament() -> str:
    view = Cards(cs.load_cards(season_id=get_season_id()),
                 tournament_only=True)
    return view.page()
Exemplo n.º 3
0
def cards() -> str:
    view = Cards(cs.load_cards(season_id=get_season_id()))
    return view.page()
Exemplo n.º 4
0
def cards():
    view = Cards(cs.played_cards(season_id=get_season_id()))
    return view.page()
Exemplo n.º 5
0
def cards():
    view = Cards(cs.played_cards())
    return view.page()