0

Where do i get my league key?

New to the yahoo api, if i have an existing or old league, where can i get the league key for this league? i have the league id, but not sure what the league key would be.

Thanks.

by
4 Replies
  • QUOTE (Tom @ Feb 7 2011, 06:19 PM) <{POST_SNAPBACK}>
    New to the yahoo api, if i have an existing or old league, where can i get the league key for this league? i have the league id, but not sure what the league key would be.

    Thanks.



    I see that the suffix of the league key is the league ID, is there anywhere where the prefix for the game type is defined? i see from examples, baseball 2010 is 238.
    0
  • QUOTE (Tom @ Feb 7 2011, 06:35 PM) <{POST_SNAPBACK}>
    I see that the suffix of the league key is the league ID, is there anywhere where the prefix for the game type is defined? i see from examples, baseball 2010 is 238.


    i'm not sure if i completely follow your question, but if you know the game key (the '238' value in your example) you can use the fantasysports.games table to get the 'display name'. thus:
    select * from fantasysports.games where game_key ='238'

    brings you back info about that game, including the 'name' and 'season' values. unfortunately you cannot go the other way as you must provide either game_key or user_id in order to query that table.
    0
  • QUOTE (Tom @ Feb 7 2011, 06:35 PM) <{POST_SNAPBACK}>
    I see that the suffix of the league key is the league ID, is there anywhere where the prefix for the game type is defined? i see from examples, baseball 2010 is 238.


    sorry, disregard my last answer. i think the table on this page is what you're looking for:
    http://developer.yahoo.com/fantasysports/g...e-resource.html
    0
  • Thanks for replying, Matthew! Yep, that table helps to identify the game IDs of past seasons of games.
    0

Recent Posts

in Fantasy Sports API