API Objects

Traits

Trait objects are representations of descriptive qualities that can be attached to Media objects.

Recognizing a Trait Object

All MediaHound Object Types can be inferred from the first five characters of their MHID or AltID. Here is a list of all Trait types in The Entertainment Graph and their corresponding prefix.

Trait Types

TraitMHID PrefixDescriptionExamples
TraitmhtrtA category of content based on stylistic criteria.Drama, Comedy, Episodic, Offbeat

Default and Optional Fields

All Trait objects are returned with a default set of fields. These fields contain information and properties that relate directly to the essence of the Trait object itself.

The default fields are guaranteed and are returned every time a Trait 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),
"subType": String (default field),
"primaryName": PRIMARY_NAME_OBJECT,
"primaryImage": PRIMARY_IMAGE_OBJECT,
"secondaryImage": SECONDARY_IMAGE_OBJECT,
"images": IMAGES_ARRAY,
"traitContent": TRAIT_CONTENT_ARRAY,
},
"context":{}
}],
"pagingInfo": {
"next": null,
"previous": null
}
}

Default Field Summary

PropertyDescription
mhidThe MediaHound ID of the Trait.
nameThe name of the Trait.
altIdThe alternate ID of the Trait.
subTypeA SubType descriptor of the Trait.

Primary Name

All Trait 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 Trait objects contain an Image sub-object called primaryImage. 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 Trait objects contain an Image sub-object called secondaryImage. You can expect this to be a background image of the Trait.

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 Trait objects may contain a list of Image sub-objects called images. This list will contain all Images associated with the given Trait.

The images array is returned whenever an images Component is requested. The response array is guaranteed, but may be an empty array.

Trait Content

All Trait objects contain a sub-object array of Content objects which represent all of the Content this trait is associated with. This could be Movies or ShowSeries which have this trait.

The traitContent object is returned whenever a traitContent Component is requested.