toddrob99 / MLB-StatsAPI

Python wrapper for MLB Stats API
GNU General Public License v3.0
539 stars 100 forks source link

Return line score when using schedule end point #118

Closed arihani2 closed 1 year ago

arihani2 commented 1 year ago

When reading the wiki, I saw that there was a way to retrieve the linescore for a game by adding the hydrate=linescore parameter into the call. I have tried some variants of this and all result in a Type error since hydrate is not an argument to the function. I looked at the source code and it doesn't seem that there is functionality to include the line score in this call. Can this be made possible or is it already possible and I am reading the code wrong/inputting the argument wrong.

toddrob99 commented 1 year ago

The functions built into this module don't support all features of the API. They are meant to cover some basic use cases, and show examples of how to use statsapi.get() for more advanced cases.

If you're using the schedule function, you can see the support parameters and example output at that wiki link. You can see how that function builds the parameters and makes the API call here. This is what you would want to duplicate and modify to include the hydration(s) you want.

arihani2 commented 1 year ago

Got it, thank you. I appreciate your help