bttmly / nba

Node.js client for nba.com API endpoints
MIT License
710 stars 180 forks source link

[WIP] first stab at types on data namespace endpoints #91

Closed bttmly closed 3 years ago

bttmly commented 3 years ago

sending the same endpoint different query parameters results in different response shapes, so adding types at the endpoint level doesn't seem feasible with the current API design.

a better approach would be to build a higher-level typed client in typescript that delegates to this package, but working out which query parameter combinations for which endpoints result in which response shapes is a big task. I'm sure big chunks can be automated but I don't plan on doing it anytime soon.