0

How do I get some statistics of a player

Hi All
I need to get some data for my players
Fan Pts
Projected rank
Actual rank
How can I do that?
I didn't found it in players/stats (

7 Replies
  • QUOTE (Alexander Antonov @ Nov 22 2010, 08:34 AM) <{POST_SNAPBACK}>
    Hi All
    I need to get some data for my players
    Fan Pts
    Projected rank
    Actual rank
    How can I do that?
    I didn't found it in players/stats (

    Two different answers:

    Fan Pts:
    Fantasy points are not a "global" setting -- they're dependent on league settings. So, if you're just asking for something like:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/player/242.p.5228/stats


    It won't include any fantasy points because we don't know how you want the fantasy points to be calculated. However, if you asked for something like:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/league/<league_key>/players;player_keys=242.p.5228/stats


    And the league you were looking at used points (ie, any NFL league, or point/headpoint leagues in MLB, NBA, or NHL), then the points would be included along with the stats by default.

    Ranks:
    We only expose two ranks, really: the "overall" rank and the season rank. Season rank is the one that most closely correlates to the "actual" rank, as it's only based on season stats up to this point. You can get that with a request like:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/player/242.p.5228/ranks


    The "overall" rank, identified as "OR", maps to the "Projected Rank" that shows up on the site.
    0
  • Alexander, that's exactly what I was trying to answer when I said:

    QUOTE (Sean Montgomery @ Nov 29 2010, 07:02 PM) <{POST_SNAPBACK}>
    However, if you asked for something like:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/league/<league_key>/players;player_keys=242.p.5228/stats


    And the league you were looking at used points (ie, any NFL league, or point/headpoint leagues in MLB, NBA, or NHL), then the points would be included along with the stats by default.


    Ask for the player stats in the context of a league and you'll get back a player_points element. In the example above, you'd get back a response like:

    CODE
    <?xml version="1.0" encoding="UTF-8"?>
    <fantasy_content xmlns="http://fantasysports.yahooapis.com/fantasy/v2/base.rng" xml:lang="en-US" yahoo:uri="http://fantasysports.yahooapis.com/fantasy/v2/league/nfl.l.xxxxxxx/players;player_keys=242.p.5228/stats" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" time="84.299802780151ms" copyright="Data provided by Yahoo! and STATS, LLC">
    <league>
    <league_key>242.l.xxxxxxx</league_key>
    <league_id>xxxxxxx</league_id>
    <name>xxxxxxx</name>
    <url>http://football.fantasysports.yahoo.com/f1/xxxxxxx</url>
    <draft_status>postdraft</draft_status>

    <num_teams>14</num_teams>
    <edit_key>14</edit_key>
    <weekly_deadline/>
    <current_week>14</current_week>
    <start_week>1</start_week>
    <end_week>16</end_week>

    <league_update_timestamp>1291798524</league_update_timestamp>
    <players count="1">
    <player>
    <player_key>242.p.5228</player_key>
    <player_id>5228</player_id>
    <name>
    <full>Tom Brady</full>

    <first>Tom</first>
    <last>Brady</last>
    <ascii_first>Tom</ascii_first>
    <ascii_last>Brady</ascii_last>
    </name>
    <editorial_player_key>nfl.p.5228</editorial_player_key>

    <editorial_team_key>nfl.t.17</editorial_team_key>
    <editorial_team_full_name>New England Patriots</editorial_team_full_name>
    <editorial_team_abbr>NE</editorial_team_abbr>
    <bye_weeks>
    <week>5</week>
    </bye_weeks>
    <uniform_number>12</uniform_number>

    <display_position>QB</display_position>
    <image_url>http://l.yimg.com/a/i/us/sp/v/nfl/players_l/headshots/20090903//5228.jpg?x=46&amp;y=60&amp;xc=1&amp;yc=1&amp;wc=165&amp;hc=215&amp;q=100&amp;sig=5qq_KUAYfbm0gN7Q5.HQSg--</image_url>
    <is_undroppable>1</is_undroppable>
    <eligible_positions>

    <position>QB</position>
    </eligible_positions>
    <has_player_notes>1</has_player_notes>
    <has_recent_player_notes>1</has_recent_player_notes>
    <player_stats>
    <coverage_type>season</coverage_type>
    <season>2010</season>

    <stats>
    <stat>
    <stat_id>4</stat_id>
    <value>3029</value>
    </stat>
    <stat>
    <stat_id>5</stat_id>

    <value>27</value>
    </stat>
    <stat>
    <stat_id>6</stat_id>
    <value>4</value>
    </stat>
    <stat>

    <stat_id>9</stat_id>
    <value>17</value>
    </stat>
    <stat>
    <stat_id>10</stat_id>
    <value>1</value>
    </stat>

    <stat>
    <stat_id>12</stat_id>
    <value>0</value>
    </stat>
    <stat>
    <stat_id>13</stat_id>
    <value>0</value>

    </stat>
    <stat>
    <stat_id>15</stat_id>
    <value>0</value>
    </stat>
    <stat>
    <stat_id>16</stat_id>

    <value>0</value>
    </stat>
    <stat>
    <stat_id>18</stat_id>
    <value>1</value>
    </stat>
    <stat>

    <stat_id>57</stat_id>
    <value>0</value>
    </stat>
    </stats>
    </player_stats>
    <player_points>
    <coverage_type>season</coverage_type>

    <season>2010</season>
    <total>230.86</total>
    </player_points>
    </player>
    </players>
    </league>


    EDIT: If you specifically want the week points for players on your team in a certain week, just figure out which roster you care about and ask for that:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/team/<team_key>/roster;week=<week>/players/stats;type=week;week=<week>
    0
  • Thank you for the reply

    >>Fantasy points are not a "global" setting -- they're dependent on league settings. So, if you're just asking for something like: ...
    Ok here is the screenshot of my team named Crushers
    How can I get values from 'Fan Pts' field for all my players from my app?
    0
  • 0
  • somebody please help me
    0
  • Sean Montgomery
    Thanks you again )
    Could you tall me where I can see a list of all player statuses with description (IR - injured players, BN - benched players, NA - ? etc)?
    0
  • QUOTE (Alexander Antonov @ Dec 9 2010, 09:07 AM) <{POST_SNAPBACK}>
    Sean Montgomery
    Thanks you again )
    Could you tall me where I can see a list of all player statuses with description (IR - injured players, BN - benched players, NA - ? etc)?

    We don't have a full list anywhere, and it varies from game to game. I would note that BN is a selected position for a player, not a status. Typically, you'll see statuses like IR (Injured Reserve), DL (Disabled List), NA (Not Active), O (Out), P (probable), Q (Questionable), etc. Typically, the only reason a player will have a status listed is if it's negative, and it usually always relevant to display as is in conjunction with the name (that's what we do on the site).
    0

Recent Posts

in Fantasy Sports API