0

How to get a team with players and their stats

Hello,

I am trying to get a team along with the roster and each players stats. I can use the YQL and get what I need using...

select* from fantasysports.teams.roster.stats where team_key = '273.l.73856.t.9'

How would I get the same thing using something like this?

http://fantasysports.yahooapis.com/fantasy/v2/team/273.l.73856.t.9/roster/stats

As far as i can tell, it does not look like there is a sub_resource to do this?

Also note.. if I try like this... http://query.yahooapis.com/v1/yql?q=select* from fantasysports.teams.roster.stats where team_key = "273.l.73856.t.9", i get an error of <!-- default "HTTP Version Not Supported" response (505) -->

Any thoughts? on getting either option working? 

by
8 Replies
  • Are you looking for

    http://fantasysports.yahooapis.com/fantasy/v2/team/273.l.73856.t.9/roster/players/stats  ?
    0
  • I can see your reply fine, did that query work for you?
    0
  • Yes this did help. Thank you.
    0
  • Do the stats accumulate over each week? Meaning week 3 will have accumulative stats? I think in the end, I would like to have the most recent week with accumulative stats. Make sense?
    0
  • Heh... I had to pair down my follow up question... for some reason an extra sentence would not post.
    0
  • beside, what if i JUST get a player's name, how can I query this player's all info? is there a way to get player's id based on the name?
    0
  • When I do the following request:

    <http://fantasysports.yahooapis.com/fantasy/v2/league/%league_key%/teams/roster/players/stats>
    

    All I get back is the roster & players, but no stats. However, the following:

    <http://fantasysports.yahooapis.com/fantasy/v2/team/%team_key%/teams/roster/players/stats>
    

    Does return roster, players & stats.

    What am I doing wrong with the first request that I'm not getting back the actual stats?

    TIA.

    0
  • Quick edit to the above, the second request should have been:

    <http://fantasysports.yahooapis.com/fantasy/v2/team/%team_key%/roster/players/stats>
    
    0

Recent Posts

in Fantasy Sports API