V9.RichMediaService:GetMediaExamples

Jump to: navigation, search

GetMedia Request Examples

Here are some examples that show how you can use GetMedia.

« GetMedia

Request Example 1

Get images of Mark Harmon and Pauley Perrette together. For this request, return the first 3 of 136 images titled "Mark Harmon and Pauley Perrette." To return another 70 images, a second request should ask for "Pauley Perrette and Mark Harmon."

  • In the two CreditId elements, specify the IDs for Mark Harmon and Pauley Perrette in Id elements.
  • Specify 2 in the two ProviderId elements.
  • Specify "Mark Harmon and Pauley Perrette" in the ImageCaption element.
  • Specify 3 in the PageSize element to return 3 images.
  • Specify 0 in the StartIndex element to start with the first image.
  • Specify a number in the TotalRows element to return the total number of images available.
  • Specify en-US in the Locale element.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://api.rovicorp.com/v9/common/types" xmlns:ric="http://api.rovicorp.com/v9/richMediaService">
   <soapenv:Header>
      <typ:AuthHeader>
         <typ:UserName>username</typ:UserName>
         <typ:Password>password</typ:Password>
      </typ:AuthHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ric:GetMedia>
         <ric:request>
            <ric:ImageItems>
               <ric:ImageItem>
                  <ric:CreditId>
                     <ric:Id>100857</ric:Id>
                     <ric:ProviderId>2</ric:ProviderId>
                  </ric:CreditId>
               </ric:ImageItem>
               <ric:ImageItem>
                  <ric:CreditId>
                     <ric:Id>101057</ric:Id>
                     <ric:ProviderId>2</ric:ProviderId>
                  </ric:CreditId>
               </ric:ImageItem>
            </ric:ImageItems>
            <ric:Image>
               <ric:ImageCaption>Mark Harmon and Pauley Perrette</ric:ImageCaption>
            </ric:Image>
            <ric:Page>
               <ric:PageSize>3</ric:PageSize>
               <ric:StartIndex>0</ric:StartIndex>
               <ric:TotalRows>0</ric:TotalRows>
            </ric:Page>
            <ric:Locale>en-US</ric:Locale>
         </ric:request>
      </ric:GetMedia>
   </soapenv:Body>
</soapenv:Envelope>

