Data/video-api/v1.1/video/season-info

Jump to: navigation, search

Video/Season/Info

Returns information about a season of a TV series, plus Video/Info requests for episodes in the season. An optional argument includes titles of the episodes.

This request may return a large amount of data. To speed data transmission, do the following:

  • Request one page of data at a time, requesting only what you want to immediately display.
  • Request a compressed response by including Accept-Encoding: gzip,deflate in the HTTP header.

Syntax

video/season/season/info? video=video
cosmoid=cosmoid
iguideid=iguideid
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language] [&include=include]

Request Example 1

Request information about season 2 of The Simpsons and Video/Info requests for all episodes in the season.

Request Example 2

Request season 2 information and Video/Info requests to just the first two episodes.

Request Example 3

Request season 2 information and Video/Info requests to just the first two episodes and include titles of each episode.

Request Example 4

Request an XML response to Request Example 3.

Request Parameters

Sort none.gif  Click to re-sort

Parameter Required Description
apikey Yes Access code that authorizes your request for data from Rovi.
season Yes Season number.
sig Yes A calculated, 32-hex-digit authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three ASCII strings:
  • Your API key.
  • The secret key you received with your API key.
  • The Unix time. Unix time is a timestamp supported in most development environments, and is generally defined as the number of seconds since January 1, 1970 00:00:00 GMT.

Express the alpha hex digits as lower case.

Perform the calculation at the time of each request to be sure it's within a five-minute window of the server time. If you're testing the call in a browser, use our online signature generator to perform the calculation.

cosmoid Conditional Cosmo database ID for a television series. Cosmo is a database of television information. You can grab Cosmo IDs from responses to the following requests:

Condition: The request must contain just one of these parameters:

  • video
  • cosmoid
  • iguideid
iguideid Conditional An ID for a television series used by the i‑Guide™ interactive digital cable TV program guide. You can get i‑Guide IDs from responses to the following requests:

Condition: The request must contain just one of these parameters:

  • video
  • cosmoid
  • iguideid
video Conditional Name of a television series. This returns the top search result for that name. Replace any spaces with plus (+) or percent20 (%20) symbols.

Note: This parameter currently returns only US-English results. Support for other countries and languages will be added in the future.

Condition: The request must contain just one of these parameters:

  • video
  • cosmoid
  • iguideid
count No Number of items to be returned. The default is zero, which returns all items after the offset.
country No Country the language parameter applies to. The current release of the API supports only US.
format No Format of the returned data: json or xml. The default is JSON.
include No Specify include=all to include episode titles in the response.
language No Language of the response data. This request supports only en (English).
offset No Number of items at the start of the available data to skip. The default is zero.

Use count and offset to paginate the data that is available to be returned.

Response

Response Header

ResponseTypeDescription
buildstringThe software release level of the API.
codeintegerHTTP status code. See the status field for the text part of the code.
durationintegerServer processing time in milliseconds. The difference between startTime and endTime.
endTimestringWhen the server sent the response (UTC time).
messagesMessage [ ]Elements of a multiple HTTP response status message.
parametersparametersThe parameters that were included in the request.
parentIdsparentIdsAll of the IDs for the requested movie or program that are recognized by the Video Service.
serverNamestringName of the server that processed the request.
startTimestringWhen the server received the request (UTC time).
statusstringText part of the HTTP status code, which is shown in the code field.
viewviewSummary of items returned in a list of items.

Response for Video/Season/Info

ResponseTypeDescription
associatedMedia VideoClip [ ] Data for constructing links to previews and trailers that are associated with the season. Note:  Your access to this data is governed by your subscription level.
end string Year the season ended.
episodes VideoEpisode [ ] Information about the episodes in the season as specified in the request and a Video/Info request to each episode.
episodesUri string A Video/Season/Episodes request that returns Video/Info requests to every episodes in the season.
ids ids IDs for the movie or program that are recognized by Rovi DVDs or Rovi Video.
number string The season number.
parentalRatings ParentalRating [ ] Parental ratings for the season.
start string Year the season started.
streamable integer Whether a program is available for streaming: 1 for true or 0 for false.
title string Season title.
totalEpisodes integer Total number of episodes in the season.

Response Example 1

Here's the response to Request Example 2, which asks for information about season 2 of The Simpsons and Video/Info requests to just the first two episodes. The response is formatted with extra spaces and carriage returns to make it easy to read.
Requested with http://api.rovicorp.com/data/v1.1/video/season/2/info?apikey=apikey&sig=sig&cosmoid=7903&
count=2
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.6.1.12",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"7903",
      "offset":0,
      "count":2
   },
   "view":{
      "offset":0,
      "count":2,
      "total":27
   },
   "serverName":"tul1cssw2",
   "startTime":"2011-08-08T23:10:15.8840116Z",
   "endTime":"2011-08-08T23:10:15.8840116Z",
   "duration":0,
   "parentIds":{
      "cosmoId":"7903"
   },
   "season":{
      "number":"7",
      "title":"Season 7",
      "start":"1995",
      "end":"1996",
      "totalEpisodes":27,
      "ids":{
         "amgMovieId":null,
         "cosmoId":"13376072",
         "iguideId":null
      },
      "episodesUri":"http://api.rovicorp.com/data/v1.1/video/season/7/episodes?format=json&apikey=4p1k3y&cosmoid=7903",
      "parentalRatings":[

      ],
      "associatedMedia":[

      ],
      "streamable":1,
      "episodes":[
         {
            "number":1,
            "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=15432459"
         },
         {
            "number":2,
            "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=15406771"
         }
      ]
   }
}

