Nick Bottomley

Results 22 comments of Nick Bottomley

doing the argument signature would be doable but getting types on the API response shapes would be a lot of work without some kind of tool to automate it. I...

Yeah I've noticed that they seem to have rather lax standards for API development and consistency.

EDIT: I figured it out, should have types soon. ---- @garyking do you have any experience writing `d.ts` files for javascript libraries? I started a [branch to add strong types](https://github.com/bttmly/nba/pull/91)...

@rneu31 if you fork this project please let me know! I maintain a [JS client](https://github.com/bttmly/nba) very similar to this one. I had some ideas about trying to standardize clients across...

@swar wow, there is a ton in there already! where'd you pull all that data from? this probably already exceeds my nba client template. It would be ideal (to me)...

However, you can still make these requests from their website. For instance open up http://stats.nba.com/ and then pop open the console and enter: ```js fetch("http://stats.nba.com/stats/scoreboardV2?DayOffset=0&LeagueID=00&gameDate=04/09/2017") .then(resp => resp.json()) .then(data =>...

@johngriebel where did you run that? It seems to work for people from their local machines but not from cloud instances (particularly AWS but also a few others)

`PlayerPosition` is a required parameter for this endpoint. If you change your url to `http://stats.nba.com/stats/shotchartdetail?Period=0&VsConference=&LeagueID=00&LastNGames=0&TeamID=0&Position=&Location=&Outcome=&ContextMeasure=FGA&DateFrom=&StartPeriod=&DateTo=&OpponentTeamID=0&ContextFilter=&RangeType=&Season=2015-16&AheadBehind=&PlayerID=201939&EndRange=&VsDivision=&PointDiff=&RookieYear=&GameSegment=&Month=0&ClutchTime=&StartRange=&EndPeriod=&SeasonType=Regular+Season&SeasonSegment=&GameID=&PlayerPosition=` (note this final query parameter) it should work. Before trying to decode the JSON of...

@zgvidwck Hmm. Yeah it's returning a 500 error; seems like an issue on their end. If you try it with an invalid parameter (like PlayerPosition as "G") it returns a...

@zgvidwck huh! can you post the link to the reddit thread? I have a package that intends to document all required parameters for each endpoint so I should probably add...