Teams collection

Description

With the Teams API, you can obtain information from a collection of teams simultaneously. The teams collection is qualified in the URI by a particular league to obtain information about teams within the league, or by a particular user (and optionally, a game) to obtain information about the teams owned by the user. Each element beneath the Teams Collection will be a Team Resource

HTTP Operations Supported

  • GET

URIs

URI Description Sample
http://fantasysports.yahooapis.com/fantasy/v2/league/{league_key}/teams Fetch all teams within a league.

http://fantasysports.yahooapis.com/fantasy/v2/league/223.l.431/teams

http://fantasysports.yahooapis.com/fantasy/v2/teams;team_keys={team_key1},{team_key2} Fetch specific teams {team_key1} and {team_key2}

http://fantasysports.yahooapis.com/fantasy/v2/teams;team_keys=223.l.431.t.1,223.l.431.t.2

http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys={league_key1},{league_key2}/teams Fetch all teams of the leagues {league_key1} and {league_key2}

http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=223.l.431,223.l.21821/teams

http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/teams Fetch all teams for the logged in user

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

http://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys={game_key1},{game_key2}/teams Fetch all teams for the logged in user for the games {game_key1} and {game_key2}

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

Any sub-resource valid for a team is a valid sub-resource under the teams collection.

Any sub-resource for a collection of teams is extracted using a URI like:

/teams/{sub_resource}

OR

/teams;team_keys={team_key1},{team_key2}/{sub_resource}

Multiple sub-resources can be extracted from teams in the same URI using a format like:

/teams;out={sub_resource_1},{sub_resource_2}

OR

/teams;team_keys={team_key1},{team_key2};out={sub_resource_1},{sub_resource_2}

Table of Contents