Data/descriptor-api/v1.1/descriptor/genres

Jump to: navigation, search

Descriptor/Genres

Returns descriptions of the genres recognized by Rovi Music and Rovi DVDs, plus optional lists of subgenres and musical styles.

Syntax

descriptor/genres?apikey=apikey&sig=sig [&genreids=genreids] [&include=include] [&format=format] [&country=country] [&language=language]

Request Example 1

Request descriptions of all genres.

Request Example 2

Request a description of the movie genre Language & Literature, plus a list of its subgenres.

Request Example 3

Request a description of the Country music genre, plus a list of its subgenres and music styles, 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, 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.

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.
genreids No Specific genre IDs you want information about. Replace any spaces in an ID with plus (+) or percent20 (%20) symbols. To specify multiple IDs, use a comma-separated list like this: genreids=MA0000002467,D+++646,D+++647.

If not specified, information about all genres is returned.

include No Additional information you want to be included about each genre. The possible values are:
  • all
Includes the subgenres and music styles of the returned genres.
  • subgenres
Includes the subgenres of the returned genres.
For example, to include subgenres in the response, add include=subgenres.
language No Language of the response data. This request supports only en (English).

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.
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 Descriptor/Genres

ResponseTypeDescription
genres Genre [ ] Genre descriptions and, if requested, a list of the subgenres of each genre.

JSON Response Example

Here's the response to Request Example 2, which asks for a description of the movie genre Language & Literature, plus a list of its subgenres. 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/descriptor/genres?apikey=apikey&sig=sig&genreids=D++1660&
include=subgenres
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.7.2.5",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"D 1660",
      "include":"subgenres"
   },
   "view":{
      "total":1
   },
   "serverName":"tul1cssw4",
   "startTime":"2011-10-07T23:17:16.7234645Z",
   "endTime":"2011-10-07T23:17:16.8172139Z",
   "duration":93,
   "genres":[
      {
         "id":"D 1660",
         "name":"Language & Literature [nf]",
         "type":"Movie Genre",
         "description":"This genre is applied to titles that explore various aspects of written and spoken language and literature. Topics may include literary criticism, language origins, foreign language study, sign language, journalism, poetry, fiction writing, nonfiction writing, publishing, author biographies, and religious texts. Collections of speeches by prominent figures would also be included in this genre.",
         "subgenres":[
            {
               "id":"D 671",
               "name":"Biography [nf]",
               "type":"Movie SubGenre"
            },
            {
               "id":"D 2117",
               "name":"Journalism [nf]",
               "type":"Movie SubGenre"
            },
            {
               "id":"D 2118",
               "name":"Linguistics [nf]",
               "type":"Movie SubGenre"
            },
            {
               "id":"D 2119",
               "name":"Literary Studies [nf]",
               "type":"Movie SubGenre"
            },
            {
               "id":"D 1671",
               "name":"Tortured Genius",
               "type":"Movie SubGenre"
            },
            {
               "id":"D 1581",
               "name":"Writer's Life",
               "type":"Movie SubGenre"
            }
         ]
      }
   ]
}

XML Response Example

Here's the response to Request Example 3, which asks for a description of the Country music genre, plus a list of its subgenres and music styles, in an XML response. The response has been edited to reduce the length.
Requested with http://api.rovicorp.com/data/v1.1/descriptor/genres?apikey=apikey&sig=sig&
genreids=MA0000002532&include=all
.
<Genres 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>MA0000002532</id>
    <include>all</include>
    <format>xml</format>
  </parameters>
  <view>
    <total>1</total>
  </view>
  <serverName>tul1cssw4</serverName>
  <startTime>2011-10-07T23:16:35.2237301Z</startTime>
  <endTime>2011-10-07T23:16:35.2393550Z</endTime>
  <duration>15</duration>
  <genres>
    <Genre>
      <id>MA0000002532</id>
      <name>Country</name>
      <type>Music Genre</type>
      <description>Country music is about tradition, yet its simple form lends itself to endless variations on similar themes. Like blues -- the two genres often shared themes, melodies and songs -- country is a simple music at its core. Most of its songs are built around three chords and a plain melody, but these forms are so basic, they allow for many different styles, from the gritty sounds of honky tonk to the jazzy improvisations of Western Swing. Country music grew out of American Southern folk music, both Appalachian and blues, and old-time country was simple and folky, with just guitars and fiddles. As the genre progressed, old time music evolved into the rhythmic guitar-and-fiddle driven traditional country that became the foundation of modern country music, from honky tonk and Western Swing to the pop-oriented Countrypolitan and rock-inflected Bakersfield Sound.</description>
      <subgenres>
        <subgenre>
          <id>MA0000004415</id>
          <name>Americana</name>
          <type>Music SubGenre</type>
        </subgenre>
        <subgenre>
          <id>MA0000002443</id>
          <name>Bakersfield Sound</name>
          <type>Music SubGenre</type>
        </subgenre>
        <subgenre>
          <id>MA0000002466</id>
          <name>Bluegrass</name>
          <type>Music SubGenre</type>
          <styles>
            <style>
              <id>MA0000011818</id>
              <name>Contemporary Bluegrass</name>
              <type>Music Style</type>
            </style>
            <style>
              <id>MA0000012360</id>
              <name>Progressive Bluegrass</name>
              <type>Music Style</type>
            </style>
            <style>
              <id>MA0000011963</id>
              <name>Traditional Bluegrass</name>
              <type>Music Style</type>
            </style>
          </styles>
        </subgenre>
        <subgenre>
          <id>MA0000012138</id>
          <name>Close Harmony</name>
          <type>Music SubGenre</type>
        </subgenre>
    </Genre>
  </genres>
</Genres>


See Also

↑ Top

Personal tools