Data/video-api/v1.1/design-your-app

Jump to: navigation, search

Designing Your Video Data Application

You have a vision for your app. Here's what you need to know to make your vision a reality.

Your Home Page

The entry to your Rovi Video app can begin in several ways:
  1. A presentation of featured content from your catalog of movies and TV series. You can get Rovi IDs for your catalog with Rovi Catalog Matching.
  2. A text search for a movie, TV program, or person working in movies or TV:
  3. A search on a field-level characteristic that applies to movies or television:

Roadmap to Rovi Video IDs

In the data returned by most API responses will be IDs of people, movies, and TV programs that you can use as links to additional API requests.
To feature people named in Rovi Video responses, grab IDs from the following requests and provide links to Name API requests:
To feature movies and TV shows, grab Cosmo IDs from the following responses and provide links to Video API requests:
Here's a roadmap to building pages from the Rovi IDs returned in responses:


The Top-Level Requests: The Info Requests

Rovi Video provides three top-level requests:
As shown below in the sample Info response, these Info requests return not only core information, they also return preformatted requests for subsidiary information. And they can also return that subsidiary information. Rovi Video gives you the flexibility to get a group of related information with a single Info request or to get just subsidiary information with subsidiary requests.
If you also use Rovi Search or Rovi Recommendations, you'll notice that those requests also return Info responses.
Here are some design considerations when using the Info requests:
  • An Info response tells you what subsidiary data is available: if a review or biography is not available, for example, the response will not include the preformatted request for the review or biography. This feature allows your application the following program control options when parsing an Info response:
    • Grab an available request and offer the data as a link.
    • Grab an available request, execute it, and present the data.
    • If a request is unavailable, execute an alternative request.
  • You don't have to make separate requests for subsidiary information. An Info response can include subsidiary information in the response. You can, for example, include a review in an Info response by specifying that as part of the Info request. Use this feature in the following cases:
    • To build a page around data and subsidiary data you already know is available.
    • To present whatever data is available using appropriate program controls. Note: some subsidiary requests return huge amounts of data. For these requests, it's better to make a separate call so you can specify parameters that paginate the response data.
