Are historical weekly stats for players available for Fantasy Hockey? I tried the following query, but no stats are returned at all:
/fantasy/v2/player/248.p.1772/stats;type=week;week=1
Here's the response:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<fantasy_content xml:lang=\"en-US\" yahoo:uri=\"http://fantasysports.yahooapis.com/fantasy/v2/player/248.p.1772/stats;type=week;week=1\" xmlns:yahoo=\"http://www.yahooapis.com/v1/base.rng\" time=\"60.920000076294ms\" copyright=\"Data provided by Yahoo! and STATS, LLC\" xmlns=\"http://fantasysports.yahooapis.com/fantasy/v2/base.rng\">
<player>
<player_key>248.p.1772</player_key>
<player_id>1772</player_id>
<name>
<full>Martin St. Louis</full>
<first>Martin</first>
<last>St. Louis</last>
<ascii_first>Martin</ascii_first>
<ascii_last>St. Louis</ascii_last>
</name>
<editorial_player_key>nhl.p.1772</editorial_player_key>
<editorial_team_key>nhl.t.20</editorial_team_key>
<editorial_team_full_name>Tampa Bay Lightning</editorial_team_full_name>
<editorial_team_abbr>TB</editorial_team_abbr>
<uniform_number>26</uniform_number>
<display_position>RW</display_position>
<image_url>http://l.yimg.com/a/i/us/sp/v/nhl/players_l/20101123/1772.jpg?x=46&y=60&xc=1&yc=1&wc=164&hc=215&q=100&sig=QiUJlEONhFz_TmQWJSx6OA--</image_url>
<is_undroppable>0</is_undroppable>
<eligible_positions>
<position>RW</position>
</eligible_positions>
</player>
</fantasy_content>
If I make a normal query for season stats (e.g. /fantasy/v2/player/{player_key}/stats), I get the proper result.
Am I doing something wrong, or does the data even exist for hockey?
Hrrrm. So, we don't aggregate week-by-week stats for players in NHL, MLB, or NBA unless you're in a team context, and even then, we only do it for H2H leagues. At the league-independent level like you're trying to query, you'd only be able to pull out date stats, season stats, or a couple of "relative to today" collections like "lastweek" or "lastmonth". You could potentially query each day and sum the stats yourself, though you'd need to recalculate all of the composite stats on your own. Was there a particular reason that you wanted to see weekly stats for a player (versus daily stats)?
Note: for NFL, that type of query would work fine, since we index everything by week instead of date for NFL.