League Headlines v2.0

Summary
League Headlines
Resource
League HeadlinesA list of league headlines created by fantasy league members.
HTTP Methods
GETRetrieve a list of league headlines.
Example
Retrieve HeadlinesRetrieve 3 latest headlines
XML field definitions
/league_headlinesA container element for a list of league headlines.
/league_headlines/league_headlineA container element for a league headline.
/league_headlines/league_headline/@idThe ID of the league news story associated with this headline.
/league_headlines/league_headline/synopsisA synopsis of the news story associated with this headline.
/league_headlines/league_headline/timestampThe timestamp of the headline expressed in UNIX timestamp format.
/league_headlines/league_headline/authorThe name of the author of the story.
/league_headlines/league_headline/titleThe text of the headline.

Resource

League Headlines

Description

A list of league headlines created by fantasy league members.  Headlines are sorted based on publication time with with the most recent first.  You can limit the number of headlines returned by each request (the default is 20), and you can request a set of headlines starting anywhere in the list.

The headline information includes the ID of the story the headline corresponds to, a synopsis of the story, the headline text, author, and timestamp.  You can use the story ID (/fantasy_headlines/fantasy_headline/@id) to get the full story by requesting the Fantasy Story resource.

HTTP Methods

GET

Retrieve a list of league headlines.

URL

http://api.cbssports.com/fantasy/league/news/headlines?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.
limit(optional) Limit the number of league headlines returned to this value.
offset(optional) Return league headlines from this place in the current list of league headlines.  The default is 0.  You can use this parameter together with the limit parameter to page though a list of headlines.  Note that there is no guarantee that the request will always return the next ten after those returned in the original request.  If headlines are added to the resource between requests, the later request will return headlines starting from the offset number in the current list at the time the request is made.

Example

Retrieve Headlines

Sample URL

Retrieve 3 latest headlines

http://api.cbssports.com/fantasy/league/news/headlines?version=2.0&limit=3

XML Response

<?xml version="1.0"?>
<result uriAlias="/league/news/headlines" uri="/league/news/headlines" statusCode="200" statusMessage="OK">
  <body>
    <league_headlines>
      <league_headline id="1285594162">
        <synopsis> Synopsis </synopsis>
        <timestamp>1285594162</timestamp>
        <author> Author name </author>
        <title> Story Title </title>
      </league_headline>
      <league_headline id="1274114662">
        <synopsis> Synopsis </synopsis>
        <timestamp>1274114662</timestamp>
        <author> Author name </author>
        <title> Story Title </title>
      </league_headline>
      <league_headline id="1254142417">
        <synopsis> Synopsis </synopsis>
        <timestamp>1254142417</timestamp>
        <author> Author name </author>
        <title> Story Title </title>
      </league_headline>
    </league_headlines>
  </body>
</result>

JSON Response

{
   "body" : {
      "league_headlines" : [
         {
            "synopsis" : "Synopsis",
            "timestamp" : "1285594162",
            "author" : "Author name",
            "title" : "Story Title",
            "id" : "1285594162"
         },
         {
            "synopsis" : "Synopsis",
            "timestamp" : "1274114662",
            "author" : "Author name",
            "title" : "Story Title",
            "id" : "1274114662"
         },
         {
            "synopsis" : "Synopsis",
            "timestamp" : "1254142417",
            "author" : "Author name",
            "title" : "Story Title",
            "id" : "1254142417"
         }
      ]
   },
   "uriAlias" : "/league/news/headlines",
   "statusMessage" : "OK",
   "uri" : "/league/news/headlines",
   "statusCode" : 200
}

XML field definitions

/league_headlines

A container element for a list of league headlines.

/league_headlines/league_headline

A container element for a league headline.

/league_headlines/league_headline/@id

The ID of the league news story associated with this headline.  You can use this ID to get the story by requesting the League Story.

/league_headlines/league_headline/synopsis

A synopsis of the news story associated with this headline.

/league_headlines/league_headline/timestamp

The timestamp of the headline expressed in UNIX timestamp format.

/league_headlines/league_headline/author

The name of the author of the story.  If the author is no longer a member of the league, the value will be “Author no longer in league”.

/league_headlines/league_headline/title

The text of the headline.

The ID of the fantasy story that corresponds to this headline.