-
Notifications
You must be signed in to change notification settings - Fork 534
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
Add SynergyPlayTypes Endpoint #60
Conversation
I'm in disbelief that someone else figured out how to add an endpoint. I'll check this out tonight and add it in once it passes my tests! |
It certainly took quite a bit of trial and error but it was a nice exercise to understand how the project is structured. Everything should be good but a few of the parameter patterns were specified by me which admittedly isn't ideal. It's ok if this PR ultimately isn't committed because I know you can add this endpoint in a few minutes. I've already begun adding some functionality to the endpoint analysis tools as I think it would be beneficial to be able to generate and test user specified endpoints without having to potentially check all endpoints. Also working on a way to intuitively add user specified parameters and patterns to endpoints because I think that would be beneficial to endpoint docs. SynergyPlayTypes for instance doesn't return any worthwhile data without PlayType and TypeGrouping parameters. The endpoint is valid with those nullable but it doesn't make for worthwhile documentation to leave the possible patterns out. Maybe this is a unique case but it still might be valuable to be able to have the ability to manually add specified data to analysis.json (or another json file) that can then be used by the endpoint tools to generate the appropriate files. |
My idea behind the analysis.json is to have only the data that is spit out by the endpoints as opposed to manual changes. So I may update that to leave out the manual changes you made. I would want us to map out everything in the If anything, I will merge your PR and fix up anything that needs to be fixed. This is so you can still get credit for the work that you have done. I am honestly impressed with how much you were able to get through despite the lack of documentation on how to add an endpoint. |
I agree it doesn't make much sense to have anything manually added to I thought about adding a bit of documentation and comments to assist on endpoint analysis and generation but I'm not sure how many new endpoints will be added or how often they'll really need to be updated that way. The Great project and I look forward to many more commits. |
Thank you! One last comment on the regex patterns is that I want the I do think that the mapping file might need some overhauling maybe even a conversion to use |
One last comment on this PR, since we're going with the strictly information returned approach, it might be best to get rid of this line: nba_api/tools/stats/library/mapping.py Line 2598 in f198065
You already cleaned up the leftovers from TypeGrouping and this was just an attempt from me to make sense of I think leaving the parameters in |
Feel free to make another PR with that request so you can claim credit. I forgot about deleting that one. If not, I will go ahead and do that in the next few days. In addition, it'll probably be helpful for me to make some documentation on how to add an endpoint. To be fair, I never anticipated anyone adding one themselves until you did it. |
Added SynergyPlayTypes endpoint