API Objects

Collections

Collection objects are User made groupings of Entertainment objects, such as Media, Contributors, Images, etc.

Recognizing a Collection Object

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

Collection Types

CollectionMHID PrefixDescription
CollectionmhcolA collection of content collected into a sorted group.

Default and Optional Fields

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

The default fields are guaranteed and are returned every time a Collection 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),
      "createdDate": Long (default field),
      "description": String (default field),
      "permissions": String (default field),
      "published": Boolean (default field),
      "items": ITEMS_ARRAY,
      "primaryName": PRIMARY_NAME_OBJECT,
      "primaryImage": PRIMARY_IMAGE_OBJECT,
      "secondaryImage": SECONDARY_IMAGE_OBJECT,
      "images": IMAGES_ARRAY,
      "primaryOwner": PRIMARY_OWNER_OBJECT,
      "collections": COLLECTIONS_ARRAY,
      "socialMetrics": SOCIAL_METRICS_OBJECT,
      "userSocial": USER_SOCIAL_OBJECT
    },
    "context":{}
  }],
  "pagingInfo": {
    "next": null,
    "previous": null
  }
}

Property Summary

PropertyDescription
mhidThe MediaHound ID of the Collection.
nameThe name of the Collection.
altIdThe alternate ID of the Collection, to be used for urls.
createdDateThe created date of the Collection in Unix time.
descriptionThe description of the Collection.
permissionsThe viewable permissions of the Collection, either "public" or "private." Public Collections are searchable and accessible by any Users. Private Collections are only accessible by their owners.
publishedA Boolean to indicate whether the owner has published the Collection.

Items

All Collection objects contain a sub-object array called items which represents the items currently in this Collection. It may contain any collectable type of object, which currently includes Media, User, Contributor, Collection, and Trait objects.

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

Primary Name

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

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

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

Primary Owner

All Collection objects contain a User sub-object called primaryOwner. This contains the single User that owns the Collection.

The primaryOwner object is returned whenever a primaryOwner Component is requested. The response object is guaranteed.

Collections

Collections can contain other Collections. All Collection objects contain a sub-object array called Collections which represents the Collections which contain this Collection.

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

Social Metrics

All Collection objects contain a sub-object called socialMetrics. This is an object that will contain all the general social metrics about the Collection 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 }
  }
}

Property Summary

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

User Social

All Collection objects contain a sub-object called userSocial. This is an object that will contain the User specific social metrics about the Collection 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 Collection.
userFollowsSpecifies whether the currently authenticated User currently follows the Collection.
userDislikesSpecifies whether the currently authenticated User currently dislikes the Collection.
userDefaultCollectionsAn array of Object/Context Pairs where the object is any of the User's Default Collections that currently contain the Collection, and context is currently empty.