0

Roster & Stats URI

Hi,

This is for Fantasy Football.

I'm trying to pull the roster and stats for all teams for a particular week. For example, I'm using the following URI to get every team's roster and how their players did for week 1.

http://fantasysports.yahooapis.com/fantasy/v2/league/{league_key}/teams/roster;week=1/players/stats;type=week;week=1

For some reason, I get the roster for all teams, but their stats are not included. But if I use the following URI, I get the roster and stats for one team.

http://fantasysports.yahooapis.com/fantasy/v2/team/{team_key}/roster;week=1/players/stats;type=week;week=1

Any reason why the first URI isn't working properly?

Thanks,
Troy

by
3 Replies
  • Oh. Right. That's one of those other legal things that I'd actually forgotten about. :| We're not allowed to let you grab all of the player stats for all of the teams in your league at once. So for things like that, you'd probably want to design your application to only show player stats for one team at a time. A bit of a silly restriction, I know, but that's what happens when you have contracts with companies that don't really want you giving away all of their statistical data for free.
    0
  • QUOTE (Sean Montgomery @ Sep 3 2010, 07:20 PM) <{POST_SNAPBACK}>
    Oh. Right. That's one of those other legal things that I'd actually forgotten about. :| We're not allowed to let you grab all of the player stats for all of the teams in your league at once. So for things like that, you'd probably want to design your application to only show player stats for one team at a time. A bit of a silly restriction, I know, but that's what happens when you have contracts with companies that don't really want you giving away all of their statistical data for free.


    Hmmm. This is interesting. My league does an offline draft every year and I'm looking into writing a quicky draft board application that I can use my laptop and big TV with. I was hoping to pull all the player data down from our league so that I have a full list of players (with all league-specific data for each, of course) to start our draft with. Would looping through to grab all players in the league be an issue in this scenario? Honestly, I wouldn't need stats data for a draft board application, so if that's the issue then I could pull players without statistical information. I just know if my calls to the API are logged, you'd see my app ID looping and pulling all players. Don't want to get on your bad side. B)
    0
  • QUOTE (Steve @ Nov 1 2010, 10:42 AM) <{POST_SNAPBACK}>
    Hmmm. This is interesting. My league does an offline draft every year and I'm looking into writing a quicky draft board application that I can use my laptop and big TV with. I was hoping to pull all the player data down from our league so that I have a full list of players (with all league-specific data for each, of course) to start our draft with. Would looping through to grab all players in the league be an issue in this scenario? Honestly, I wouldn't need stats data for a draft board application, so if that's the issue then I could pull players without statistical information. I just know if my calls to the API are logged, you'd see my app ID looping and pulling all players. Don't want to get on your bad side. B) Also, depending on how you do it, that could be a lot of unnecessary queries, which isn't great for us. If you made the single large players query without asking for any stats data, though, then it wouldn't be an issue because we don't have similar restrictions outside of the stats.
    0

Recent Posts

in Fantasy Sports API