User resource

Description

With the User API, you can retrieve fantasy information for a particular Yahoo! user. Most usefully, you can see which games a user is playing, and which leagues they belong to and teams that they own within those games. Because you can currently only view user information for the logged in user, you would generally want to use the Users collection, passing along the use_login flag, instead of trying to request a User resource directly from the URI.

HTTP Operations Supported

  • GET

URIs

It is generally recommended that you instead use the Users collection, passing along the use_login flag.

Sub-resources

Default sub-resource: N/A

Name Description URI Sample
games Fetch the Games in which the user has played. Additionally accepts flags is_available to only return available games. /fantasy/v2/users;use_login=1/games

http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games

games/leagues Fetch leagues that the user belongs to in one or more games. The leagues will be scoped to the user. This will throw an error if any of the specified games do not support league sub-resources. /fantasy/v2/users;use_login=1/games;game_keys={game_key1},{game_key2}/leagues

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

games/teams Fetch teams owned by the user in one or more games. The teams will be scoped to the user. This will throw an error if any of the specified games do not support team sub-resources. /fantasy/v2/users;use_login=1/games;game_keys={game_key1},{game_key2}/teams

http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=223/teams

Table of Contents