Embedded Content

EiTV CLOUD allows users to concentrate their content in the platform using the Embedded Content, this way, users can reference their content outside EiTV CLOUD like YouTube, Facebook, Vimeo, and so on. Next, we have the calls used to retrieve the embedded content that are registered.

method: GET
URL: /embeds.json

PARAMETERS:
{
  “media_page”: “NUMBER” # Pagination, starting on 1 (if 0 or null, no pagination) 
}
RETURN:
{
  "page": "embeds",
  "embeds":  [
    {
      “EMBEDDED MEDIA INFO"
    }
  ],
 "pagination": {
    "current": “NUMBER”, # Current page
    "last": true/false # If last page, true
  }
}

Using the media ID, you can get more detailed information:

method: GET
URL: /embeds/ID.json # ID Format NUMBER-TEXT

PARAMETERS:
{
  “comment_page”: “NUMBER” # Pagination of comments, starting on 1
}
RETURN:
{ 
  "page": "embed",
  "media":
    {
      "id": "ID",
      "name": "NAME",
      "description": "DESCRIPTION",
      "html_description": "HTML ADDITIONAL DESCRIPTION",
      "promote": true/false, # Promote on Home Page
      "demote": true/false, # Do not show on Home
      "media_type": "TYPE", # “youtube”,”vimeo”,”dailymotion”,”other”
      "date": "DATE",
      "type": "embed",
      "time_ago_in_words": "FULL DATE",
      "views": NUMBER,
      "impressions": NUMBER, 
      "last_view_time: NUMBER,
      "likes": NUMBER,  
      "deslikes": NUMBER, 
      "comments": NUMBER, 
      “comment_perm”: true/false, # Comments enabled
      “rating_perm”: true/false, # Rating enabled
      “dvr_media”: [ # mídias de DVR
        {
          “name”: “NAME”,
          “description”: “DESCRIPTION”,
           "thumb": “THUMBNAIL”,
           “date”: “DATE”, # yyyy-mm-dd
         }
       ]
     },
  “comments”: [
    {
      “id”: “ID” # Format NUMBER-TEXT
      “user_id”: “ID”  
      “user_name”: “NAME” 
      “content”: “COMMENT CONTENT”
      “date”: “DATE”
      "time_ago_in_words": "FULL DATE",
      "status": "available,under_review,unavailable",
      "num_children": NUMBER,
      "likes": NUMBER,  
      "deslikes": NUMBER,
      "rating": [""|"up"|"down"], # Current user rating
    }
  ],
  “rating”: [“”|”up”|”down”], # Current user rating
   "pagination": {
    "current": “NUMBER”, # Current page
    "last": true/false # If last page, true
  }
}

Following, we show how to get a specific content thumbnail:

URL: /embeds/[ID]/retrieve?format=thumb
ID: format NUMBER-TEXT

To get the specific player (iframe) for an embedded media, you should request:

URL: /embeds/[ID]/play?format=[auto,240p,480p,720p]

ID: format NUMBER-TEXT
Before make the request, you should check available resolutions on Media Info.

EiTV CLOUD also supports DVR embedded media, in this case you should add the parameter – “media=ID”, where ID is the DVR vector index.

Adding comments can be done using the following method:

method: POST
URL: /embeds/[ID]/comments.json # media ID consists of NUMBER-TEXT

PARAMETERS:
{
  “comment”:  
    {
      "reply_id": "NUMBER-TEXT" # comment ID, only if is a reply
      “content”: “COMMENTS CONTENT”
    } 
}

You can remove a comment using the request:

method: DELETE
URL: /embeds/[MEDIA_ID]/comments/[ID].json # media ID and comment ID consist of NUMBER-TEXT

To get the comment replies:

method: GET
URL: /embeds/[MEDIA_ID]/comments/[ID].json # media ID and comment ID consist of NUMBER-TEXT

PARAMETERS:
{
  "children_page": "NUMBER" # Pagination of comments, starting on 1
  "children_limit": "NUMBER" # If children_page == 0
}
RETURN:
{
  "page": "comment",
  "comments": {
    "COMMENT INFO"
  },
  "children": [
    {
      "COMMENT INFO"
    },
  ],
  "pagination": {
    "current": "NUMBER", # Current page
    "last": true/false # If last page, true
  }
}

Rating a content is available with the method:

method: POST
URL: /embeds/[MEDIA_ID]/ratings.json # ID – NUMBER-TEXT

PARAMETERS:
{
  “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none
}

And rating a comment:

method: POST
URL: /embeds/[MEDIA_ID]/comments/[ID]/ratings.json # ID – NUMBER-TEXT

PARAMETERS:
{
  “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none
}


Method: post

annotations#create

URL: /embeds/:embed_id/annotations.json
Parameters:
return:

Method: delete

annotations#destroy

URL: /embeds/:embed_id/annotations/:id.json

Parameters:
return:

Method:
URL:
Parameters:
return:





<< Previous topic Next topic >>