Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response being stripped #7

Open
alterx opened this issue Aug 24, 2016 · 1 comment
Open

Response being stripped #7

alterx opened this issue Aug 24, 2016 · 1 comment

Comments

@alterx
Copy link

alterx commented Aug 24, 2016

I noticed that the response you get after querying the endpoint is different that the one you get when using this library. Gave it a closer look and discovered that in line 34 you're stripping out the rest of the response information

data = data.concat(response.body[endpoint]);

So, for example, the 'teams' endpoint will return an object with 'teams', 'divisions', 'conferences' and 'leagues' but this line will extract only the teams information, leaving out the other three and effectively preventing the user from using this information.

Is there a reason for this?

@jlcarmic
Copy link
Owner

@alterx There was an assumption made in initial design that when calling an endpoint like teams the other data would be superfluous. After working with the API more its clear that this really just leads to more data requests. It will be changed in an upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants