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
GenremhgnrA category of content based on stylistic criteria.Drama, Comedy
SubgenremhsgnA more specific category of content within a less specific Genre.Romantic Comedy, Political Thriller
MoodmhmodThe tone or attitude of the content; or how the content is perceived by the audience / makes it feel.Absurd, Goofy, Campy
SubMoodmhsmdThe secondary tone or attitude of the content, after the tone or attitude of the MHMood.Unsettling, Tense, Offbeat
QualitymhqltAn abstract or subjective attribute of the content.Cult, Indie, Visually Striking, Epic Scope, Moving, Time-Sensitive Viewing, Avant Garde
StyleElementmhstyA specific attribute pertaining to how the content is composed.Animated, Live Action, Hand Drawn, Narration, Segments, Episodic, Anime, Manga
StoryElementmhstrA key plot point, specific setting, item, or event that appears or happens within the content.Current Events, War, Cops
SuitabilitymhstbA rating for how appropriate the content is.PG-13, R
MaterialSourcemhmtsThe source material for the content, or where the content's story originated.Book, Graphic Novel, True Story
ThememhthmThe unifying subject or idea of the type of visual work.Overcoming the Odds, Man Vs Nature
AchievementmhachA notable accomplishment or award for the content.Academy Awards, Tony, Emmy, Rolling Stone Top 100 Albums
EramheraThe time period in which the content was released or set.Post-War
AudiencemhaudThe consumer group for which the content is intended.Kids
FlagmhflgAn appropriateness warning for the content.Nudity, Explicit, R Rated
GraphGenremhgrgA category of content made up of two or more different Traits.Action Thriller, Alternative Folk, Medical Drama, Dance Pop
LanguagemhlngDenotes the language of the content.English, Spanish
TypemhtypExplicit type information about the content.Soundtrack, Made For TV Movie
AudiomhadoAn audio classification for the content.Electronic House, Tzanetakis Reggae

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.

Copy
JSON
{
  "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,
      "graphGenres": GRAPH_GENRES_ARRAY,
      "followers": FOLLOWERS_ARRAY,
      "likers": LIKERS_ARRAY,
      "socialMetrics": SOCIAL_METRICS_OBJECT,
      "userSocial": USER_SOCIAL_OBJECT
    },
    "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.

Graph Genres

Some Trait objects contain a sub-object array called graphGenres that represents Graph Genres containing this Trait. Graph Genres are Trait objects. GraphGenres are interesting and unique combinations of different Traits which can offer a fresh view of our Media. As an example: If the current Trait is "Vengeance", we might get back "Vengeance + Betrayal + Against the Odds" which combines three traits, one of which is the current Trait.

The graphGenres array is returned whenever the graphGenres Component is requested. The response array is guaranteed, but may be empty.

Followers

All Trait objects contain a sub-object array called followers. This array contains User objects representing Users currently following this Trait.

The followers array is returned whenever a followers Component is requested. The response array is guaranteed, but may be empty.

Likers

All Trait objects contain a sub-object array called likers. This array contains User objects representing Users who have currently liked this Trait.

The likers array is returned whenever a likers Component is requested. The response array is guaranteed, but may be empty.

Social Metrics

All Traits contain a sub-object called socialMetrics. This is an object that will contain all the general social metrics about the Trait.

The socialMetrics object is guaranteed and will be returned anytime the socialMetrics Component is requested. Additionally, the socialMetrics Component is considered a primitive Component and therefore, is not in an Object/Context Pair.

Copy
JSON
{
  "socialMetrics": {
    "likers": { "all": Integer },
    "followers": { "all": Integer },
    "collectors": {
      "custom": Integer,
      "shoppingCart": Integer,
      "playQueue": Integer,
      "mixList": Integer,
      "interestedList": Integer,
      "consumedList": Integer,
      "wishList": Integer,
      "hiddenList": Integer
    },
    "mentioners": { "all": Integer }
  }
}

Property Summary

PropertyDescription
likersThe number of Users that currently like this Trait.
followersThe number of Users that currently follow this Trait.
collectorsThe number of each type of Collection that this Trait is currently in.
mentionersThe number of posts that this Trait is currently mentioned in.

User Social

All Traits contain a sub-object called userSocial. This is an object that will contain the User specific social metrics about the Trait.

The userSocial object is only guaranteed when a User has been authenticated with either Code Grant, Implicit Grant, or Password Grant, and will be returned anytime a userSocial Component is requested. Additionally, the userSocial Component is considered a primitive Component and therefore, is not in an Object/Context Pair.

Copy
JSON
{
  "userSocial": {
    "userLikes": Boolean,
    "userFollows": Boolean,
    "userDislikes": Boolean,
    "userDefaultCollections": [
      {
        "object": COLLECTION_OBJECT,
        "context": {}
      }
    ]
  }
}

Property Summary

PropertyDescription
userLikesSpecifies whether the currently authenticated User currently likes the Trait.
userFollowsSpecifies whether the currently authenticated User currently follows the Trait.
userDislikesSpecifies whether the currently authenticated User currently dislikes the Trait.
userDefaultCollectionsAn array of Object/Context Pairs where the object is any of the User's Default Collections that currently contain the Trait, and context is currently empty.