V9.RichMediaService:GetMedia

Jump to: navigation, search

GetMedia

Returns images and trailers associated with television:

  • Channel logos.
  • A particular image.
  • Images of a celebrity.
  • All resolutions and formats of a particular image.
  • Images and trailers associated with a movie, series, episode, or program.

A single request can return all of these kinds of images and any number of them.

This request returns a large amount of data. To speed data transmission, request a compressed response by including Accept-Encoding: gzip,deflate in the HTTP header.

Syntax

The following is a sample SOAP 1.2 request with placeholders. Your application development environment needs to replace the placeholders with actual values.
POST /v9/richmediaservice.asmx HTTP/1.1
Host: api.rovicorp.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <AuthHeader xmlns="http://api.rovicorp.com/v9/common/types">
      <UserName>string</UserName>
      <Password>string</Password>
    </AuthHeader>
  </soap12:Header>
  <soap12:Body>
    <GetMedia xmlns="http://api.rovicorp.com/v9/richMediaService">
      <request>
        <ImageItems>
          <ImageItem />
          <ImageItem />
        </ImageItems>
        <Image>
          <ImageUrl>string</ImageUrl>
          <ImageUseType>Logo or HeroImage or Thumbnail</ImageUseType>
          <ImageId>int</ImageId>
          <ImageTitle>string</ImageTitle>
          <ImageCaption>string</ImageCaption>
          <ObjectId>string</ObjectId>
          <ObjectType>Program or Credit or Source</ObjectType>
          <ObjectName>string</ObjectName>
          <Relevancy>boolean</Relevancy>
          <ImageCredit>string</ImageCredit>
          <ImageCreditDisplay>boolean</ImageCreditDisplay>
          <ImageCastWeight>float</ImageCastWeight>
          <ImageZoomLevel>1 or 2 or 3 or 4 or 5</ImageZoomLevel>
          <ImageHeadcount>int</ImageHeadcount>
          <ImageType>string</ImageType>
          <ImageFormat>jpg or png or gif or bmp</ImageFormat>
          <ImageHorizontalResolution>int</ImageHorizontalResolution>
          <ImageVerticalResolution>int</ImageVerticalResolution>
          <ImageMaintainAspectFlag>boolean</ImageMaintainAspectFlag>
          <ImageExpiryDateTime>dateTime</ImageExpiryDateTime>
          <LastUpdate>dateTime</LastUpdate>
          <ImageFormatId>int</ImageFormatId>
          <Orientation>string</Orientation>
          <AspectRatio>string</AspectRatio>
          <ImageOwner>string</ImageOwner>
          <ParentImageId>int</ParentImageId>
          <ProgramTitle>string</ProgramTitle>
          <MaxImageScale>float</MaxImageScale>
        </Image>
        <Page>
          <PageSize>int</PageSize>
          <StartIndex>int</StartIndex>
          <TotalRows>int</TotalRows>
          <SortByColumn>
            <int>int</int>
            <int>int</int>
          </SortByColumn>
        </Page>
        <IncludeExpiredMediaOnly>boolean</IncludeExpiredMediaOnly>
        <Locale>string</Locale>
        <ImageTypes>
          <string>string</string>
          <string>string</string>
        </ImageTypes>
        <ImageFormatIds>
          <int>int</int>
          <int>int</int>
        </ImageFormatIds>
      </request>
    </GetMedia>
  </soap12:Body>
</soap12:Envelope>

Request Example 1 »

Get images of Mark Harmon and Pauley Perrette together.

Request Example 2 »

Request images of just Mark Harmon.

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.

Request Example 4 »

Request group images of the characters in the Simpsons in JPG format.

Request Example 5 »

Request station logos for ESPN.

Request Parameters

NameRequiredTypeDescription
ImageItems Yes ImageItem [ ] Type of items you want to return and the IDs of the items.
Locale Yes String Language and country code of the television service. This is a case-insensitive combination of the ISO 639 language code, a hyphen character, and the ISO 3166 country code, as described in RFC 1766. Valid locales include:
  • da-DK
