V1.MetaData.MusicService.Descriptor:TVCategories

Jump to: navigation, search

Descriptor/TVCategories

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

Syntax

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

Request Example 1

Request all TV categories.

Request Example 2

Request the first two TV categories.

Request Example 3

Request the first two TV categories 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=232,246,243.
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.
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/TVCategories

ResponseTypeDescription
categories Category [ ] TV categories requested.

JSON Response Example

Here's the response to Request Example 2. 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":null,
      "offset":0,
      "count":2,
      "format":"json"
   },
   "view":{
      "offset":0,
      "count":2,
      "total":20
   },
   "serverName":"tul1cssw1",
   "startTime":"2011-10-07T00:26:31.4246021Z",
   "endTime":"2011-10-07T00:26:31.4246021Z",
   "duration":0,
   "categories":[
      {
         "id":"210",
         "name":"action\/adventure"
      },
      {
         "id":"212",
         "name":"animated"
      }
   ]
}

XML Response Example

Here's the response to Request Example 3.
<TvCategories 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 i:nil="true"/>
    <offset>0</offset>
    <count>2</count>
    <format>xml</format>
  </parameters>
  <view>
    <offset>0</offset>
    <count>2</count>
    <total>20</total>
  </view>
  <serverName>tul1cssw1</serverName>
  <startTime>2011-10-07T00:38:47.6135920Z</startTime>
  <endTime>2011-10-07T00:38:47.6135920Z</endTime>
  <duration>0</duration>
  <categories>
    <Category>
      <id>210</id>
      <name>action/adventure</name>
    </Category>
    <Category>
      <id>212</id>
      <name>animated</name>
    </Category>
  </categories>
</TvCategories>


See Also

↑ Top

Personal tools