Closed dlw5007 closed 3 years ago
I'm not aware of any APIs that Yahoo! exposes to perform things as the commissioner. So I wonder if you can use the regular add/drop as long as you authenticate as the commissioner. I would have to try this out to confirm.
Thanks for the reply. I attempted what you suggested and received an error indicating I am not the manager of the selected team, even when signed in with commissioner's credentials (see below). I suspected this would not work since commissioners only have the ability to edit rosters through the "commissioner tools" interface.
Error message:
RuntimeError: b'<?xml version="1.0" encoding="UTF-8"?>\n
That's too bad. Yahoo must have a different set of APIs for doing these commish level actions. Unfortunately, they don't expose them in their documentation, so I don't know what those are.
I will try to reach out to the Yahoo dev team to see if anything exists. I saw some examples for accepting/rejecting trades as a commish, but nothing else.
Thanks
I've had really good success using yahoo_fantasy_api for some fantasy football player research. However I'm interested in utilizing it to help automate some mid-season customized rules by dropping/adding players from teams' rosters as the commissioner. I don't think I'm able to do this with the current functions available in YFA, and I am not well versed in API calls so I was hoping one of the dev's of this project could point me in the right direction or provide some sample code to execute commissioner drops and adds from the URI's "https://basketball.fantasysports.yahoo.com/nba/XXXXXX/Y/commishdropplayer" and "https://basketball.fantasysports.yahoo.com/nba/XXXXXX/Y/commishaddplayer"
Thanks!