V1.MetaData.MusicService.Descriptor:Genres

Jump to: navigation, search

Descriptor/Genres

Returns descriptions of genres used in Rovi Cloud Services, plus optional lists of subgenres and musical styles.

Syntax

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

Request Example 1

Request descriptions of all genres.

Request Example 2

Request a description of the blues genre.

Request Example 3

Request a description of the blues genre plus a list of subgenres.

Request Example 4

Request a description of the blues genre plus a list of subgenres and music styles.

Request Parameters

ParameterRequiredDescription
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.

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.
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.
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/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. It is formatted with extra spaces and carriage returns to make it easy to read.
{
  "status":"ok",
  "code":200,
  "messages":null,
  "build":"1.5.1.9",
  "parameters":{
    "apiKey":"apikey",
    "id":"MA0000002467"
  },
  "view":{
    "total":1
  },
  "serverName":"tul1cssw4",
  "startTime":"2011-04-28T23:29:18.1505815Z",
  "endTime":"2011-04-28T23:29:18.1505815Z",
  "duration":0,
  "genres":[
    {
      "id":"MA0000002467",
      "name":"Blues",
      "type":"Music Genre",
      "description":"Blues is about tradition and personal expression. At its core, the blues has remained the same since its inception. Most blues feature simple, usually three-chord, progressions and have simple structures that are open to endless improvisations, both lyrical and musical. The blues grew out of African spirituals and worksongs. In the late 1800s, southern African-Americans passed the songs down orally, and they collided with American folk and country from the Appalachians. New hybrids appeared by each region, but all of the recorded blues from the early 1900s are distinguished by simple, rural acoustic guitars and pianos. After World War II, the blues began to fragment, with some musicians holding on to acoustic traditions and others taking it to jazzier territory. However, most bluesmen followed [roviLink=\"MN\"]Muddy Waters[\/roviLink]' lead and played the blues on electric instruments. From that point on, the blues continued to develop in new directions -- particularly on electric instruments -- or it has been preserved as an acoustic tradition."
    }
  ]
}

XML Response Example

Here's an XML response to Request Example 2.
<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.5.1.9</build>
  <parameters>
    <apiKey>apikey</apiKey>
    <id>MA0000002467</id>
    <format>xml</format>
  </parameters>
  <view>
    <total>1</total>
  </view>
  <serverName>tul1cssw1</serverName>
  <startTime>2011-04-28T23:29:04.6911631Z</startTime>
  <endTime>2011-04-28T23:29:04.6911631Z</endTime>
  <duration>0</duration>
  <genres>
    <Genre>
      <id>MA0000002467</id>
      <name>Blues</name>
      <type>Music Genre</type>
      <description>Blues is about tradition and personal expression. At its core, the blues has remained the same since its inception. Most blues feature simple, usually three-chord, progressions and have simple structures that are open to endless improvisations, both lyrical and musical. The blues grew out of African spirituals and worksongs. In the late 1800s, southern African-Americans passed the songs down orally, and they collided with American folk and country from the Appalachians. New hybrids appeared by each region, but all of the recorded blues from the early 1900s are distinguished by simple, rural acoustic guitars and pianos. After World War II, the blues began to fragment, with some musicians holding on to acoustic traditions and others taking it to jazzier territory. However, most bluesmen followed [roviLink=&quot;MN&quot;]Muddy Waters[/roviLink]&apos; lead and played the blues on electric instruments. From that point on, the blues continued to develop in new directions -- particularly on electric instruments -- or it has been preserved as an acoustic tradition.</description>
    </Genre>
  </genres>
</Genres>


See Also

↑ Top

Personal tools