API Objects

Users

User objects are representations of all the MediaHound Users.

Recognizing a User Object

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

User Types

UserMHID PrefixDescription
UsermhusrAn end user who interacts with The Entertainment Graph.

Default and Optional Fields

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

The default fields are guaranteed and are returned every time a User object is returned. Not all the properties may be returned, depending on the privacy settings of the User. All non-default fields may be included by passing in the relevant Component.

Copy
JSON
{
  "content":[{
    "object": {
      "mhid": String (default field),
      "name": String (default field),
      "username": String (default field),
      "email": String (default field),
      "primaryImage":  PRIMARY_IMAGE_OBJECT,
      "secondaryImage": SECONDARY_IMAGE_OBJECT,
      "images": IMAGES_ARRAY,
      "ownedCollections": COLLECTION_ARRAY,
      "following": FOLLOWING_ARRAY,
      "followers": FOLLOWERS_ARRAY,
      "liking": LIKING_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 User.
nameThe name of the User.
usernameThe username of the User.
emailThe email of the User (viewable only for the authenticated User).

Primary Image

All User objects contain a sub-object called primaryImage. You can expect this to be the User uploaded image that they have specified as their profile picture. User images typically have consistent aspect ratios of 1:1. However, aspect ratios are not guaranteed, and applications should handle images of all aspect ratios.

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

Secondary Image

All User objects contain a sub-object called secondaryImage. You can expect this to be a background image of the User.

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

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

Owned Collections

All User objects may contain a list Collection sub-objects called ownedCollections. This list will contain all Collections this User currently owns.

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

Following

All User objects contain a sub-object array called following. This array contains Content which this user currently follows.

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

Followers

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

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

Liking

All User objects contain a sub-object array called liking. This array contains Content which this User currently likes.

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

Likers

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

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

Social Metrics

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

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 },
    "liking": {
      "movie": Integer,
      "showSeries": Integer,
      "user": Integer,
      "collection": Integer
    },
    "following": {
      "movie": Integer,
      "showSeries": Integer,
      "user": Integer,
      "collection": Integer
    },
    "ownedCollections":{
      "custom": Integer,
      "shoppingCart": Integer,
      "playQueue": Integer,
      "mixList": Integer,
      "interestedList": Integer,
      "consumedList": Integer,
      "wishList": Integer,
      "hiddenList": Integer
    }
  }
}

Property Summary

PropertyDescription
likersThe number of Users that currently like this User.
followersThe number of Users that currently follow this User.
collectorsThe number of Collections that this User is currently in.
mentionersThe number of posts that this User is currently mentioned in.
likingThe number of each specific type of MediaHound objects this User currently likes.
followingThe number of each specific type of MediaHound objects this User currently follows.
ownedCollectionsThe number of each specific type of Collections this User currently owns.

User Social

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

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 User.
userFollowsSpecifies whether the currently authenticated User currently follows the User.
userDislikesSpecifies whether the currently authenticated User currently dislikes the User.
userDefaultCollectionsAn array of Object/Context Pairs where the object is any of the User's default collections that currently contain the User.