Schedule
Schedule v2.0
Summary
| Schedule | |
| Resource | |
| Schedule | Schedule containing all the matchups for a league. |
| Change Log | |
| January 15, 2013 | |
| HTTP Methods | |
| GET | Retrieve schedule and all the matchups. |
| Exceptions | |
| Following list of exceptions will be returned | |
| Example | |
| Retrieve Schedule | |
| XML field definitions | |
| /schedule | A container element for the schedule. |
| /schedule/ | A container element for a list of fantasy game periods in the schedule. |
| /schedule/ | A container element for a fantasy game period in the schedule. |
| /schedule/ | The ID of the period. |
| /schedule/ | The type of the period. |
| /schedule/ | A label for the period. |
| /schedule/ | A container element for a list of matchups for the period. |
| /schedule/ | A container element for a matchup in the period. |
| /schedule/ | The ID of the matchup. |
| /schedule/ | Specifies the away team for the matchup. |
| /schedule/ | The ID of the away team. |
| /schedule/ | The URL of the away team’s logo. |
| /schedule/ | An abbreviation of the away team’s name, as a string with a maximum length of 10 characters. |
| /schedule/ | An abbreviation of the away team’s name, as a string with a maximum length of 3 characters. |
| /schedule/ | An abbreviation of the away team’s name, as a string with a maximum length of 6 characters. |
| /schedule/ | The fantasy points scored by the away team during the matchup. |
| /schedule/ | The name of the away team. |
| /schedule/ | Specifies the home team for a matchup. |
| /schedule/ | The ID of the home team. |
| /schedule/ | The URL of the home team’s logo. |
| /schedule/ | An abbreviation of the home team’s name, as a string with a maximum length of 10 characters. |
| /schedule/ | An abbreviation of the home team’s name, as a string with a maximum length of 3 characters. |
| /schedule/ | An abbreviation of the home team’s name, as a string with a maximum length of 6 characters. |
| /schedule/ | The fantasy points scored by the home team during the matchup. |
| /schedule/ | The name of the home team. |
| /schedule/ | The end date of the fantasy period, in the format M/D/YY. |
| /schedule/ | The start date of the fantasy period, in the format M/D/YY. |
Schedule
Description
Schedule containing all the matchups for a league. Matchups are available for only head-to-head leagues. To determine the scoring system of the current league, request the Rules resource and examine the /rules/scoring_system/scoring_system field.
GET
Retrieve schedule and all the matchups.
URL
http://api.cbssports.com
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, multiple allowed by passing in a comma-delimited list of period numbers - defaults to current period) Period number for which the schedule is requested. Use period=all to get schedule for the whole season. |
| team_id | (optional, multiple allowed by passing in a comma-delimited list of team ids - defaults to all teams in league) ID of a whose schedule is being requested. To get a list of fantasy team IDs, request the Fantasy Teams resource. The fantasy team ID is found in the /teams/team/@id field. |
Retrieve Schedule
Sample URL
http://api.cbssports.com/fantasy/league/schedules?version=2.0
XML Response
<?xml version="1.0"?>
<result uriAlias="/league/schedules" uri="/league/schedules" statusCode="200" statusMessage="OK">
<body>
<schedule>
<periods>
<period id="1">
<type>Regular Season</type>
<label>Period 1</label>
<matchups>
<matchup id="1">
<away_team id="18">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>288</points>
<name>Team Name</name>
</away_team>
<home_team id="16">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>418</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="2">
<away_team id="9">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>386</points>
<name>Team Name</name>
</away_team>
<home_team id="15">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>485</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="3">
<away_team id="22">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>404</points>
<name>Team Name</name>
</away_team>
<home_team id="10">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>348</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="4">
<away_team id="8">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>331</points>
<name>Team Name</name>
</away_team>
<home_team id="21">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>393</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="5">
<away_team id="19">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>363</points>
<name>Team Name</name>
</away_team>
<home_team id="7">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>403</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="6">
<away_team id="1">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>417</points>
<name>Team Name</name>
</away_team>
<home_team id="23">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>370</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="7">
<away_team id="20">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>413</points>
<name>Team Name</name>
</away_team>
<home_team id="11">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>569</points>
<name>Team Name</name>
</home_team>
</matchup>
</matchups>
<end>4/10/11</end>
<start>3/31/11</start>
</period>
<period id="2">
<type>Regular Season</type>
<label>Period 2</label>
<matchups>
<matchup id="1">
<away_team id="19">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>247</points>
<name>Team Name</name>
</away_team>
<home_team id="16">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>130</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="2">
<away_team id="7">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>231</points>
<name>Team Name</name>
</away_team>
<home_team id="21">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>285</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="3">
<away_team id="10">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>271</points>
<name>Team Name</name>
</away_team>
<home_team id="1">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>228</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="4">
<away_team id="9">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>292</points>
<name>Team Name</name>
</away_team>
<home_team id="22">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>180</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="5">
<away_team id="15">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>375</points>
<name>Team Name</name>
</away_team>
<home_team id="20">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>269</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="6">
<away_team id="8">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>211</points>
<name>Team Name</name>
</away_team>
<home_team id="23">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>197</points>
<name>Team Name</name>
</home_team>
</matchup>
<matchup id="7">
<away_team id="11">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>240</points>
<name>Team Name</name>
</away_team>
<home_team id="18">
<logo>Team Logo URL</logo>
<long_abbr>Team Long Abbreviation</long_abbr>
<abbr>Team Long Abbreviation</abbr>
<short_name>Team Short Name</short_name>
<points>268</points>
<name>Team Name</name>
</home_team>
</matchup>
</matchups>
<end>4/17/11</end>
<start>4/11/11</start>
</period>
</periods>
</schedule>
</body>
</result>JSON Response
{
"body" : {
"schedule" : {
"periods" : [
{
"type" : "Regular Season",
"label" : "Period 1",
"id" : "1",
"matchups" : [
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "288",
"name" : "Team Name",
"id" : "18"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "418",
"name" : "Team Name",
"id" : "16"
},
"id" : "1"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "386",
"name" : "Team Name",
"id" : "9"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "485",
"name" : "Team Name",
"id" : "15"
},
"id" : "2"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "404",
"name" : "Team Name",
"id" : "22"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "348",
"name" : "Team Name",
"id" : "10"
},
"id" : "3"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "331",
"name" : "Team Name",
"id" : "8"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "393",
"name" : "Team Name",
"id" : "21"
},
"id" : "4"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "363",
"name" : "Team Name",
"id" : "19"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "403",
"name" : "Team Name",
"id" : "7"
},
"id" : "5"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "417",
"name" : "Team Name",
"id" : "1"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "370",
"name" : "Team Name",
"id" : "23"
},
"id" : "6"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "413",
"name" : "Team Name",
"id" : "20"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "569",
"name" : "Team Name",
"id" : "11"
},
"id" : "7"
}
],
"end" : "4/10/11",
"start" : "3/31/11"
},
{
"type" : "Regular Season",
"label" : "Period 2",
"id" : "2",
"matchups" : [
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "247",
"name" : "Team Name",
"id" : "19"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "130",
"name" : "Team Name",
"id" : "16"
},
"id" : "1"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "231",
"name" : "Team Name",
"id" : "7"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "285",
"name" : "Team Name",
"id" : "21"
},
"id" : "2"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "271",
"name" : "Team Name",
"id" : "10"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "228",
"name" : "Team Name",
"id" : "1"
},
"id" : "3"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "292",
"name" : "Team Name",
"id" : "9"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "180",
"name" : "Team Name",
"id" : "22"
},
"id" : "4"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "375",
"name" : "Team Name",
"id" : "15"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "269",
"name" : "Team Name",
"id" : "20"
},
"id" : "5"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "211",
"name" : "Team Name",
"id" : "8"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "197",
"name" : "Team Name",
"id" : "23"
},
"id" : "6"
},
{
"away_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "240",
"name" : "Team Name",
"id" : "11"
},
"home_team" : {
"logo" : "Team Logo URL",
"long_abbr" : "Team Long Abbreviation",
"abbr" : "Team Long Abbreviation",
"short_name" : "Team Short Name",
"points" : "268",
"name" : "Team Name",
"id" : "18"
},
"id" : "7"
}
],
"end" : "4/17/11",
"start" : "4/11/11"
}
]
}
},
"uriAlias" : "/league/schedules",
"statusMessage" : "OK",
"uri" : "/league/schedules",
"statusCode" : 200
}/schedule/periods/period/matchups/matchup/away_team/@id
The ID of the away team. You can get a list of the fantasy team ids, abbreviations and their expansions by requesting the Fantasy Teams resource.
/schedule/periods/period/matchups/matchup/home_team/@id
The ID of the home team. You can get a list of the fantasy team ids, abbreviations and their expansions by requesting the Fantasy Teams resource.
Specifies the scoring system, as a string.
The ID of the team.