Here's the response to this request.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMediaResponse xmlns="http://services.macrovision.com/v9/richMediaService">
         <GetMediaResult>
            <RequestId xmlns="http://services.macrovision.com/v9/common/types">f498b36d-9167-49f4-800a-c17a77af7807</RequestId>
            <ClientBatchId xmlns="http://services.macrovision.com/v9/common/types">gero et</ClientBatchId>
            <TimeStamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T01:38:36.105Z</TimeStamp>
            <Status xmlns="http://services.macrovision.com/v9/common/types">PNE</Status>
            <Errors xmlns="http://services.macrovision.com/v9/common/types"/>
            <EndTimestamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T01:38:36.199Z</EndTimestamp>
            <Build xmlns="http://services.macrovision.com/v9/common/types">CPS Phase v9 Build 9.9.3.1</Build>
            <Images>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>427547</ImageId>
                  <ImageTitle>NCIS</ImageTitle>
                  <ImageCaption>Mark Harmon and Pauley Perrette</ImageCaption>
                  <ObjectId>100857</ObjectId>
                  <ObjectType>Credit</ObjectType>
                  <ObjectName>Mark Harmon;Actor; Voice-overs; Director</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>Cliff Lipson/CBS</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight>1.67</ImageCastWeight>
                  <ImageZoomLevel>2</ImageZoomLevel>
                  <ImageHeadcount>2</ImageHeadcount>
                  <ImageType>Program: Key</ImageType>
                  <ImageFormat xsi:nil="true"/>
                  <ImageHorizontalResolution>500</ImageHorizontalResolution>
                  <ImageVerticalResolution>372</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2009-04-20T14:38:01.43Z</LastUpdate>
                  <ImageFormatId>0</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>4:3</AspectRatio>
                  <ImageOwner>Cliff Lipson/CBS</ImageOwner>
                  <ParentImageId>16818179</ParentImageId>
                  <ProgramTitle>NCIS</ProgramTitle>
                  <MaxImageScale>100</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>427548</ImageId>
                  <ImageTitle>NCIS</ImageTitle>
                  <ImageCaption>Mark Harmon and Pauley Perrette</ImageCaption>
                  <ObjectId>100857</ObjectId>
                  <ObjectType>Credit</ObjectType>
                  <ObjectName>Mark Harmon;Actor; Voice-overs; Director</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>Cliff Lipson/CBS</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight>1.67</ImageCastWeight>
                  <ImageZoomLevel>2</ImageZoomLevel>
                  <ImageHeadcount>2</ImageHeadcount>
                  <ImageType>Program: Key</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>500</ImageHorizontalResolution>
                  <ImageVerticalResolution>372</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2009-04-20T14:38:01.43Z</LastUpdate>
                  <ImageFormatId>16</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>4:3</AspectRatio>
                  <ImageOwner>Cliff Lipson/CBS</ImageOwner>
                  <ParentImageId>16818179</ParentImageId>
                  <ProgramTitle>NCIS</ProgramTitle>
                  <MaxImageScale>100</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>427549</ImageId>
                  <ImageTitle>NCIS</ImageTitle>
                  <ImageCaption>Mark Harmon and Pauley Perrette</ImageCaption>
                  <ObjectId>100857</ObjectId>
                  <ObjectType>Credit</ObjectType>
                  <ObjectName>Mark Harmon;Actor; Voice-overs; Director</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>Cliff Lipson/CBS</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight>1.67</ImageCastWeight>
                  <ImageZoomLevel>2</ImageZoomLevel>
                  <ImageHeadcount>2</ImageHeadcount>
                  <ImageType>Program: Key</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>172</ImageHorizontalResolution>
                  <ImageVerticalResolution>127</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2009-04-20T14:38:01.43Z</LastUpdate>
                  <ImageFormatId>1</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>4:3</AspectRatio>
                  <ImageOwner>Cliff Lipson/CBS</ImageOwner>
                  <ParentImageId>16818179</ParentImageId>
                  <ProgramTitle>NCIS</ProgramTitle>
                  <MaxImageScale>34.4</MaxImageScale>
               </Image>
            </Images>
            <Page>
               <PageSize>3</PageSize>
               <StartIndex>0</StartIndex>
               <TotalRows>166</TotalRows>
            </Page>
         </GetMediaResult>
      </GetMediaResponse>
   </soap:Body>
</soap:Envelope>

Request Example 2

Request images of just Mark Harmon. Because there are over 700, specify the format IDs of the images I want to avoid duplicates at other sizes.
  • In a CreditId element, specify the ID for Mark Harmon in an Id element.
  • Specify 2 in the ProviderId element.
  • Specify 1 in the Image, ImageHeadcount element to include just images of one person.
  • Specify 44 in the Image, ImageFormatId element to return images that fit in a bounding box of 250 x 250 pixels in one or both dimensions.
  • Specify additional image format IDs in the ImageFormatIds element to also include other image sizes.
  • Specify en-US in the Locale element.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://api.rovicorp.com/v9/common/types" xmlns:ric="http://api.rovicorp.com/v9/richMediaService">
   <soapenv:Header>
      <typ:AuthHeader>
         <typ:UserName>username</typ:UserName>
         <typ:Password>password</typ:Password>
      </typ:AuthHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ric:GetMedia>
         <ric:request>
            <ric:ImageItems>
               <ric:ImageItem>
                  <ric:CreditId>
                     <ric:Id>100857</ric:Id>
                     <ric:ProviderId>2</ric:ProviderId>
                  </ric:CreditId>
               </ric:ImageItem>
            </ric:ImageItems>
            <ric:Image>
               <ric:ImageHeadcount>1</ric:ImageHeadcount>
               <ric:ImageFormatId>44</ric:ImageFormatId>
            </ric:Image>
            <ric:Locale>en-US</ric:Locale>
            <ric:ImageFormatIds>
               <int>16</int>
               <int>36</int>
               <int>57</int>
            </ric:ImageFormatIds>
         </ric:request>
      </ric:GetMedia>
   </soapenv:Body>
