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

Unable to filter player stats for lastweek/lastmnoth in basketball league #111

Open
als15 opened this issue Dec 23, 2023 · 1 comment
Open

Comments

@als15
Copy link

als15 commented Dec 23, 2023

I'm trying to fetch player resource for basketball league, using the 'lastweek' filter in order to get only last week's stats.
My call is as follows Yahoo.players.fetch('428.p.6515', ['lastweek']) (please assume it's obviously an existing player).

The error I get in return is :

Failed to generate report {
  'xml:lang': 'en-us',
  'yahoo:uri': '/fantasy/v2/players;player_keys=428.p.6515;out=lastweek?format=json',
  description: 'Invalid player resource lastweek requested.',
  detail: ''
}
@whatadewitt
Copy link
Owner

Hi @als15 -- I was able to get the stats (go Raptors!) using my documentation page -- https://yahoo-fantasy-node-docs.vercel.app/resource/player/stats

428.p.6515
lastweek

as the entries on the "tester" and it worked... can you share the code? My guess is that it's that you're passing "lastweek" in an array, and I think you can just use a string...

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