With the Games API, you can obtain information from a collection of games simultaneously. Each element beneath the Games Collection will be a Game Resource
GET
| URI | Description | Sample |
|---|---|---|
http://fantasysports.yahooapis.com/fantasy/v2/games;game_keys={game_key1},{game_key2}
|
Fetch specific games {game_key1} and {game_key2} |
nfl and mlb games:
|
http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games
|
Fetch all games for the logged in user |
all games for user:
|
http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys={game_key1},{game_key2}
|
Fetch specific games {game_key1} and {game_key2} that the logged in user owns teams in.
|
nfl and mlb games for user:
|
Any sub-resource valid for a game is a valid sub-resource under the games collection.
Any sub-resource for a collection of games is extracted using a URI like:
/games/{sub_resource}
OR
/games;game_keys={game_key1},{game_key2}/{sub_resource}
Multiple sub-resources can be extracted from games in the same URI using a format like:
/games;out={sub_resource_1},{sub_resource_2}
OR
/games;game_keys={game_key1},{game_key2};out={sub_resource_1},{sub_resource_2}
In addition to the sub-resources valid for a game resource, the following are valid sub-resources for a games collection.
| Name | Description | URI | Sample |
|---|---|---|---|
teams
|
Fetch teams owned by a user for one or more games. |
OR
|
all teams for user:
|