0

FantasySports.Player.Stats not available?

Why are fantasysports.players.stats not available for NBA? Is this because data is not ready or is the query im using incorrect:

select * from fantasysports.players.stats where league_key='249.l.<league_id>' and player_key='249.p.<player_id>'

Can someone help me on this? Also, are there any plans to expand the available data to include teams played against, nba team standing, current top performing players ranked by stats?

Any response would be appreciated. Thanks

by
3 Replies
  • QUOTE (matchu @ Nov 15 2010, 02:56 AM) <{POST_SNAPBACK}>
    Why are fantasysports.players.stats not available for NBA? Is this because data is not ready or is the query im using incorrect:

    select * from fantasysports.players.stats where league_key='249.l.<league_id>' and player_key='249.p.<player_id>'

    Can someone help me on this? Also, are there any plans to expand the available data to include teams played against, nba team standing, current top performing players ranked by stats?

    Any response would be appreciated. Thanks

    Looks like there was a bug in the YQL definition -- wasn't passing the player keys correctly. I've checked in a fix to that, so I believe it should roll out into production at some point over the holidays (though we're in a slightly weird time with the push cycles around here, again due to the holidays). If you want to replicate the same behavior without using YQL, though, that query is effectively just:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=<league_key>/players;player_keys=<player_key>/stats


    In terms of where we have plans to expand:
    Teams played against: if you're talking about being able to see the real-life team opponent for a player, yes, we want to work that in at some point.
    NBA team standing: No, that's a little outside of our purview.
    Current top performing players: You can provide a variety of sort parameters to the services, so I think we already cover this? Take the following request as an example:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=<league_key>/players;sort=12;count=10/stats


    That would give you the top 10 players in this league based on stat ID 12, which happens to be points scored. You have options to also hook in things like "sort_type", "sort_date", "sort_week", and "sort_season" to try to narrow down the range over which the stats should apply, ie:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/league;league_keys=<league_key>/players;sort=12;sort_type=date;sort_date=2010-11-14;count=10/stats;type=date;date=2010-11-14


    Apparently Jason Richardson scored the most points yesterday!

    The stat categories used by a league are available from the settings:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/league;league_keys=<league_key>/settings


    Or you can get the overall stat category information for the game as a whole:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/game/nba/stat_categories
    0
  • Is there any news on the bug described above?  I also am having the same problem retrieving stats for multiple players using this:

    "http://fantasysports.yahooapis.com/fantasy/v2/league/265.l.159103/players;player_keys=265.p.3836,265.p.3118/stats"

    Thank you.



    </code>
    0
  • Is there any news on this bug?  I am also having problems receiving stats for multiple players in nba like this:

     fantasysports.yahooapis.com/fantasy/v2/league/265.l.159103/players;player_keys=265.p.3836,265.p.3118/stats

    thank you

    QUOTE (Sean Montgomery @ 15 Nov 2010 4:36 PM) QUOTE (matchu @ Nov 15 2010, 02:56 AM) <{POST_SNAPBACK}> Why are fantasysports.players.stats not available for NBA? Is this because data is not ready or is the query im using incorrect:

    select * from fantasysports.players.stats where league_key='249.l. ' and player_key='249.p. '

    Can someone help me on this? Also, are there any plans to expand the available data to include teams played against, nba team standing, current top performing players ranked by stats?

    Any response would be appreciated. Thanks
    Looks like there was a bug in the YQL definition -- wasn't passing the player keys correctly. I've checked in a fix to that, so I believe it should roll out into production at some point over the holidays (though we're in a slightly weird time with the push cycles around here, again due to the holidays). If you want to replicate the same behavior without using YQL, though, that query is effectively just:
    </code>
    0

Recent Posts

in Fantasy Sports API