Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Individual Player Fantasy Points per Week #47

Open
stellarore opened this issue Nov 3, 2023 · 1 comment
Open

Individual Player Fantasy Points per Week #47

stellarore opened this issue Nov 3, 2023 · 1 comment

Comments

@stellarore
Copy link

Is it possible to retrieve the fantasy points earned by each athlete in each week? I understand this value would be unique to each league depending on scoring settings.

@DMcP89
Copy link
Collaborator

DMcP89 commented Dec 24, 2024

Yes you can use the player_stats function of a league object to retrieve that value:

    oauth2_logger.cleanup()
    sc = OAuth2(None, None, from_file=<json>)
    gm = yfa.Game(sc, <game_code>)
    ids = gm.league_ids(year=<year>)
    for lg_id in ids:
        if lg_id.find("auto") > 0:
            continue
        lg = yfa.League(sc, lg_id)
        lg.player_stats(
                    player_ids=[<player_id>,<player_id>],
                    req_type="week",
                    week=<week>,
        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants