Hi everyone,
I'm trying to access the latest rosters with a YQL query,
It seems like this query returns the rosters for the current day, which don't take into consideration the latest transaction (add/drop/trades)
select * from fantasysports.teams.roster where league_key='238.l.177103'
To fix this I add the date parameter to my YQL query with a value of one week in the future.
select * from fantasysports.teams.roster where league_key='238.l.177103' and date='2010-06-19'
This work for baseball leagues, but not for football leagues.
The following query does not return any result
select * from fantasysports.teams.roster where league_key='242.l.51047' and date='2010-06-19'
Is there a way to fix this football query ?
or is there an easier to retrieve the latest rosters ?
Thanks,
Alain
For football, we only support requests by week, not date. Try this:
select * from fantasysports.teams.roster where league_key='242.l.51047' and week=1
You're right that when you leave out the week/date parameter, it gives you this week's/today's roster by default. However, whether or not the latest transactions (add/drop/trades) are included depends on the league's settings. Most leagues, by default, apply transactions to the next week/day, but there's a league setting that makes transactions take effect immediately. The roster returned by the API will be the same as what you see on the website.