Descriptor/TVCategories
Returns local 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 US TV categories.
Request Example 2
- Request the first two US TV categories.
Request Example 3
- Request the first two US TV categories in an XML response.
Request Example 4
- Request the first two TV categories in an XML and French-language response.
Request Parameters
Click to re-sort
Parameter | Required | Description |
apikey | Yes | Access code that authorizes your request for data from Rovi. |
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. |
categoryids | No | Category IDs to include in the response. To specify multiple IDs, use a comma-separated list like this: categoryids=1391948,1391950,1391951. |
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, stated as a two-character ISO 3166 country code. Default is the default country of the language you specify (US if language is not specified). If an invalid combination of country and language is specified, US English will be returned.
Valid country codes are:
| Argentina | | El Salvador | | Nicaragua |
| Austria | | Finland | | Norway |
| Belgium | | France | | Panama |
| Bermuda | | Germany | | Peru |
| Bolivia | | Guatemala | | Poland |
| Brazil | | Honduras | | Portugal |
| Canada | | Ireland | | Spain |
| Chile | | Italy | | Sweden |
| Colombia | | Jamaica | | Switzerland |
| Costa Rica | | Luxembourg | | United Kingdom* |
| Denmark | | Mexico | | United States |
| Dominican Republic | | Netherlands | | Venezuela |
| Ecuador | | | | |
* Includes Wales, Scotland, and Northern Ireland. |
format | No | Format of the returned data: json or xml. The default is JSON. |
language | No | Language of the response data, stated as a two-character ISO 639 language code:
| Danish | | French | | Portuguese |
| Dutch | | German | | Spanish |
| English | | Italian | | Swedish |
| Finnish | | Norwegian |
| Flemish | | Polish |
Default is en (English). If content is not available in the language requested, another language is chosen as determined by the Language Fallback Sequence table. |
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 | Type | Description |
build | string | The software release level of the API. |
code | integer | HTTP status code. See the status field for the text part of the code. |
duration | integer | Server processing time in milliseconds. The difference between startTime and endTime. |
endTime | string | When the server sent the response (UTC time). |
messages | Message [ ] | Elements of a multiple HTTP response status message. |
parameters | parameters | The parameters that were included in the request. |
serverName | string | Name of the server that processed the request. |
startTime | string | When the server received the request (UTC time). |
status | string | Text part of the HTTP status code, which is shown in the code field. |
view | view | Summary of items returned in a list of items. |
Response for Descriptor/TVCategories
Response | Type | Description |
categories | Category [ ] | TV categories requested. |
JSON Response Example
- Here's the response to Request Example 2, which asks for the first two US TV categories. The response has been formatted with extra spaces and carriage returns to make it easy to read.
- Requested with http://api.rovicorp.com/data/v1.1/descriptor/tvcategories?apikey=apikey&sig=sig&count=2.
{
"status":"ok",
"code":200,
"messages":null,
"build":"1.0",
"parameters":{
"apiKey":"apiKey",
"id":null,
"offset":0,
"count":2,
"format":"json"
},
"view":{
"offset":0,
"count":2,
"total":20
},
"serverName":"tul1cstrcs1.corporate.local",
"startTime":"2013-02-20T02:21:29Z",
"endTime":"2013-02-20T02:21:29Z",
"duration":0,
"categories":[
{
"id":"1391948",
"name":"Action\/Adventure"
},
{
"id":"1391950",
"name":"Animated"
}
]
}
XML Response Example 1
- Here's the response to Request Example 3, which asks for the first two US TV categories.
- Requested with http://api.rovicorp.com/data/v1.1/descriptor/tvcategories?apikey=apikey&sig=sig&count=2&
format=xml.
<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.0</build>
<parameters>
<apiKey>apikey</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>tul1cstrcs1.corporate.local</serverName>
<startTime>2013-02-20T02:21:29Z</startTime>
<endTime>2013-02-20T02:21:29Z</endTime>
<duration>0</duration>
<categories>
<Category>
<id>1391948</id>
<name>Action/Adventure</name>
</Category>
<Category>
<id>1391950</id>
<name>Animated</name>
</Category>
</categories>
</TvCategories>
XML Response Example 2
- Here's the response to Request Example 4, which asks for the first two TV categories in French.
- Requested with http://api.rovicorp.com/data/v1.1/descriptor/tvcategories?apikey=apikey&sig=sig&count=2&
format=xml&language=fr.
<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.0</build>
<parameters>
<apiKey>apikey</apiKey>
<id i:nil="true" />
<offset>0</offset>
<count>2</count>
<format>xml</format>
<language>fr</language>
</parameters>
<view>
<offset>0</offset>
<count>2</count>
<total>20</total>
</view>
<serverName>tul1cstrcs1.corporate.local</serverName>
<startTime>2013-05-21T02:01:56Z</startTime>
<endTime>2013-05-21T02:01:56Z</endTime>
<duration>8778</duration>
<categories>
<Category>
<id>1391948</id>
<name>Action / Aventure</name>
</Category>
<Category>
<id>1391953</id>
<name>Affaires Et Finances</name>
</Category>
</categories>
</TvCategories>
See Also
-
↑ Top