0

hockey and basketball game keys

Have the hockey and basketball game keys for 2010 been released? If not will they be released soon? It look like hockey registration has started

by
5 Replies
  • QUOTE (joeyjoejoe61 @ Aug 28 2010, 02:36 PM) <{POST_SNAPBACK}>
    Have the hockey and basketball game keys for 2010 been released? If not will they be released soon? It look like hockey registration has started

    Well...sort of! They're not updated in the documentation at the moment. But the answer was under your nose this entire time! Provided that your nose was over one of the following two queries:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/game/nhl

    CODE
    <game>
    <game_key>248</game_key>
    <game_id>248</game_id>
    <name>Hockey</name>
    <code>nhl</code>
    <type>full</type>
    <url>http://hockey.fantasysports.yahoo.com/hockey</url>
    <season>2010</season>
    </game>


    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/game/nba

    CODE
    <game>
    <game_key>249</game_key>
    <game_id>249</game_id>
    <name>Basketball</name>
    <code>nba</code>
    <type>full</type>
    <url>http://basketball.fantasysports.yahoo.com/nba</url>
    <season>2010</season>
    </game>


    As long as you know the game code, you can always figure out any information you need about the current season of that game.

    tl;dr: The answers are 248 for NHL and 249 for NBA.
    0
    • E
    • Jul 13, 2012
    Is there a way to get an updated, official list of all available game keys?
    0
  • is there anyway to do a "LIKE" query for pattern matching? I want to get a giant list of some leagues for a game_key
    0

  • QUOTE(E @ 13 Jul 2012 2:30 PM)
    Is there a way to get an updated, official list of all available game keys?

    you can execute a query in the console like this
     
    select * from fantasysports.games where game_key = game_code



    It returns the key for th latest season for that game_code
    so to find out the game_key for the 2011 nhl season, you type:-
     
    select * from fantasysports.games where game_key = 'nhl'
    The keys for the older seasons can be found here:-

    http://developer.yahoo.com/fantasysports/guide/game-resource.html
    0


  • QUOTE(fkiwi @ 14 Jul 2012 10:08 PM)
    is there anyway to do a "LIKE" query for pattern matching? I want to get a giant list of some leagues for a game_key
    Update: I guess the only supported operator on a league_key is '='

    Another question:- Can we store the data from the queries in our own databases? I couldnt find any rules on caching in the ToS
    0

Recent Posts

in Fantasy Sports API