Response Example 2

Here's the response to Request Example 3, which asks for information about season 2 of The Simpsons, Video/Info requests to the first two episodes, and titles of each episode.
Requested with http://api.rovicorp.com/data/v1.1/video/season/2/info?apikey=apikey&sig=sig&cosmoid=7903&
count=2&include=all
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.6.1.12",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"7903",
      "offset":0,
      "count":2,
      "include":"all"
   },
   "view":{
      "offset":0,
      "count":2,
      "total":27
   },
   "serverName":"tul1cssw3",
   "startTime":"2011-08-08T23:05:23.3846297Z",
   "endTime":"2011-08-08T23:05:23.4002541Z",
   "duration":15,
   "parentIds":{
      "cosmoId":"7903"
   },
   "season":{
      "number":"7",
      "title":"Season 7",
      "start":"1995",
      "end":"1996",
      "totalEpisodes":27,
      "ids":{
         "amgMovieId":null,
         "cosmoId":"13376072",
         "iguideId":null
      },
      "episodesUri":"http://api.rovicorp.com/data/v1.1/video/season/7/episodes?format=json&apikey=4p1k3y&cosmoid=7903",
      "parentalRatings":[

      ],
      "associatedMedia":[

      ],
      "streamable":1,
      "episodes":[
         {
            "ids":{
               "amgMovieId":null,
               "cosmoId":"15432459",
               "iguideId":null
            },
            "seriesTitle":"The Simpsons",
            "title":"The Simpson's 138th Show Spectacular",
            "number":1,
            "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=15432459"
         },
         {
            "ids":{
               "amgMovieId":null,
               "cosmoId":"15406771",
               "iguideId":null
            },
            "seriesTitle":"The Simpsons",
            "title":"Summer of 4'2\"",
            "number":2,
            "episodeInfoUri":"http://api.rovicorp.com/data/v1.1/video/info?format=json&apikey=4p1k3y&cosmoid=15406771"
         }
      ]
   }
}

XML Response Example

Here's the response to Request Example 4, which asks for information about season 2 of The Simpsons, Video/Info requests to the first two episodes, and titles of each episode in an XML response.
Requested with http://api.rovicorp.com/data/v1.1/video/season/2/info?apikey=apikey&sig=sig&cosmoid=7903&
count=2&include=all&format=xml
.
<VideoSeasonDetail xmlns="com.rovicorp.metadataservice" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <status>ok</status>
  <code>200</code>
  <messages i:nil="true"/>
  <build>1.6.1.12</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>7903</id>
    <offset>0</offset>
    <count>2</count>
    <include>all</include>
    <format>xml</format>
  </parameters>
  <view>
    <offset>0</offset>
    <count>2</count>
    <total>27</total>
  </view>
  <serverName>tul1cssw4</serverName>
  <startTime>2011-08-08T23:12:27.8527412Z</startTime>
  <endTime>2011-08-08T23:12:27.8839910Z</endTime>
  <duration>31</duration>
  <parentIds>
    <cosmoId>7903</cosmoId>
  </parentIds>
  <season>
    <number>7</number>
    <title>Season 7</title>
    <start>1995</start>
    <end>1996</end>
    <totalEpisodes>27</totalEpisodes>
    <ids>
      <amgMovieId i:nil="true"/>
      <cosmoId>13376072</cosmoId>
      <iguideId i:nil="true"/>
    </ids>
    <episodesUri>http://api.rovicorp.com/data/v1.1/video/season/7/episodes?format=xml&apikey=4p1k3y&cosmoid=7903</episodesUri>
    <parentalRatings/>
    <associatedMedia/>
    <streamable>1</streamable>
    <episodes>
      <VideoEpisode>
        <ids>
          <amgMovieId i:nil="true"/>
          <cosmoId>15432459</cosmoId>
          <iguideId i:nil="true"/>
        </ids>
        <seriesTitle>The Simpsons</seriesTitle>
        <title>The Simpson&apos;s 138th Show Spectacular</title>
        <number>1</number>
        <episodeInfoUri>http://api.rovicorp.com/data/v1.1/video/info?format=xml&apikey=4p1k3y&cosmoid=15432459</episodeInfoUri>
      </VideoEpisode>
      <VideoEpisode>
        <ids>
          <amgMovieId i:nil="true"/>
          <cosmoId>15406771</cosmoId>
          <iguideId i:nil="true"/>
        </ids>
        <seriesTitle>The Simpsons</seriesTitle>
        <title>Summer of 4&apos;2&quot;</title>
        <number>2</number>
        <episodeInfoUri>http://api.rovicorp.com/data/v1.1/video/info?format=xml&apikey=4p1k3y&cosmoid=15406771</episodeInfoUri>
      </VideoEpisode>
    </episodes>
  </season>
</VideoSeasonDetail>


See Also

↑ Top

 
Personal tools