API Objects
Media
Media objects are representations of all types of entertainment. They are designed to be compartmentalized and flexible in order to accurately represent multiple types of entertainment.
Recognizing a Media Object
All MediaHound Object Types can be inferred from the first five characters of their MHID or AltID. Here is a list of all Media types in The Entertainment Graph and their corresponding prefix.
Video Types
Media | MHID Prefix | Description |
---|---|---|
Movie | mhmov | A feature-length motion picture. |
ShowEpisode | mhsep | A single installment of video content within a sequence of serialized content. |
ShowSeason | mhssn | A Season belonging to a Show Series. |
ShowSeries | mhsss | A Show Series (a.k.a., TV Show) representing the entire series. |
Special | mhspc | A single installment of unserialized video content. |
Trailer | mhtrl | A short promotional video intended to preview the content. |
Mixed Types
Media | MHID Prefix | Description |
---|---|---|
MHGraphGroup | mhggp | An unordered list of MHObjects. |
Default and Optional Fields
All Media objects are returned with a default set of fields. These fields contain information and properties that relate directly to the essence of the Media object itself.
The default fields are guaranteed and are returned every time a Media object is returned. Everything else may be included by passing in the relevant Component.
{"content": [{"object": {"mhid": String (default field),"name": String (default field),"altId": String (default field),"releaseDate": Long (default field),"description": String (default field),"primaryName": PRIMARY_NAME_OBJECT,"primaryImage": PRIMARY_IMAGE_OBJECT,"secondaryImage": SECONDARY_IMAGE_OBJECT,"images": IMAGES_ARRAY,"keyContributors": KEY_CONTRIBUTORS_ARRAY,"contributors": CONTRIBUTORS_ARRAY,"keySuitabilities": KEY_SUITABILITIES_ARRAY,"primaryGroup": PRIMARY_GROUP_OBJECT,"keyTraits": KEY_TRAITS_ARRAY,},"context":{}}],"pagingInfo": {"next": null,"previous": null}}
Default Field Summary
Property | Description |
---|---|
mhid | The MediaHound ID of the Media. |
name | The name of the Media. |
altId | The alternate ID of the Media, to be used for urls. |
releaseDate | The release date of the Media in Unix time. |
description | The description of the Media. For things such as Movies, this would be a synopsis. |
Primary Name
All Media objects contain a Name sub-object called primaryName
. This contains the primary locale-relevant Name.
The primaryName
object is returned whenever a primaryName
Component is requested.
Primary Image
All Media objects contain an Image sub-object called primaryImage
. You can expect this to be the best visual representation of the piece of content. For example, a movie's primaryImage
is likely to be a poster, whereas a book's primaryImage
is often its cover. Media images typically have consistent aspect ratios within each media type. Most movies have a 2:3 poster image. Most show series have a 16:9 banner image. However, aspect ratios are not guaranteed, and applications should handle images of all aspect ratios.
The primaryImage
object is returned whenever a primaryImage
Component is requested.
The response object is guaranteed, but may only contain a default image.
Secondary Image
All Media objects contain an Image sub-object called secondaryImage
.
The secondaryImage
object is returned whenever a secondaryImage
Component is requested.
The response object is guaranteed, but may only contain a default image.
Images
All Media objects contain a sub-object array called images
. This array contains unsorted Images from or about the content.
The images
array is returned whenever an images
Component is requested.
The response array is guaranteed, but may be empty.
Key Contributors
All Media objects contain a sub-object array called keyContributors
. This contains Contributors that have been determined to be significant for the Media object. For example, for a Movie, this may be people such as the Director and a few key Cast Members. For a Book, this may be the Author. This array will contain no more than 10 Contributors.
The keyContributors
array is returned whenever the keyContributors
Component is requested. The response array is guaranteed, but may be empty.
Contributors
All Media objects contain a sub-object array called contributors
. This contains all Contributors that have contributed to the content.
The contributors
array is returned whenever the contributors
Component is requested. The response array is guaranteed, but may be empty.
Key Suitabilities
Some Media objects contain a sub-object called keySuitabilities
. This contains Trait objects that specify the suitability rating of the Media object. For example, for a Movie, this may the MPAA rating.
The keySuitabilities
array is returned whenever the keySuitabilities
Component is requested. The response array is guaranteed, but may be empty.
Primary Group
Some Media objects contain a sub-object called primaryGroup
. It refers to the "parent" Media object of the requested Media object. For example, for a ShowEpisode, this would be its ShowSeason. For a Track, as is can appear on multiple Albums, this would be the primary, or original, Album that it appeared on.
The primaryGroup
object is returned whenever the primaryGroup
Component is requested and the object has a Primary Group.
Key Traits
All Media objects contain a sub-object array called keyTraits
. This array contains Trait objects which are considered to be "key", or essential traits for a piece of Content.
The keyTraits
array is returned whenever the keyTraits
Component is requested. The response array is guaranteed, but may be empty.
Sources
Some Media objects contain a sub-object array called sources
. This array contains sources which the media is currently available on, and which your client has permissions for. For questions about which sources your client key has permissions to, please contact bark@mediahound.com.
The sources
array is returned whenever the sources
Component is requested. The response array is guaranteed, but may be empty.