0

YQL to retrieve's user football leagues ?

Which YQL statement should I run to retrieve all the 2010 football leagues for a specific user ?

Thanks,
Alain

9 Replies
  • QUOTE (Pickemfirst Dev @ Jun 15 2010, 10:36 PM) <{POST_SNAPBACK}>
    Which YQL statement should I run to retrieve all the 2010 football leagues for a specific user ?

    Thanks,
    Alain


    Try this:

    select * from fantasysports.leagues where user_id='username' and game_key=242
    0
  • Thanks Shane, it works.

    What if I don't have the user's username ?
    can the API automatically send the data corresponding to the oauth credentials ?
    0
  • QUOTE (Pickemfirst Dev @ Jun 16 2010, 04:19 PM) <{POST_SNAPBACK}>
    Thanks Shane, it works.

    What if I don't have the user's username ?
    can the API automatically send the data corresponding to the oauth credentials ?


    Through the API, yes:

    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=242/leagues


    Through YQL, no.
    0
  • Thx Shane.

    will it be possible with YQL one day ? when ?
    or is there a reason why it's impossible ?
    0
  • QUOTE (Pickemfirst Dev @ Jun 16 2010, 06:45 PM) <{POST_SNAPBACK}>
    will it be possible with YQL one day ? when ?
    or is there a reason why it's impossible ?

    I think we just hadn't thought to do it. I've checked in a couple new YQL bindings that will allow you to make a request like:

    select * from fantasysports.leagues where game_key=242 and use_login=1;

    I'm not quite sure what the schedule is for getting those changes out to the YQL console, but they should arrive within a couple weeks, I believe.
    0
  • Thanks.
    will this query work as well ?

    select * from fantasysports.teams where game_key=242 and use_login=1;
    0
  • QUOTE (Pickemfirst Dev @ Jun 16 2010, 09:36 PM) <{POST_SNAPBACK}>
    Thanks.
    will this query work as well ?

    select * from fantasysports.teams where game_key=242 and use_login=1;

    It should once the new YQL bindings roll out (ie, not yet!).
    0
  • QUOTE (Sean Montgomery @ Jun 16 2010, 09:44 PM) <{POST_SNAPBACK}>
    It should once the new YQL bindings roll out (ie, not yet!).


    Hi Sean,
    have the new YQL bindings rolled out yet ?
    0
  • QUOTE (Pickemfirst Dev @ Jul 28 2010, 10:05 AM) <{POST_SNAPBACK}>
    Hi Sean,
    have the new YQL bindings rolled out yet ?

    Oops, sorry, yes. They had. Example query for getting my baseball leagues, for instance:
    CODE
    select * from fantasysports.leagues where use_login=1 and game_key='238';

    Will be sure to get the update notes up on this forum today (we had a push today).
    0

Recent Posts

in Fantasy Sports API