whatadewitt / yahoo-fantasy-sports-api

NodeJS wrapper for the Yahoo! Fantasy Sports API
https://yahoo-fantasy-node-docs.vercel.app/
MIT License
192 stars 52 forks source link

Service Not Returning For 2016 NFL Scoreboard/Matchups #19

Closed Adamrzw closed 7 years ago

Adamrzw commented 7 years ago

API is returning null object {} when calling League.scoreboard for league_key ="359.l.490785". Same thing when calling Team.matchups for any team in the league. Other calls working fine, and league is public. Getting error "Cannot read property 'stats' of undefined" from API calls.

I am thinking the stats property doesn't exist in the result set for NFL 2016, as commenting line "team.stats = self.mapStats(t.team[1].team_stats.stats);" in leagueHelper.js gets rid of the error.

whatadewitt commented 7 years ago

Hey thanks for this! I'm going to try and fix this bug over my lunch hour here today. It should be pretty easy! I'll let you know when I push things up!

I generally play baseball and Hockey, so thanks for pointing out some football bugs to me :D

whatadewitt commented 7 years ago

In working on this I've discovered a possible breaking change that should be implemented... I was hoping to save 1.0.0 until I was 100% sure I was stable, but I think that may now be 2.0!

whatadewitt commented 7 years ago

Changes have been pushed to NPM!

You can see all of the changes here: https://github.com/whatadewitt/yfsapi/pull/20

Let me know if you notice anything else! Thanks!