League Details v2.0

Summary
League Details
Resource
League DetailsProvides the details for a league.
HTTP Methods
GETRetrieve League Details
Example
Retrieve League Details
XML field definitions
/league_detailsA container element for league details.
/league_details/draft_state
/league_details/draft_type
/league_details/keeper_deadlineThe deadline by which the teams need to select their keepers, only valid for leagues that use keepers and the keeper policy is set to owners_set.
/league_details/keeper_policy
/league_details/max_keepersThe maximum number of players a team is allowed to keep.
/league_details/nameThe name of the league.
/league_details/num_divisionsThe number of divisions in the league.
/league_details/num_teamsThe number of teams in the league.
/league_details/playoff_periodsThe number of playoff periods for the league.
/league_details/regular_season_periodsThe number of regular season periods for the league.
/league_details/season_status
/league_details/type
/league_details/uses_keepersA boolean to determine if league uses keepers or no.

Resource

League Details

Description

Provides the details for a league.  Details include league name, league type, number of teams, number of divisions, number of periods (regular season and playoffs), season status (preseason, regularseason, playoffs, postseason), draft type and state, and league’s keeper policy information.

HTTP Methods

GET

Retrieve League Details

URL

http://api.cbssports.com/fantasy/league/details?version=2.0

Parameters

response_format(optional) Specifies the format in which the requested resource should be returned.  Valid values are XML and JSON.  The default is XML.

Example

Retrieve League Details

Sample URL

http://api.cbssports.com/fantasy/league/details?version=2.0

XML Response

<?xml version="1.0"?>
<result uriAlias="/league/details" uri="/league/details" statusCode="200" statusMessage="OK">
  <body>
    <league_details>
      <regular_season_periods>22</regular_season_periods>
      <max_keepers>2</max_keepers>
      <playoff_periods>3</playoff_periods>
      <keeper_deadline>20120301</keeper_deadline>
      <season_status>preseason</season_status>
      <name>League Name</name>
      <draft_type>live</draft_type>
      <draft_state>awaitingstart</draft_state>
      <num_divisions>3</num_divisions>
      <uses_keepers>1</uses_keepers>
      <num_teams>14</num_teams>
      <type>mgmt</type>
      <keeper_policy>owners_set</keeper_policy>
    </league_details>
  </body>
</result>

JSON Response

{
   "body" : {
      "league_details" : {
         "regular_season_periods" : 22,
         "max_keepers" : "2",
         "playoff_periods" : "3",
         "keeper_deadline" : "20120301",
         "season_status" : "preseason",
         "name" : "League Name",
         "draft_type" : "live",
         "draft_state" : "awaitingstart",
         "num_divisions" : 3,
         "uses_keepers" : 1,
         "num_teams" : 14,
         "type" : "mgmt",
         "keeper_policy" : "owners_set"
      }
   },
   "uriAlias" : "/league/details",
   "statusMessage" : "OK",
   "uri" : "/league/details",
   "statusCode" : 200
}

XML field definitions

/league_details

A container element for league details.

/league_details/draft_state

The current state of the draft.  Possible values and their meanings are as follows

awaiting startDraft has not started yet.
completedDraft is completed.
suspendedDraft is suspended by the commissioner.
pickingWaiting for a team to make a pick while draft is in progress.
biddingWaiting for teams to make bids for a player while an auction is in progress.
nominatingWaiting for a team to nominate a player for auction while an auction is in progress.

/league_details/draft_type

The type of draft the league uses.  Possible values and their meanings are as follows

noneThe type of the league has not been set yet.
liveOnline, live draft (all in one day).
auctionOnline, live auction draft (all in one day).
extendedOnline, extended draft (over a period of several days).
autoAutomated draft.
offlineManual entry of offline draft results.

/league_details/keeper_deadline

The deadline by which the teams need to select their keepers, only valid for leagues that use keepers and the keeper policy is set to owners_set.

/league_details/keeper_policy

The policy that determines how the keepers will be selected.  Possible values and their meanings are as follows

owner_setEach owner is responsible for selecting their own keepers.
commissioner_setCommissioner is responsible for selecting each team’s keepers.

/league_details/max_keepers

The maximum number of players a team is allowed to keep.

/league_details/name

The name of the league.

/league_details/num_divisions

The number of divisions in the league.

/league_details/num_teams

The number of teams in the league.

/league_details/playoff_periods

The number of playoff periods for the league.

/league_details/regular_season_periods

The number of regular season periods for the league.

/league_details/season_status

The status of the season for the league.  Possible values and their meanings are as follows

preseasonThe season has not started.
regularseasonThe regular season.
playoffsThe playoffs
postseasonThe season is over.

/league_details/type

The type of the league.  Possible values and meanings are as follows

mgmtA management league that has a commissioner.
singleA single league that has no commissioner.

/league_details/uses_keepers

A boolean to determine if league uses keepers or no.  (Values are 1 if the league uses keepers, 0 otherwise)