</soapenv:Envelope>

Here's the response to this request, but to reduce the length just the first 3 of the 100 Image elements are shown.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMediaResponse xmlns="http://services.macrovision.com/v9/richMediaService">
         <GetMediaResult>
            <RequestId xmlns="http://services.macrovision.com/v9/common/types">222f2e03-2a82-4071-b55c-5b0b0ca6854f</RequestId>
            <ClientBatchId xmlns="http://services.macrovision.com/v9/common/types">gero et</ClientBatchId>
            <TimeStamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T01:48:34.763Z</TimeStamp>
            <Status xmlns="http://services.macrovision.com/v9/common/types">PNE</Status>
            <Errors xmlns="http://services.macrovision.com/v9/common/types"/>
            <EndTimestamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T01:48:34.81Z</EndTimestamp>
            <Build xmlns="http://services.macrovision.com/v9/common/types">CPS Phase v9 Build 9.9.3.1</Build>
            <Images>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>805764</ImageId>
                  <ImageTitle>Mark Harmon</ImageTitle>
                  <ImageCaption>PARK CITY, UT - JANUARY 17: Actor Mark Harmon of the film 'Weather Girl' poses for a portrait at the Film Lounge Media Center during the 2009 Sundance Film Festival on January 17, 2009 in Park City, Utah.</ImageCaption>
                  <ObjectId>100857</ObjectId>
                  <ObjectType>Credit</ObjectType>
                  <ObjectName>Mark Harmon;Actor; Voice-overs; Director</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>Matt Carr/Getty Images Entertainment/Getty Images</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>1</ImageZoomLevel>
                  <ImageHeadcount>1</ImageHeadcount>
                  <ImageType>Celebrity</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>366</ImageHorizontalResolution>
                  <ImageVerticalResolution>500</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2010-03-10T11:11:13.38Z</LastUpdate>
                  <ImageFormatId>16</ImageFormatId>
                  <Orientation>Portrait</Orientation>
                  <AspectRatio>3:4</AspectRatio>
                  <ParentImageId>16844147</ParentImageId>
                  <ProgramTitle>Mark Harmon</ProgramTitle>
                  <MaxImageScale>16.67</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>852915</ImageId>
                  <ImageTitle>Mark Harmon</ImageTitle>
                  <ImageCaption>PARK CITY, UT - JANUARY 17: Actor Mark Harmon of the film 'Weather Girl' poses for a portrait at the Film Lounge Media Center during the 2009 Sundance Film Festival on January 17, 2009 in Park City, Utah.</ImageCaption>
                  <ObjectId>100857</ObjectId>
                  <ObjectType>Credit</ObjectType>
                  <ObjectName>Mark Harmon;Actor; Voice-overs; Director</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>Matt Carr/Getty Images Entertainment/Getty Images</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>1</ImageZoomLevel>
                  <ImageHeadcount>1</ImageHeadcount>
                  <ImageType>Celebrity</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>102</ImageHorizontalResolution>
                  <ImageVerticalResolution>140</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2010-03-10T11:11:13.38Z</LastUpdate>
                  <ImageFormatId>36</ImageFormatId>
                  <Orientation>Portrait</Orientation>
                  <AspectRatio>3:4</AspectRatio>
                  <ParentImageId>16844147</ParentImageId>
                  <ProgramTitle>Mark Harmon</ProgramTitle>
                  <MaxImageScale>4.64</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>1229143</ImageId>
                  <ImageTitle>Mark Harmon</ImageTitle>
                  <ImageCaption>PARK CITY, UT - JANUARY 17: Actor Mark Harmon of the film 'Weather Girl' poses for a portrait at the Film Lounge Media Center during the 2009 Sundance Film Festival on January 17, 2009 in Park City, Utah.</ImageCaption>
                  <ObjectId>100857</ObjectId>
                  <ObjectType>Credit</ObjectType>
                  <ObjectName>Mark Harmon;Actor; Voice-overs; Director</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>Matt Carr/Getty Images Entertainment/Getty Images</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>1</ImageZoomLevel>
                  <ImageHeadcount>1</ImageHeadcount>
                  <ImageType>Celebrity</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>183</ImageHorizontalResolution>
                  <ImageVerticalResolution>250</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2010-03-10T11:11:13.38Z</LastUpdate>
                  <ImageFormatId>44</ImageFormatId>
                  <Orientation>Portrait</Orientation>
                  <AspectRatio>3:4</AspectRatio>
                  <ParentImageId>16844147</ParentImageId>
                  <ProgramTitle>Mark Harmon</ProgramTitle>
                  <MaxImageScale>8.33</MaxImageScale>
               </Image>
            </Images>
            <Page>
               <PageSize>100</PageSize>
               <StartIndex>0</StartIndex>
               <TotalRows>100</TotalRows>
            </Page>
         </GetMediaResult>
      </GetMediaResponse>
   </soap:Body>
