Data/video-api/v1.1/video/associatedalbums

Jump to: navigation, search

Video/AssociatedAlbums

Returns a list of albums associated with a movie, series, or program.

Note: Access to this data is governed by subscription level.

Syntax

video/associatedalbums? video=video
cosmoid=cosmoid
iguideid=iguideid
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language] [&localeresolution=localeresolution]

Request Example 1

Request albums associated with the The Simpsons television series.

Request Example 2

Request albums associated with the movie Voyage of Terror 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.

cosmoid Conditional Cosmo database ID for a movie, program, episode, or television series. Cosmo is a database of television information. You can grab Cosmo IDs from responses to the following requests:

Condition: The request must contain just one of these parameters:

  • video
  • cosmoid
  • iguideid
iguideid Conditional An ID for a television program used by the i‑Guide™ interactive digital cable TV program guide. You can get i‑Guide IDs from i‑Guide and from responses to the following requests:

Condition: The request must contain just one of these parameters:

  • video
  • cosmoid
  • iguideid
video Conditional Title of a movie, television program, or television series, or keywords from the title. This searches for the most popular title with that combination of words. Replace any spaces with plus (+) or percent20 (%20) symbols.

Note: This parameter currently returns only US-English results. Support for other countries and languages will be added in the future.

Condition: The request must contain just one of these parameters:

  • video
  • cosmoid
  • iguideid
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:

  • AR
Argentina
  • SV
El Salvador
  • NI
Nicaragua
  • AT
Austria
  • FI
Finland
  • NO
Norway
  • BE
Belgium
  • FR
France
  • PA
Panama
  • BM
Bermuda
  • DE
Germany
  • PE
Peru
  • BO
Bolivia
  • GT
Guatemala
  • PL
Poland
  • BR
Brazil
  • HN
Honduras
  • PT
Portugal
  • CA
Canada
  • IE
Ireland
  • ES
Spain
  • CL
Chile
  • IT
Italy
  • SE
Sweden
  • CO
Colombia
  • JM
Jamaica
  • CH
Switzerland
  • CR
Costa Rica
  • LU
Luxembourg 
  • GB
United Kingdom*
  • DK
Denmark
  • MX
Mexico
  • US
United States
  • DO
Dominican Republic 
  • NL
Netherlands
  • VE
Venezuela
  • EC
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 response data. Although this request currently returns only English responses, you can specify a preferred language to be ready for future language expansion. Valid language codes are:
  • da
Danish
  • fr
French
  • pt
Portuguese
  • nl
Dutch
  • de
German
  • es
Spanish
  • en
English
  • it
Italian
  • sv
Swedish
  • fi
Finnish
  • no
Norwegian    
  • fl
Flemish    
  • pl
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.

localeresolution No How the language fallback rules should be applied for any content that is not available for the specified language and country. The values are:
  • None
Return the content for the specified Cosmo ID.
  • Full
Fall back to the next available language per the fallback rules.
  • Exact   
If the program is available in the specified language, return content for that Cosmo ID instead, like Full. Otherwise, return the content for the specified Cosmo ID, like None.
  • Targeted
Fall back to the next available language per the fallback rules like Full, but override the IDs and masterTitle values like None.

Default is Full.

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 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.
parentIdsparentIdsAll of the IDs for the requested movie or program that are recognized by the Video Service.
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 Video/AssociatedAlbums

ResponseTypeDescription
associatedAlbums AssociatedAlbum [ ] Albums related to the movie or program specified in the request, listed in order of release year.

JSON Response Example

Here's the response to Request Example 1, which asks for albums associated with the The Simpsons television series. 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/video/associatedalbums?apikey=apikey&sig=sig&
cosmoid=7903
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.7.0.1",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"7903",
   },
   "view"{
      "total":4
   },
   "serverName":"tul1cstw1",
   "startTime":"2011-08-16T00:02:48.6867357Z",
   "endTime":"2011-08-16T00:02:48.7023607Z",
   "duration":15,
   "parentIds":{
      "cosmoId":"7903"
   },
   "associatedAlbums":[
      {
         "albumId":"MW0000248395",
         "albumName":"Songs in the Key of Springfield"
      },
      {
         "albumId":"MW0000248575",
         "albumName":"Go Simpsonic with the Simpsons"
      },
      {
         "albumId":"MW0000482835",
         "albumName":"The Simpsons: Testify"
      },
      {
         "albumId":"MW0001164608",
         "albumName":"The Simpsons: Testify - A Whole Lot More Original Music From The Television Series"
      }        
   ]  
}

XML Response Example

Here's the response to Request Example 2, which asks for albums associated with the movie Voyage of Terror in an XML response.
Requested with http://api.rovicorp.com/data/v1.1/video/associatedalbums?apikey=apikey&sig=sig&
cosmoid=1240767&format=xml
.
<VideoAssociatedAlbums 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.0.1</build>
  <parameters>
    <apiKey>4p1k3y</apiKey>
    <id>1240767</id>
    <format>xml</format>
  </parameters>
  <view>
    <total>1</total>
  </view>
  <serverName>tul1cstw3</serverName>
  <startTime>2011-08-15T23:59:01.1605035Z</startTime>
  <endTime>2011-08-15T23:59:01.1761285Z</endTime>
  <duration>15</duration>
  <parentIds>
    <cosmoId>1240767</cosmoId>
  </parentIds>
  <associatedAlbums>
    <Album>
      <albumId>MW0000082179</albumId>
      <albumName>Voyage of Terror</albumName>
    </Album>
  </associatedAlbums>
</VideoAssociatedAlbums>


See Also

↑ Top

 
Personal tools