V1.MetaData.MusicService.Descriptor:MovieCategories

Jump to: navigation, search

Descriptor/MovieCategories

Returns the movie categories and subcategories that are recognized by Rovi Video and Rovi TV Listings.

Syntax

descriptor/moviecategories?&apikey=apikey&sig=sig [&categoryids=categoryids] [&include=include] [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language]

Request Example 1

Request all movie categories.

Request Example 2

Request the first two movie categories with subcategories.

Request Example 3

Request the avant-garde and mystery categories and subcategories.

Request Example 4

Request the avant-garde and mystery categories and subcategories in an XML response.

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.

categoryids No Category IDs to include in the response. To specify multiple IDs, use a comma-separated list like this: categoryids=213,214,216.

If not specified, all movie categories are returned.

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.
include No The subcategories request. To include subcategories in the response, add include=subcategories.
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.
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 Descriptor/MovieCategories

ResponseTypeDescription
moviecategories Category [ ] Movie categories and, if requested, subcategories in each category.

JSON Response Example

Here's the response to Request Example 3. It has been formatted with extra spaces and carriage returns to make it easy to read.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.7.2.5",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"232,246",
      "include":"subcategories",
      "format":"json"
   },
   "view":{
      "total":2
   },
   "serverName":"tul1cssw4",
   "startTime":"2011-09-30T00:34:49.4189051Z",
   "endTime":"2011-09-30T00:34:49.4189051Z",
   "duration":0,
   "categories":[
      {
         "id":"232",
         "name":"Avant-garde \/ Experimental",
         "subcategories":[
            {
               "id":"1",
               "name":"Abstract Film"
            },
            {
               "id":"57",
               "name":"Essay Film"
            },
            {
               "id":"180",
               "name":"Surrealist Film"
            },
            {
               "id":"190",
               "name":"Trash Film"
            },
            {
               "id":"194",
               "name":"Video Art [nf]"
            }
         ]
      },
      {
         "id":"246",
         "name":"Spy Film",
         "subcategories":[
            {
               "id":"74",
               "name":"Glamorized Spy Film"
            },
            {
               "id":"117",
               "name":"Political Drama"
            },
            {
               "id":"119",
               "name":"Political Thriller"
            },
            {
               "id":"137",
               "name":"Resistance Film"
            },
            {
               "id":"172",
               "name":"Spy Comedy"
            },
            {
               "id":"173",
               "name":"Spy Show [TV]"
            },
            {
               "id":"191",
               "name":"Unglamorized Spy Film"
            },
            {
               "id":"199",
               "name":"War Spy Film"
            }
         ]
      }
   ]
}

XML Response Example 2

Here's the response to Request Example 4.
<MovieCategories 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.2.5</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>232,246</id>
    <include>subcategories</include>
    <format>xml</format>
  </parameters>
  <view>
    <total>2</total>
  </view>
  <serverName>tul1cssw3</serverName>
  <startTime>2011-09-30T00:37:26.4675180Z</startTime>
  <endTime>2011-09-30T00:37:27.1237596Z</endTime>
  <duration>656</duration>
  <categories>
    <Category>
      <id>232</id>
      <name>Avant-garde / Experimental</name>
      <subcategories>
        <subcategory>
          <id>1</id>
          <name>Abstract Film</name>
        </subcategory>
        <subcategory>
          <id>57</id>
          <name>Essay Film</name>
        </subcategory>
        <subcategory>
          <id>180</id>
          <name>Surrealist Film</name>
        </subcategory>
        <subcategory>
          <id>190</id>
          <name>Trash Film</name>
        </subcategory>
        <subcategory>
          <id>194</id>
          <name>Video Art [nf]</name>
        </subcategory>
      </subcategories>
    </Category>
    <Category>
      <id>246</id>
      <name>Spy Film</name>
      <subcategories>
        <subcategory>
          <id>74</id>
          <name>Glamorized Spy Film</name>
        </subcategory>
        <subcategory>
          <id>117</id>
          <name>Political Drama</name>
        </subcategory>
        <subcategory>
          <id>119</id>
          <name>Political Thriller</name>
        </subcategory>
        <subcategory>
          <id>137</id>
          <name>Resistance Film</name>
        </subcategory>
        <subcategory>
          <id>172</id>
          <name>Spy Comedy</name>
        </subcategory>
        <subcategory>
          <id>173</id>
          <name>Spy Show [TV]</name>
        </subcategory>
        <subcategory>
          <id>191</id>
          <name>Unglamorized Spy Film</name>
        </subcategory>
        <subcategory>
          <id>199</id>
          <name>War Spy Film</name>
        </subcategory>
      </subcategories>
    </Category>
  </categories>
</MovieCategories>


See Also

↑ Top

Personal tools