Esempio n. 1
0
def person_achievements(person_id: str) -> str:
    p = ps.load_person_by_id_or_mtgo_username(person_id,
                                              season_id=get_season_id())
    view = PersonAchievements(
        p,
        achs.load_achievements(p, season_id=get_season_id(), with_detail=True))
    return view.page()
Esempio n. 2
0
def person_achievements(mtgo_username: Optional[str] = None,
                        person_id: Optional[int] = None) -> str:
    p = load_person(mtgo_username, person_id, season_id=get_season_id())
    view = PersonAchievements(
        p,
        achs.load_achievements(p, season_id=get_season_id(), with_detail=True))
    return view.page()
Esempio n. 3
0
def achievements() -> str:
    username = auth.mtgo_username()
    p = None
    if username is not None:
        p = ps.load_person_by_mtgo_username(username,
                                            season_id=get_season_id())
    view = Achievements(achs.load_achievements(p, season_id=get_season_id()))
    return view.page()