Power Standings v2.0

Summary
Power Standings
Resource
Power StandingsPower standings for a fantasy league.
Change Log
January 15, 2013
HTTP Methods
GETRetrieve power standings.
Exceptions
Following list of exceptions will be returned.
Example
Retrieve Power Standings for Period 1
XML field definitions
/power_standingsA container element for the power standings.
/power_standings/periodThe fantasy game period to which the power standings apply.
/power_standings/teamsA container element for the list of teams whose standings are given for this period.
/power_standings/teams/teamA container element for the data on a particular team in the power standings.
/power_standings/teams/team/@idThe ID of the team.
/power_standings/teams/team/breakdownA container element for the breakdown element of the team’s power ranking.
/power_standings/teams/team/breakdown/pointsThe number of breakdown points the team has scored in the ranking period specified by /power_standings/period.
/power_standings/teams/team/breakdown/rankThe team’s rank based on the /power_standings/teams/team/breakdown/points.
/power_standings/teams/team/long_abbrAn abbreviation of the team’s name, as a string with a maximum length of 10 characters.
/power_standings/teams/team/short_nameAn abbreviation of the team’s name, as a string with a maximum length of 6 characters.
/power_standings/teams/team/nameThe full name for the team.
/power_standings/teams/team/totalA container element for the team’s power ranking totals.
/power_standings/teams/team/total/pointsThe total points for the team arrived at by adding the point value for each of the record, breakdown, and points scored categories.
/power_standings/teams/team/total/rankThe team’s rank based on the /power_standings/teams/team/total/points.
/power_standings/teams/team/logoThe URL of the team’s logo.
/power_standings/teams/team/abbrAn abbreviation of the team’s name, as a string with a maximum length of 3 characters.
/power_standings/teams/team/recordA container element for the record element of the team’s power ranking.
/power_standings/teams/team/record/pointsThe number of record points the team has scored in the ranking period specified by /power_standings/period.
/power_standings/teams/team/record/rankThe team’s rank based on the /power_standings/teams/team/record/points.
/power_standings/teams/team/points_scoredA container element for the points scored element of the team’s power ranking.
/power_standings/teams/team/points_scored/pointsThe number of points scored points the team has scored in the ranking period specified by /power_standings/period.
/power_standings/teams/team/points_scored/rankThe team’s rank based on the /power_standings/teams/team/points_scored/points.

Resource

Power Standings

Description

Power standings for a fantasy league.  Power standings are only available for league that use a head-to-head scoring system.  To determine the scoring system of the current league, request the Rules resource and examine the /rules/scoring_system/scoring_system field.

The power standings for a team consists of points calculated from a team’s record, fantasy points scored, and breakdown standings.

If you request this resource for a non-h2h league, the response will be an HTTP 400 response code with the error message “Power Standings are not supported for this league’s scoring system”.

In a 12 team league, a team can get a maximum value of power ranking of 36 as calculated by the formula

Power Ranking = ( Num Teams - Record Rank + 1 ) +
        ( Num Teams - Fantasy Points Scored Rank + 1 ) +
        ( Num Teams - Breakdown Standings Rank + 1).

So, if a fantasy team leads the league in all 3 categories (best record, highest fantasy points scored, and best breakdown standings), its power ranking would be 36.

Change Log

January 15, 2013

  • Added exception handling.

HTTP Methods

GET

Retrieve power standings.

URL

http://api.cbssports.com/fantasy/league/standings/power?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.
period(optional) Period number for which standings are requested.  Defaults to current period.

Exceptions

Following list of exceptions will be returned.

  • type: invalid_league_type, msg: Power Standings are not supported for this league’s scoring system

Example

Retrieve Power Standings for Period 1

Sample URL

http://api.cbssports.com/fantasy/league/standings/power?version=2.0&period=1

XML Response

<?xml version="1.0"?>
<result uriAlias="/league/standings/power" uri="/league/standings/power" statusCode="200" statusMessage="OK">
  <body>
    <power_standings>
      <period>1</period>
      <teams>
        <team id="11">
          <breakdown>
            <points>14</points>
            <rank>1</rank>
          </breakdown>
          <long_abbr>Team Long Abbreviation</long_abbr>
          <short_name>Team Short Name</short_name>
          <name>Team Name</name>
          <total>
            <points>39</points>
            <rank>1</rank>
          </total>
          <logo>Team Logo URL</logo>
          <abbr>Team Long Abbreviation</abbr>
          <record>
            <points>11</points>
            <rank>1</rank>
          </record>
          <points_scored>
            <points>14</points>
            <rank>1</rank>
          </points_scored>
        </team>
        <team id="15">
          <breakdown>
            <points>13</points>
            <rank>2</rank>
          </breakdown>
          <long_abbr>Team Long Abbreviation</long_abbr>
          <short_name>Team Short Name</short_name>
          <name>Team Name</name>
          <total>
            <points>37</points>
            <rank>2</rank>
          </total>
          <logo>Team Logo URL</logo>
          <abbr>Team Long Abbreviation</abbr>
          <record>
            <points>11</points>
            <rank>1</rank>
          </record>
          <points_scored>
            <points>13</points>
            <rank>2</rank>
          </points_scored>
        </team>
      </teams>
    </power_standings>
  </body>
