API Objects
Sources
Source objects are representations of non-MediaHound services that we have linked to their corresponding MediaHound objects. Examples of these would be HBO, Netflix, IMDb, and RottenTomatoes.
Recognizing a Source Object
All MediaHound Object Types can be inferred from the first five characters of their MHID or AltID. Here is a list of all Source types in The Entertainment Graph and their corresponding prefix.
Source Types
Source | MHID Prefix | Description | Examples |
---|---|---|---|
Source | mhsrc | A third-party provider of content or information about content. | IMDB, Netflix, iTunes, Fandango |
Default and Optional Fields
All Source objects are returned with a default set of fields. These fields contain information and properties that relate directly to the essence of the Source object itself.
The default fields are guaranteed and are returned every time a Source 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),"primaryName": PRIMARY_NAME_OBJECT,"primaryImage": PRIMARY_IMAGE_OBJECT,"secondaryImage": SECONDARY_IMAGE_OBJECT,},"context": CONTEXT_OBJECT (see below)}],"pagingInfo": {"next": null,"previous": null}}
Default Field Summary
Property | Description |
---|---|
mhid | The MediaHound ID of the Source. |
name | The name of the Source. |
altId | The alternate ID of the Source, to be used for urls. |
Primary Name
All Source 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 Source objects contain a sub-object called primaryImage
. You can expect this to be the best visual representation of the Source.
The primaryImage
will return an Image object.
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 Source objects contain a sub-object called secondaryImage
. You can expect this to be an icon image of the piece of content.
The secondaryImage
will return and Image object.
The secondaryImage
object is returned whenever a secondaryImage
Component is requested.
The response object is guaranteed, but may only contain a default image.
Context
When asking for the Sources that a particular Media object is available on, the response is an array of Object Context Pairs. The object
is the actual Source, as described above. The context
is a complex nested object that aims to give as much information as possible in a manner that is consistent across all Sources. All Source objects will be paired with a context of formats
(see below) which detail the available ways to consume this media.
Note that everything inside context
is not configurable via Components. It is assembled automatically with the most data the API can provide.
"context": {"formats": FORMATS_OBJECT (see next section)}
Formats
The formats
property is an array of Format objects, each containing specific consumption information for individual formats.
"formats": [{"method": String,"medium": String,"price": Double,"currency": String}]
Property Summary
Property | Description |
---|---|
method | The method of payment. Current values are rent, purchase, subscription, and adSupported. |
medium | The medium of delivery. Current values are download, stream, deliver, and pickup. |
price | The price of the content in the format. |
currency | The currency of the price, usually "USD." |