0

Retrieving a user's league ID's

Hey guys, I am currently trying to create an iPhone fantasy hockey application. I found the Objective-C SDK and got it working with some hacks to the original code. The problem I am having currently is that I can't figure out how to get a specific user's league ID's so I can start populating some UI. I am using YQL with the YQLQueryRequest object that was provided to us with the SDK.

What I have tried to achieve this is the following:
CODEBOX
select * from fantasysports.leagues where game_key='248' and user_id='me'


When I try this I get a 403 response, keep in mind that the user has logged in through a UIWebView and the YOSSession is valid.

If I can provide anymore information that will help solve this please let me know. Thanks for the help!

2 Replies
  • YQL is limited, I think you should move on and use the REST API instead. If you do:

    Current NHL year:
    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=nhl

    NHL years 2001-2010:
    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=15,64,94,111,130,164,186,210,233/leagues
    0
  • QUOTE (Philip Olson @ Nov 23 2010, 05:37 PM) <{POST_SNAPBACK}>
    YQL is limited, I think you should move on and use the REST API instead. If you do:

    Current NHL year:
    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=nhl

    NHL years 2001-2010:
    CODE
    http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=15,64,94,111,130,164,186,210,233/leagues

    Agreed with Philip that the YQL interface is significantly more limited in scope than directly using the REST API, so I'd back him up in suggesting you check out the REST API. :)(provided that you're using 3-legged OAuth correctly and have valid user credentials. You can also try this one out from the YQL console for your own user)
    0

Recent Posts

in Fantasy Sports API