Closed jdominguez13 closed 1 year ago
Pass True
for the recipients
parameter.
params = {
'awardId':'ALROY', 'sportId':1,
'season':2022,
'recipients':True
}
awards = statsapi.get('awards', params)
awards
Ah, my bad!
Thanks for the assist. I was able to get it now.
This is an awesome tool!
Hey, I'm an inexperienced Python user trying to use this awesome tool, but can't seem to get the statsapi.get() call right. I'm trying to get awards won by a player (provided their personId) but can't seem to be able to pass the "recipients" parameter or the season parameter for that matter.
I started simple by trying to determine the 2022 ALROY award winner, but this code just provides me with metadata about the Award itself.
`params = { 'awardId':'ALROY', 'sportId':1, 'season':2022, 'recipients':'personId' }
awards = statsapi.get('awards', params)
awards`
Sorry for the dumb question, but Python is really not my strong suit.
Thanks,
Juan