V1.MetaData.VideoService.Video:Moods

Jump to: navigation, search

Video/Moods

Returns terms that describe expressive characteristics of a movie or television program, along with weightings that reflect the relative strength of each term.

Syntax

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

Request Example 1

Request the moods for the movie Being John Malkovich.

Request Example 2

Request an XML response with moods for the movie Being John Malkovich.

Request Example 3

Request the moods for the TV series The Simpsons.

Request Parameters

Sort none.gif  Click to re-sort

Parameter Required Description
apikey Yes Access code that authorizes your request for data from Rovi.
sig Yes A calculated authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three 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.

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 movie or a television series, season, or program. 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 A 24-bit program ID for a television program used by the i‑Guide™ interactive digital cable TV program guide. You can get i‑Guide IDs from i‑Guide and from responses to the following requests:

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

  • video
  • cosmoid
  • iguideid
video Conditional Title of a movie, television program, or television series, or keywords from the title. This searches for the most popular title with that combination of words. 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.

Use count and offset to paginate the response.

country No Country of the language of the response. The current release of the API supports only US.
format No Format of the returned data: json or xml. The default is JSON.
language No Language of the response data. This request supports only en (English).
offset No Number of items at the start of the returned list to skip. The default is zero.

Use count and offset to paginate the response.

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.
parametersparametersList of the parameters 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 that is shown in the code field.
viewviewSummary of items returned in a list of items.

Response for Video/Moods

ResponseTypeDescription
moods VideoMood [ ] Moods that apply to the movie or program specified in the request.

JSON Response Example

Here's the response to Request Example 1. It is formatted with extra spaces and carriage returns to make it easy to read.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.7.0.1",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"2512627"
   },
   "view":{
      "total":2
   },
   "serverName":"tul1cstw3",
   "startTime":"2011-08-17T20:08:40.6236890Z",
   "endTime":"2011-08-17T20:08:40.6236890Z",
   "duration":0,
   "parentIds":{
      "cosmoId":"2512627"
   },
   "moods":[
      {
         "id":"D 2030",
         "name":"Comedy on the Edge",
         "weight":7
      },
      {
         "id":"D 2024",
         "name":"Fantastic Reality",
         "weight":4
      }
   ]
}

XML Response Example

Here's the response to Request Example 2.
<VideoMoods 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.7.0.1</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>2512627</id>
    <format>xml</format>
  </parameters>
  <view>
    <total>2</total>
  </view>
  <serverName>tul1cstw4</serverName>
  <startTime>2011-08-17T20:10:11.5432901Z</startTime>
  <endTime>2011-08-17T20:10:11.5589146Z</endTime>
  <duration>15</duration>
  <parentIds>
    <cosmoId>2512627</cosmoId>
  </parentIds>
  <moods>
    <VideoMood>
      <id>D 2030</id>
      <name>Comedy on the Edge</name>
      <weight>7</weight>
    </VideoMood>
    <VideoMood>
      <id>D 2024</id>
      <name>Fantastic Reality</name>
      <weight>4</weight>
    </VideoMood>
  </moods>
</VideoMoods>


See Also

↑ Top

Personal tools