0

stat_id mapping for Player Resource

Is there a mapping doc for stat_id returned as part of the player resource (http://developer.yahoo.com/fantasysports/guide/player-resource.html) as to what they mean. Example of a response returned for a MLB player:

...
<season>2010</season>
<stats>
<stat>
<stat_id>0</stat_id>
<value>58</value>
</stat>
<stat>
<stat_id>1</stat_id>
<value>58</value>
</stat>
...

3 Replies
  • http://developer.yahoo.com/fantasysports/g...e-resource.html

    If you make a request for "settings", beneath the league resource, you'll get back <stat_categories>, beneath <settings>, that will look something like this:

    CODEBOX
          <stat_categories>
    <stats>
    <stat>
    <stat_id>60</stat_id>
    <enabled>1</enabled>
    <name>H/AB</name>
    <display_name>H/AB</display_name>
    <sort_order>1</sort_order>
    <position_type>B</position_type>
    <is_only_display_stat>1</is_only_display_stat>
    </stat>
    <stat>
    <stat_id>1</stat_id>
    <enabled>1</enabled>
    <name>Games Played</name>
    <display_name>GP</display_name>
    <sort_order>1</sort_order>
    <position_type>B</position_type>
    </stat>
    ...
    </stats>
    </stat_categories>


    Here's an example of a request for all the players on a team and their stats, along with their league settings (which includes their stat categories):

    http://fantasysports.yahooapis.com/fantasy...1/players/stats

    You'll only get the stat categories used by that league. Currently, we do not provide a way to get all possible stat categories.
    0
  • QUOTE (Shane K @ Jun 9 2010, 04:57 PM) <{POST_SNAPBACK}>
    http://developer.yahoo.com/fantasysports/g...e-resource.html

    If you make a request for "settings", beneath the league resource, you'll get back <stat_categories>, beneath <settings>, that will look something like this:

    CODE
          <stat_categories>
    <stats>
    <stat>
    <stat_id>60</stat_id>
    <enabled>1</enabled>
    <name>H/AB</name>
    <display_name>H/AB</display_name>
    <sort_order>1</sort_order>
    <position_type>B</position_type>
    <is_only_display_stat>1</is_only_display_stat>
    </stat>
    <stat>
    <stat_id>1</stat_id>
    <enabled>1</enabled>
    <name>Games Played</name>
    <display_name>GP</display_name>
    <sort_order>1</sort_order>
    <position_type>B</position_type>
    </stat>
    ...
    </stats>
    </stat_categories>


    Here's an example of a request for all the players on a team and their stats, along with their league settings (which includes their stat categories):

    http://fantasysports.yahooapis.com/fantasy...1/players/stats

    You'll only get the stat categories used by that league. Currently, we do not provide a way to get all possible stat categories.


    Hi Shane
    as you said , so how can I get a COLLECTION?
    ALL LEAGUES' DATA ?
    ALL TEAMS' DATA?
    ALL PLAYERS' DATA?
    0
  • QUOTE (Ryan @ Jul 11 2010, 06:28 PM) <{POST_SNAPBACK}>
    Hi Shane
    as you said , so how can I get a COLLECTION?
    ALL LEAGUES' DATA ?
    ALL TEAMS' DATA?
    ALL PLAYERS' DATA?

    Your question is a bit vague, I think. There really isn't any such thing as "all league's data", just a variety of specific resources that give you certain pieces of data. The most important resources should be mentioned in varying levels of detail in the documentation, so I can really only suggest reading over the documentation and coming back with more specific questions about exactly what data you're looking for and what sorts of problems you're having retrieving it.
    0

Recent Posts

in Fantasy Sports API