</soap:Envelope>

Request Example 3

Since I like one image, request all of the available sizes and formats of that image so I can choose the one I want.
  • In an ImageItem element, specify the parent image ID of the image in the ParentImageId element. Note: Another way to state this request is to specify the credit ID for the person in the ImageItem element and the ParentImageId element in the Image element.
  • Specify en-US in the Locale element.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://api.rovicorp.com/v9/common/types" xmlns:ric="http://api.rovicorp.com/v9/richMediaService">
   <soapenv:Header>
      <typ:AuthHeader>
         <typ:UserName>username</typ:UserName>
         <typ:Password>password</typ:Password>
      </typ:AuthHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ric:GetMedia>
         <ric:request>
            <ric:ImageItems>
               <ric:ImageItem>
                  <ric:ParentImageId>16911657</ric:ParentImageId>
               </ric:ImageItem>
            </ric:ImageItems>
            <ric:Locale>en-US</ric:Locale>
         </ric:request>
      </ric:GetMedia>
   </soapenv:Body>
</soapenv:Envelope>

Here's the response to this request, but to reduce the length just the first 3 of the 43 Image elements are shown.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMediaResponse xmlns="http://services.macrovision.com/v9/richMediaService">
         <GetMediaResult>
            <RequestId xmlns="http://services.macrovision.com/v9/common/types">09150124-bc57-43ef-af4b-a38e947e57b7</RequestId>
            <ClientBatchId xmlns="http://services.macrovision.com/v9/common/types">gero et</ClientBatchId>
            <TimeStamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T02:03:22.768Z</TimeStamp>
            <Status xmlns="http://services.macrovision.com/v9/common/types">PNE</Status>
            <Errors xmlns="http://services.macrovision.com/v9/common/types"/>
            <EndTimestamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T02:03:22.784Z</EndTimestamp>
            <Build xmlns="http://services.macrovision.com/v9/common/types">CPS Phase v9 Build 9.9.3.1</Build>
            <Images>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>4696164</ImageId>
                  <ImageTitle>Dillinger</ImageTitle>
                  <ImageCaption>Mark Harmon</ImageCaption>
                  <ObjectType xsi:nil="true"/>
                  <Relevancy xsi:nil="true"/>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight>1</ImageCastWeight>
                  <ImageZoomLevel>3</ImageZoomLevel>
                  <ImageHeadcount>1</ImageHeadcount>
                  <ImageType>Program: Key</ImageType>
                  <ImageFormat xsi:nil="true"/>
                  <ImageHorizontalResolution>1620</ImageHorizontalResolution>
                  <ImageVerticalResolution>2160</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2011-04-25T10:10:29.59Z</LastUpdate>
                  <ImageFormatId>0</ImageFormatId>
                  <Orientation>Portrait</Orientation>
                  <AspectRatio>3:4</AspectRatio>
                  <ParentImageId>16911657</ParentImageId>
                  <MaxImageScale>100</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>4696241</ImageId>
                  <ImageTitle>Dillinger</ImageTitle>
                  <ImageCaption>Mark Harmon</ImageCaption>
                  <ObjectType xsi:nil="true"/>
                  <Relevancy xsi:nil="true"/>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight>1</ImageCastWeight>
                  <ImageZoomLevel>3</ImageZoomLevel>
                  <ImageHeadcount>1</ImageHeadcount>
                  <ImageType>Program: Key</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>105</ImageHorizontalResolution>
                  <ImageVerticalResolution>140</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2011-04-25T10:10:29.59Z</LastUpdate>
                  <ImageFormatId>36</ImageFormatId>
                  <Orientation>Portrait</Orientation>
                  <AspectRatio>3:4</AspectRatio>
                  <ParentImageId>16911657</ParentImageId>
                  <MaxImageScale>6.48</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>4696242</ImageId>
                  <ImageTitle>Dillinger</ImageTitle>
                  <ImageCaption>Mark Harmon</ImageCaption>
                  <ObjectType xsi:nil="true"/>
                  <Relevancy xsi:nil="true"/>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight>1</ImageCastWeight>
                  <ImageZoomLevel>3</ImageZoomLevel>
                  <ImageHeadcount>1</ImageHeadcount>
                  <ImageType>Program: Key</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>45</ImageHorizontalResolution>
                  <ImageVerticalResolution>60</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2011-04-25T10:10:29.59Z</LastUpdate>
                  <ImageFormatId>38</ImageFormatId>
                  <Orientation>Portrait</Orientation>
                  <AspectRatio>3:4</AspectRatio>
                  <ParentImageId>16911657</ParentImageId>
                  <MaxImageScale>2.78</MaxImageScale>
               </Image>
            </Images>
            <Page>
               <PageSize>43</PageSize>
               <StartIndex>0</StartIndex>
               <TotalRows>43</TotalRows>
            </Page>
         </GetMediaResult>
      </GetMediaResponse>
   </soap:Body>