Danish, Denmark
  • nl-BE
Dutch, Belgium
  • nl-NL
Dutch, Netherlands
  • en-BM
English (US), Bermuda
  • en-CA
English (US), Canada
  • en-IE
English (US), Ireland
  • en-JM
English (US), Jamaica
  • en-GB
English (UK), United Kingdom[1]
  • en-US
English (US), United States
  • fi-FI
Finnish, Finland
  • fl-BE
Flemish, Belgium
  • fr-BE
French, Belgium
  • fr-CA
French, Canada
  • fr-FR
French, France
  • fr-LU
French, Luxembourg
  • fr-CH
French, Switzerland
  • de-AT
German, Austria
  • de-DE
German, Germany
  • de-LU
German, Luxembourg
  • de-CH
German, Switzerland
  • it-IT
Italian, Italy
  • it-CH
Italian, Switzerland
  • no-NO
Norwegian, Norway
  • pl-PL
Polish, Poland
  • pt-BR
Portuguese, Brazil
  • pt-PT
Portuguese, Portugal
  • es-AR
Spanish, Argentina
  • es-BO
Spanish, Bolivia
  • es-CL
Spanish, Chile
  • es-CO
Spanish, Colombia
  • es-CR
Spanish, Costa Rica
  • es-DO
Spanish, Dominican Republic
  • es-EC
Spanish, Ecuador
  • es-SV
Spanish, El Salvador
  • es-GT
Spanish, Guatemala
  • es-HN
Spanish, Honduras
  • es-MX
Spanish, Mexico
  • es-NI
Spanish, Nicaragua
  • es-PA
Spanish, Panama
  • es-PE
Spanish, Peru
  • es-ES
Spanish, Spain
  • es-US
Spanish, United States
  • es-VE
Spanish, Venezuela
  • sv-SE
Swedish, Sweden

[1] Includes Wales, Scotland, and Northern Ireland.

ClientBatchId No String A trace code to be returned in the response header so you can track a batch of requests. The code can be up to 255 characters.
IncludeExpiredMediaOnly No Boolean Whether to return only images that are past their expiration date: true or false. Default is false: images past their expiration date are not returned.
Image No Image Specifies properties of the images to be returned. You can filter the returned images by one or more of the following properties:
  • Image title
  • Image type
  • Orientation
  • Aspect ratio
  • Image format
  • Image caption
  • Image format ID
  • Parent image ID
  • Image zoom level
  • Image head count
  • Image vertical resolution
  • Image horizontal resolution
ImageFormatIds No Integer [ ] Format IDs of images to be returned. This image filter is added to any filters specified in the Image parameter.
ImageTypes No String [ ] Image types of images to be returned. This filter is added to the filters specified in the Image parameter.
Page No DataPage Settings that return images one pageful at a time and determine the sequence of the response.

Response

Response Header

ResponseTypeDescription
BuildStringSoftware build version of the API.
ClientBatchIdStringThe batch ID you supplied in the request.
EndTimestampDateTimeTime the server finished processing the request.
ErrorsError [ ]Processing errors or warnings.
RequestIdString GUIDA generated value that identifies the request and response.
StatusStatusProcessing status, indicating whether the request was successfully processed.
TimeStampDateTimeTime the server started processing the request.

Response for GetMedia

NameTypeDescription
Images Image [ ] The requested images.
VideoClips VideoClip [ ] The requested video clips.
Page DataPage The number of images available, and echoes of the values specified in the Page parameter.

Response Example

