Closed kmudrick closed 4 years ago
... I'm going over this more and more and it almost looks like the exact solution that I was looking for for the "league.players" resource... do you mind if I take some small liberties with the code...
Any chance I could ask you for your league ID and/or whether you can make it public so I can test the calls versus it? I only have MLB/NHL leagues that I can test against... and I want to see what I can actually get back as MLB has me pretty limited...
I've been looking at this, and while it is causing a couple of smaller issues, I can easily work around that... what I'm more curious about is how you found this? I don't see it anywhere in the documentation that you can "chain" like this...
... so... there was a bunch of stuff I didn't understand when you submitted this, and for that I apologize. I just pushed 3.2.0 which has this functionality in it. I wish I had taken some more time to go over this when you submitted it and wanted to thank you, immensely, for your time doing it!!
If you are curious on the use case: I'm in a (football) league where we do additional prizes based on the team with the best offense and the team with the best defense - so I am literally looping through every week of the season (since American football operates on a 'weekly' schedule), for every team in this league, and getting the individual points for each player that started at an offensive position ('WR', 'W/R/T', 'TE', 'RB', 'QB', 'K') and the points for every player/team that started at a defensive position ('CB', 'DE', 'S', 'LB', 'DT', 'DEF', 'D') to compute that.