</result>

JSON Response

{
   "body" : {
      "power_standings" : {
         "period" : "1",
         "teams" : [
            {
               "breakdown" : {
                  "points" : 14,
                  "rank" : 1
               },
               "long_abbr" : "Team Long Abbreviation",
               "short_name" : "Team Short Name",
               "name" : "Team Name",
               "total" : {
                  "points" : 39,
                  "rank" : 1
               },
               "logo" : "Team Logo URL",
               "abbr" : "Team Long Abbreviation",
               "record" : {
                  "points" : 11,
                  "rank" : 1
               },
               "id" : "11",
               "points_scored" : {
                  "points" : 14,
                  "rank" : 1
               }
            },
            {
               "breakdown" : {
                  "points" : 13,
                  "rank" : 2
               },
               "long_abbr" : "Team Long Abbreviation",
               "short_name" : "Team Short Name",
               "name" : "Team Name",
               "total" : {
                  "points" : 37,
                  "rank" : 2
               },
               "logo" : "Team Logo URL",
               "abbr" : "Team Long Abbreviation",
               "record" : {
                  "points" : 11,
                  "rank" : 1
               },
               "id" : "15",
               "points_scored" : {
                  "points" : 13,
                  "rank" : 2
               }
            }
         ]
      }
   },
   "uriAlias" : "/league/standings/power",
   "statusMessage" : "OK",
   "uri" : "/league/standings/power",
   "statusCode" : 200
}

XML field definitions

/power_standings

A container element for the power standings.

/power_standings/period

The fantasy game period to which the power standings apply.

/power_standings/teams

A container element for the list of teams whose standings are given for this period.

/power_standings/teams/team

A container element for the data on a particular team in the power standings.

/power_standings/teams/team/@id

The ID of the team.  To get a list of fantasy team IDs, request the Fantasy Teams resource.

/power_standings/teams/team/breakdown

A container element for the breakdown element of the team’s power ranking.

/power_standings/teams/team/breakdown/points

The number of breakdown points the team has scored in the ranking period specified by /power_standings/period.  Breakdown points are based on the hypothetical won-lost-tied record if the team had played every team every week.

/power_standings/teams/team/breakdown/rank

The team’s rank based on the /power_standings/teams/team/breakdown/points.

/power_standings/teams/team/long_abbr

An abbreviation of the team’s name, as a string with a maximum length of 10 characters.

/power_standings/teams/team/short_name

An abbreviation of the team’s name, as a string with a maximum length of 6 characters.

/power_standings/teams/team/name

The full name for the team.

/power_standings/teams/team/total

A container element for the team’s power ranking totals.

/power_standings/teams/team/total/points

The total points for the team arrived at by adding the point value for each of the record, breakdown, and points scored categories.

/power_standings/teams/team/total/rank

The team’s rank based on the /power_standings/teams/team/total/points.

/power_standings/teams/team/logo

The URL of the team’s logo.  You can use this URL to display the team logo.

/power_standings/teams/team/abbr

An abbreviation of the team’s name, as a string with a maximum length of 3 characters.

/power_standings/teams/team/record

A container element for the record element of the team’s power ranking.

/power_standings/teams/team/record/points

The number of record points the team has scored in the ranking period specified by /power_standings/period.  Record points are based on the won-lost-tied record of the team.

/power_standings/teams/team/record/rank

The team’s rank based on the /power_standings/teams/team/record/points.

/power_standings/teams/team/points_scored

A container element for the points scored element of the team’s power ranking.

/power_standings/teams/team/points_scored/points

The number of points scored points the team has scored in the ranking period specified by /power_standings/period.  Points scored points are based on the team’s Fantasy Points scored.

/power_standings/teams/team/points_scored/rank

The team’s rank based on the /power_standings/teams/team/points_scored/points.

The fantasy game period to which the power standings apply.
The number of breakdown points the team has scored in the ranking period specified by /power_standings/period.
The total points for the team arrived at by adding the point value for each of the record, breakdown, and points scored categories.
The number of record points the team has scored in the ranking period specified by /power_standings/period.
The number of points scored points the team has scored in the ranking period specified by /power_standings/period.
Specifies the scoring system, as a string.