The following is a sample SOAP 1.2 response with placeholders that show the type of content returned in an actual response.
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetMediaResponse xmlns="http://api.rovicorp.com/v9/richMediaService">
      <GetMediaResult>
        <Images>
          <Image>
            <ImageUrl>string</ImageUrl>
            <ImageUseType>Logo or HeroImage or Thumbnail</ImageUseType>
            <ImageId>int</ImageId>
            <ImageTitle>string</ImageTitle>
            <ImageCaption>string</ImageCaption>
            <ObjectId>string</ObjectId>
            <ObjectType>Program or Credit or Source</ObjectType>
            <ObjectName>string</ObjectName>
            <Relevancy>boolean</Relevancy>
            <ImageCredit>string</ImageCredit>
            <ImageCreditDisplay>boolean</ImageCreditDisplay>
            <ImageCastWeight>float</ImageCastWeight>
            <ImageZoomLevel>1 or 2 or 3 or 4 or 5</ImageZoomLevel>
            <ImageHeadcount>int</ImageHeadcount>
            <ImageType>string</ImageType>
            <ImageFormat>jpg or png or gif or bmp</ImageFormat>
            <ImageHorizontalResolution>int</ImageHorizontalResolution>
            <ImageVerticalResolution>int</ImageVerticalResolution>
            <ImageMaintainAspectFlag>boolean</ImageMaintainAspectFlag>
            <ImageExpiryDateTime>dateTime</ImageExpiryDateTime>
            <LastUpdate>dateTime</LastUpdate>
            <ImageFormatId>int</ImageFormatId>
            <Orientation>string</Orientation>
            <AspectRatio>string</AspectRatio>
            <ImageOwner>string</ImageOwner>
            <ParentImageId>int</ParentImageId>
            <ProgramTitle>string</ProgramTitle>
            <MaxImageScale>float</MaxImageScale>
          </Image>
          <Image>
            <ImageUrl>string</ImageUrl>
            <ImageUseType>Logo or HeroImage or Thumbnail</ImageUseType>
            <ImageId>int</ImageId>
            <ImageTitle>string</ImageTitle>
            <ImageCaption>string</ImageCaption>
            <ObjectId>string</ObjectId>
            <ObjectType>Program or Credit or Source</ObjectType>
            <ObjectName>string</ObjectName>
            <Relevancy>boolean</Relevancy>
            <ImageCredit>string</ImageCredit>
            <ImageCreditDisplay>boolean</ImageCreditDisplay>
            <ImageCastWeight>float</ImageCastWeight>
            <ImageZoomLevel>1 or 2 or 3 or 4 or 5</ImageZoomLevel>
            <ImageHeadcount>int</ImageHeadcount>
            <ImageType>string</ImageType>
            <ImageFormat>jpg or png or gif or bmp</ImageFormat>
            <ImageHorizontalResolution>int</ImageHorizontalResolution>
            <ImageVerticalResolution>int</ImageVerticalResolution>
            <ImageMaintainAspectFlag>boolean</ImageMaintainAspectFlag>
            <ImageExpiryDateTime>dateTime</ImageExpiryDateTime>
            <LastUpdate>dateTime</LastUpdate>
            <ImageFormatId>int</ImageFormatId>
            <Orientation>string</Orientation>
            <AspectRatio>string</AspectRatio>
            <ImageOwner>string</ImageOwner>
            <ParentImageId>int</ParentImageId>
            <ProgramTitle>string</ProgramTitle>
            <MaxImageScale>float</MaxImageScale>
          </Image>
        </Images>
        <VideoClips>
          <VideoClip VideoTitle="string" VideoDescription="string" VideoURL="string" VideoType="string">
            <VideoHandle xsi:nil="true" />
            <VideoImage xsi:nil="true" />
          </VideoClip>
          <VideoClip VideoTitle="string" VideoDescription="string" VideoURL="string" VideoType="string">
            <VideoHandle xsi:nil="true" />
            <VideoImage xsi:nil="true" />
          </VideoClip>
        </VideoClips>
        <Page>
          <PageSize>int</PageSize>
          <StartIndex>int</StartIndex>
          <TotalRows>int</TotalRows>
          <SortByColumn>
            <int>int</int>
            <int>int</int>
          </SortByColumn>
        </Page>
      </GetMediaResult>
    </GetMediaResponse>
  </soap12:Body>
</soap12:Envelope>


See Also

↑ Top

 
 
Personal tools