</soap:Envelope>

Request Example 4

Request group images of the characters in the Simpsons in JPG format. For this request, ask for just the first three images.
  • In an ImageItem element, specify the program ID in the Id element.
  • Specify 2 in the ProviderId element.
  • Specify Group in the ImageType element.
  • Specify jpg in the ImageFormat element.
  • Specify 3 in the PageSize element to return 3 images.
  • Specify 0 in the StartIndex element to start with the first image.
  • Specify a number in the TotalRows element to return the total number of images available.
  • Specify en-US in the Locale element.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://api.rovicorp.com/v9/common/types" xmlns:ric="http://api.rovicorp.com/v9/richMediaService">
   <soapenv:Header>
      <typ:AuthHeader>
         <typ:UserName>username</typ:UserName>
         <typ:Password>password</typ:Password>
      </typ:AuthHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ric:GetMedia>
         <ric:request>
            <ric:ImageItems>
               <ric:ImageItem>
                  <ric:ProgramId>
                     <ric:Id>15782572</ric:Id>
                     <ric:ProviderId>2</ric:ProviderId>
                  </ric:ProgramId>
               </ric:ImageItem>
            </ric:ImageItems>
            <ric:Image>
               <ric:ImageType>Group</ric:ImageType>
               <ric:ImageFormat>jpg</ric:ImageFormat>
            </ric:Image>
            <ric:Page>
               <ric:PageSize>3</ric:PageSize>
               <ric:StartIndex>0</ric:StartIndex>
               <ric:TotalRows>0</ric:TotalRows>
            </ric:Page>
            <ric:Locale>en-US</ric:Locale>
         </ric:request>
      </ric:GetMedia>
   </soapenv:Body>