A Sample Info Response
Here's a response to a Name/Info request for Conan O'Brien. Note the data returned for the subsidiary requests web and themes.
http://api.rovicorp.com/data/v1.1/name/info?apikey=apikey&sig=sig&cosmoid=100728&format=json&
include=web,themes
.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"1.0",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"100728",
      "include":"web,themes",
      "format":"json"
   },
   "serverName":"tul1cssrcs1.corporate.local",
   "startTime":"2012-09-17T18:47:18Z",
   "endTime":"2012-09-17T18:47:19Z",
   "duration":107,
   "name":{
      "ids":{
         "amgClassicalId":"Q 1193114",
         "amgMovieId":"P276931",
         "amgPopId":"P 526627",
         "cosmoId":"100728",
         "nameId":"MN0001306887"
      },
      "name":"Conan O'Brien",
      "isGroup":false,
      "primaryMedia":"Movies",
      "musicGenres":[
         {
            "id":"MA0000004433",
            "name":"Comedy/Spoken",
            "weight":10
         }
      ],
      "movieGenres":[
         {
            "id":"D 648",
            "name":"Comedy",
            "weight":99
         }
      ],
      "active":[
         "1990s",
         "2000s",
         "2010s"
      ],
      "birth":{
         "date":"1963-04-18",
         "place":"Brookline, MA"
      },
      "death":{
         "date":"",
         "place":""
      },
      "country":"United States",
      "period":"1993-2011",
      "headlineBio":"",
      "classicalBio":null,
      "classicalBioUri":null,
      "discography":null,
      "discographyUri":"http://api.rovicorp.com/data/v1.1/name/discography?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "filmography":null,
      "filmographyUri":"http://api.rovicorp.com/data/v1.1/name/filmography?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "followers":null,
      "followersUri":null,
      "groupMembers":null,
      "groupMembersUri":null,
      "memberOf":null,
      "memberOfUri":null,
      "images":null,
      "imagesUri":"http://api.rovicorp.com/data/v1.1/name/images?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "influencers":null,
      "influencersUri":null,
      "similars":null,
      "similarsUri":"http://api.rovicorp.com/data/v1.1/name/similars?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "moods":null,
      "moodsUri":"http://api.rovicorp.com/data/v1.1/name/moods?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "movieBio":null,
      "movieBioUri":"http://api.rovicorp.com/data/v1.1/name/movieBio?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "musicBio":null,
      "musicBioUri":"http://api.rovicorp.com/data/v1.1/name/musicBio?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "musicCredits":null,
      "musicCreditsUri":"http://api.rovicorp.com/data/v1.1/name/musicCredits?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "songs":null,
      "songsUri":"http://api.rovicorp.com/v1.1/data/name/songs?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "musicStyles":null,
      "musicStylesUri":"http://api.rovicorp.com/data/v1.1/name/musicStyles?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "themes":[
         {
            "id":"MA0000006282",
            "name":"Good Times",
            "weight":9
         },
         {
            "id":"MA0000006321",
            "name":"Late Night",
            "weight":9
         },
         {
            "id":"MA0000006333",
            "name":"Small Gathering",
            "weight":9
         },
         {
            "id":"MA0000005123",
            "name":"World View",
            "weight":9
         }
      ],
      "themesUri":"http://api.rovicorp.com/data/v1.1/name/themes?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "videos":null,
      "videosUri":null,
      "movieStyles":null,
      "movieStylesUri":"http://api.rovicorp.com/data/v1.1/name/movieStyles?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "contemporaries":null,
      "contemporariesUri":null,
      "associatedWith":null,
      "associatedWithUri":null,
      "collaboratorWith":null,
      "collaboratorWithUri":null,
      "compositions":null,
      "compositionsUri":null,
      "aliases":null,
      "aliasesUri":"http://api.rovicorp.com/data/v1.1/name/aliases?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "web":{
         "twitter":[
            {
               "sn":"ConanOBrien",
               "n":"Conan O'Brien",
               "bio":"The voice of the people. Sorry, people.",
               "url":"http://teamcoco.com"
            }
         ]
      },
      "webUri":"http://api.rovicorp.com/data/v1.1/name/web?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "factsheets":null,
      "factsheetsUri":"http://api.rovicorp.com/data/v1.1/name/factsheets?format=json&apikey=4p1k3y&amgmovieid=P276931",
      "schedule":null,
      "scheduleUri":null,
      "credits":null,
      "creditsUri":"http://api.rovicorp.com/data/v1.1/name/credits?format=json&apikey=4p1k3y&amgmovieid=P276931"
   }
}

Page Control: Offset and Count

Some requests return enormous amounts of information. Name/Filmography, a subsidiary request, returns over 175 items for Steven Spielberg.
To control the amount of data you receive in a response, subsidiary requests that return lists of data offer the parameters offset and count to set the starting point and number of items to return. Use these parameters in combination with page forward and page reverse controls.

So How Do I Start?

Let's start with that vision of yours. Here are some ideas for creating compelling content on any page, including a home page:

Present a Search Box

  • To return search results as the user types, call SingleStageSearch.
  • To have the user enter the full search query, call one of the following:
  • Consider allowing the user to select the entitytype they are searching for—credit, movie, TV series, or one-time-only (program).
  • Present a page based on the user's selection.
  • Use the IDs in responses to build out your pages, adding links to other pages as shown above in Roadmap to Rovi Video IDs.

Feature a TV Series

For a TV series, show all of the episodes of every season.
  1. Grab the Cosmo ID of the series from a response that returns Cosmo IDs:
  1. Call Video/Info with the include parameter values that return the data you want to present:
  1. From the response, grab and use the data you want.
  2. To present complete season information, provide links to the following requests with include=all parameters:
  1. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Video IDs.

Feature a Movie

  1. Grab the Cosmo ID of the movie from a response that returns Cosmo IDs:
  1. Call Video/Info with the include parameter values that return the data you want to present:
  1. From the response, grab and use the data you want.
  2. Call Similar to add recommendations of similar shows.
  3. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Video IDs.

Feature a Person in Movies or Television

  1. Grab the ID of the person from a response that returns name IDs. For a complete list of requests that return name IDs, click here.
  2. Call Name/Info with the include parameter values that return the data you want to present. Note: these values may return large amounts of data. To control the amount of data returned, make separate requests instead using the offset and count parameters.
  1. From the response, grab and use the data you want.
  2. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Video IDs.


 
Personal tools