Well, it doesn't look like much information from the API, if any, is available without using OAuth. OAuth would be great to for stability, and to avoid screen scraping, etc. However, the user is already logged into Yahoo on their side, and so their league & roster information is already available.
For example... User's leagues & teams are available on the page where the program is running, i.e.
http://basketball.fantasysports.yahoo.com.
Requests made by the program are below. In order of how they are called in the program:
Get requests:
1) Try starting all active players. This does not start players based on any kind of ranking, so you may end up benching your best player and playing your worst.
- Code: Select all
/leagueId/teamId/startactiveplayers?date=xx-xx-xxxx&crumb=xxxxx
2) In the case that there are benched players the program will need to decide which players to use, based on their rankings. This is the URL for rankings.
- Code: Select all
/leagueId/teamId?date=xx-xx-xxxx&stat1=K
Post requests (only one):
3) Posts the best line-up.
- Code: Select all
/leagueId/teamId/editroster?yspglobalform=&date=xx-xx-xxxx&crumb=xxxxx&jsubmit=Submit%20Changes&ret=dnd[&playerId=playerPosition, ...]