</soapenv:Envelope>

Here's the response to this request.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMediaResponse xmlns="http://services.macrovision.com/v9/richMediaService">
         <GetMediaResult>
            <RequestId xmlns="http://services.macrovision.com/v9/common/types">86d9f49e-46a0-4f68-afd1-a103f90683f9</RequestId>
            <ClientBatchId xmlns="http://services.macrovision.com/v9/common/types">gero et</ClientBatchId>
            <TimeStamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T02:19:42.713Z</TimeStamp>
            <Status xmlns="http://services.macrovision.com/v9/common/types">PNE</Status>
            <Errors xmlns="http://services.macrovision.com/v9/common/types"/>
            <EndTimestamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T02:19:42.76Z</EndTimestamp>
            <Build xmlns="http://services.macrovision.com/v9/common/types">CPS Phase v9 Build 9.9.3.1</Build>
            <Images>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>69891</ImageId>
                  <ImageTitle>The Simpsons</ImageTitle>
                  <ImageCaption>Bart, Homer, Marge, Lisa and Maggie</ImageCaption>
                  <ObjectId>15782572</ObjectId>
                  <ObjectType>Program</ObjectType>
                  <ObjectName>Simpsons</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>FOX</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>3</ImageZoomLevel>
                  <ImageHeadcount>5</ImageHeadcount>
                  <ImageType>Group</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>500</ImageHorizontalResolution>
                  <ImageVerticalResolution>326</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2010-06-09T15:58:18.467Z</LastUpdate>
                  <ImageFormatId>16</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>3:2</AspectRatio>
                  <ImageOwner>FOX</ImageOwner>
                  <ParentImageId>16777591</ParentImageId>
                  <MaxImageScale>22.94</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>274615</ImageId>
                  <ImageTitle>The Simpsons</ImageTitle>
                  <ImageCaption>Bart, Homer, Marge, Lisa and Maggie</ImageCaption>
                  <ObjectId>15782572</ObjectId>
                  <ObjectType>Program</ObjectType>
                  <ObjectName>Simpsons</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>FOX</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>3</ImageZoomLevel>
                  <ImageHeadcount>5</ImageHeadcount>
                  <ImageType>Group</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>172</ImageHorizontalResolution>
                  <ImageVerticalResolution>112</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2010-06-09T15:58:18.467Z</LastUpdate>
                  <ImageFormatId>1</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>3:2</AspectRatio>
                  <ImageOwner>FOX</ImageOwner>
                  <ParentImageId>16777591</ParentImageId>
                  <MaxImageScale>7.89</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>845733</ImageId>
                  <ImageTitle>The Simpsons</ImageTitle>
                  <ImageCaption>Bart, Homer, Marge, Lisa and Maggie</ImageCaption>
                  <ObjectId>15782572</ObjectId>
                  <ObjectType>Program</ObjectType>
                  <ObjectName>Simpsons</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCredit>FOX</ImageCredit>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>3</ImageZoomLevel>
                  <ImageHeadcount>5</ImageHeadcount>
                  <ImageType>Group</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>140</ImageHorizontalResolution>
                  <ImageVerticalResolution>91</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2010-06-09T15:58:18.467Z</LastUpdate>
                  <ImageFormatId>36</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>3:2</AspectRatio>
                  <ImageOwner>FOX</ImageOwner>
                  <ParentImageId>16777591</ParentImageId>
                  <MaxImageScale>6.42</MaxImageScale>
               </Image>
            </Images>
            <VideoClips>
               <VideoClip VideoTitle="SIMPSONS 2000" VideoURL="http://actual-url-concealed.com" VideoType="Trailer" MaximumBitRate="750 kbps" EncodingType="MPEG4">
                  <VideoHandle>
                     <Id>293628</Id>
                     <ProviderId>6</ProviderId>
                  </VideoHandle>
                  <BitRateStartTime xsi:nil="true"/>
                  <BitRateEndTime xsi:nil="true"/>
               </VideoClip>
               <VideoClip VideoTitle="SIMPSONS 2000" VideoURL="http://actual-url-concealed.com" VideoType="Trailer" MaximumBitRate="750 kbps" EncodingType="WMV">
                  <VideoHandle>
                     <Id>293627</Id>
                     <ProviderId>6</ProviderId>
                  </VideoHandle>
                  <BitRateStartTime xsi:nil="true"/>
                  <BitRateEndTime xsi:nil="true"/>
               </VideoClip>
               <VideoClip VideoTitle="SIMPSONS 2000" VideoURL="http://actual-url-concealed.com" VideoType="Trailer" MaximumBitRate="1500 kbps" EncodingType="MPEG4">
                  <VideoHandle>
                     <Id>277533</Id>
                     <ProviderId>6</ProviderId>
                  </VideoHandle>
                  <BitRateStartTime xsi:nil="true"/>
                  <BitRateEndTime xsi:nil="true"/>
               </VideoClip>
               <VideoClip VideoTitle="SIMPSONS 2000" VideoURL="http://actual-url-concealed.com" VideoType="Trailer" MaximumBitRate="1500 kbps" EncodingType="WMV">
                  <VideoHandle>
                     <Id>277531</Id>
                     <ProviderId>6</ProviderId>
                  </VideoHandle>
                  <BitRateStartTime xsi:nil="true"/>
                  <BitRateEndTime xsi:nil="true"/>
               </VideoClip>
            </VideoClips>
            <Page>
               <PageSize>3</PageSize>
               <StartIndex>0</StartIndex>
               <TotalRows>32</TotalRows>
            </Page>
         </GetMediaResult>
      </GetMediaResponse>
   </soap:Body>
