uberfastman / yfpy

Python API wrapper for the Yahoo Fantasy Sports public API (supports NFL, NHL, MLB, and NBA).
https://pypi.org/project/yfpy/
GNU General Public License v3.0
189 stars 48 forks source link

[Bug] "get_team_roster_player_stats_by_week" returns player stats for a single day, not week #49

Open drjamm711 opened 1 year ago

drjamm711 commented 1 year ago

Description of Issue

I am running query.get_team_roster_player_stats_by_week(team_id=4). The function lists player_points.coverage_type as "week" and player_points.week as "1". When I run the function, it's returning player_points.coverage_type = "date" and then giving the current date, instead of the week. This results in the incorrect stats being displayed.

If I run query.get_team_roster_player_stats_by_week(team_id=4, chosen_week=1), it will choose "2023-10-29" as the "date", when it should display 1 as the week.

Additional Information as Applicable

I'm doing this for Fantasy Basketball. This may not be a bug for Fantasy Football.

Yahoo Fantasy Sports League ID

43993

Yahoo Fantasy Sports League Privacy

Private

Operating System/Environment

Windows

Other

None

gameuser1982 commented 10 months ago

Any update on this issue @uberfastman

jcbluemel commented 2 months ago

Experiencing the same here! It looks like it might be taking the stats from final day of that week for each player, rather than the cumulative total of all the days. @uberfastman

jcbluemel commented 1 month ago

From looking at Yahoo's docs, perhaps a type=week needs to be included as a param?

image