dword4 / nhlapi

Documenting the publicly accessible portions of the NHL API
448 stars 56 forks source link

teamID should be teamId #9

Closed esilverm closed 6 years ago

esilverm commented 6 years ago

The query string is case sensitive and it is a good idea to make sure there isn't conclusion. Also review the ?expand=team.schedule.previous schedule modifier because it doesn't modify anything for me

dword4 commented 6 years ago

I checked and https://statsapi.web.nhl.com/api/v1/schedule?teamID=15 works for me but when I change it to teamId it didn't work, is that what you are encountering as well or something different?

esilverm commented 6 years ago

When you do that team ID there is no data because that team isn't playing. For example, https://statsapi.web.nhl.com/api/v1/schedule?teamId=14 should give the lightning game for today and only that game. However https://statsapi.web.nhl.com/api/v1/schedule?teamID=14 simply gives all the game data for today because it isn't correct.

dword4 commented 6 years ago

Ah ok I see what you are talking about now, it seems to behave quite differently for sure and could lead to all sorts of confusion. Also good find on the team.schedule.previous flag not working