</soap:Envelope>

Request Example 5

Request station logos for ESPN.
  • In an ImageItem element, specify 25 in the SourceId element.
  • Specify Station Logo in the ImageType element.
  • Specify en-US in the Locale element.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://api.rovicorp.com/v9/common/types" xmlns:ric="http://api.rovicorp.com/v9/richMediaService">
   <soapenv:Header>
      <typ:AuthHeader>
         <typ:UserName>username</typ:UserName>
         <typ:Password>password</typ:Password>
      </typ:AuthHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ric:GetMedia>
         <ric:request>
            <ric:ImageItems>
               <ric:ImageItem>
                  <ric:SourceId>25</ric:SourceId>
               </ric:ImageItem>
            </ric:ImageItems>
            <ric:Image>
               <ric:ImageType>Station Logo</ric:ImageType>
            </ric:Image>
            <ric:Locale>en-US</ric:Locale>
         </ric:request>
      </ric:GetMedia>
   </soapenv:Body>
</soapenv:Envelope>

Here's the response to this request, but to reduce the length just the first 3 of the 131 Image elements are shown.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetMediaResponse xmlns="http://services.macrovision.com/v9/richMediaService">
         <GetMediaResult>
            <RequestId xmlns="http://services.macrovision.com/v9/common/types">f25f6ed2-1bce-4f32-b0f3-1b5ab1fea369</RequestId>
            <ClientBatchId xmlns="http://services.macrovision.com/v9/common/types">gero et</ClientBatchId>
            <TimeStamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T02:27:19.912Z</TimeStamp>
            <Status xmlns="http://services.macrovision.com/v9/common/types">PNE</Status>
            <Errors xmlns="http://services.macrovision.com/v9/common/types"/>
            <EndTimestamp xmlns="http://services.macrovision.com/v9/common/types">2012-03-28T02:27:19.927Z</EndTimestamp>
            <Build xmlns="http://services.macrovision.com/v9/common/types">CPS Phase v9 Build 9.9.3.1</Build>
            <Images>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>297339</ImageId>
                  <ImageTitle>ESPN Classic</ImageTitle>
                  <ImageCaption>Widget Logo</ImageCaption>
                  <ObjectId>25</ObjectId>
                  <ObjectType>Source</ObjectType>
                  <ObjectName>ESPN Classic</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>1</ImageZoomLevel>
                  <ImageHeadcount xsi:nil="true"/>
                  <ImageType>Station Logo</ImageType>
                  <ImageFormat xsi:nil="true"/>
                  <ImageHorizontalResolution>92</ImageHorizontalResolution>
                  <ImageVerticalResolution>36</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2009-03-04T11:17:35.487Z</LastUpdate>
                  <ImageFormatId>0</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>5:2</AspectRatio>
                  <ParentImageId>16814562</ParentImageId>
                  <MaxImageScale>100</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>297349</ImageId>
                  <ImageTitle>ESPN Classic</ImageTitle>
                  <ImageCaption>Widget Logo</ImageCaption>
                  <ObjectId>25</ObjectId>
                  <ObjectType>Source</ObjectType>
                  <ObjectName>ESPN Classic</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>1</ImageZoomLevel>
                  <ImageHeadcount xsi:nil="true"/>
                  <ImageType>Station Logo</ImageType>
                  <ImageFormat>jpg</ImageFormat>
                  <ImageHorizontalResolution>500</ImageHorizontalResolution>
                  <ImageVerticalResolution>195</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2009-03-04T11:17:35.487Z</LastUpdate>
                  <ImageFormatId>17</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>5:2</AspectRatio>
                  <ParentImageId>16814562</ParentImageId>
                  <MaxImageScale>543.48</MaxImageScale>
               </Image>
               <Image>
                  <ImageUrl>http://actual-url-concealed.jpg</ImageUrl>
                  <ImageUseType xsi:nil="true"/>
                  <ImageId>297350</ImageId>
                  <ImageTitle>ESPN Classic</ImageTitle>
                  <ImageCaption>Widget Logo</ImageCaption>
                  <ObjectId>25</ObjectId>
                  <ObjectType>Source</ObjectType>
                  <ObjectName>ESPN Classic</ObjectName>
                  <Relevancy>true</Relevancy>
                  <ImageCreditDisplay xsi:nil="true"/>
                  <ImageCastWeight xsi:nil="true"/>
                  <ImageZoomLevel>1</ImageZoomLevel>
                  <ImageHeadcount xsi:nil="true"/>
                  <ImageType>Station Logo</ImageType>
                  <ImageFormat>png</ImageFormat>
                  <ImageHorizontalResolution>64</ImageHorizontalResolution>
                  <ImageVerticalResolution>25</ImageVerticalResolution>
                  <ImageMaintainAspectFlag xsi:nil="true"/>
                  <ImageExpiryDateTime xsi:nil="true"/>
                  <LastUpdate>2009-03-04T11:17:35.487Z</LastUpdate>
                  <ImageFormatId>5</ImageFormatId>
                  <Orientation>Landscape</Orientation>
                  <AspectRatio>5:2</AspectRatio>
                  <ParentImageId>16814562</ParentImageId>
                  <MaxImageScale>69.57</MaxImageScale>
               </Image>
            </Images>
            <Page>
               <PageSize>131</PageSize>
               <StartIndex>0</StartIndex>
               <TotalRows>131</TotalRows>
            </Page>
         </GetMediaResult>
      </GetMediaResponse>
   </soap:Body>
</soap:Envelope>

See Also

↑ Top

Personal tools