Events

EiTV CLOUD has a feature that allows you to transmit Live Events, following we have the description of how to get all the information about the events that are being broadcast now and about upcoming events:

method: GET
URL: /events.json

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

Using an event ID, you can get all information about this content.

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

PARAMETERS:
{
  “comment_page”: “NUMBER” # Pagination of comments, starting on 1
}
RETURN:
{
  "page": "event",
  "events": 
    {
      "id": "ID", 
      "name": "NAME",
      "description": "DESCRIPTION",
      "html_description": "HTML ADDITIONAL DESCRIPTION",
      “start”: “START DATE”,
      “end”: “END DATE”,
      "format": [
        “FORMAT", # “240p”,”480p”,”720p”
      ],
      "date": "DATE",
      "type": "event",
      "time_ago_in_words": "FULL DATE",
      "views": NUMBER, 
      "impressions": NUMBER, 
      "likes": NUMBER, 
      "deslikes": NUMBER, 
      "comments": NUMBER,
      "chat_perm": true/false, 
      “comment_perm”: true/false, 
      “rating_perm”: true/false, 
      “permanent”: true/false, # 24/7
      "audio_only": true/false,
      "demote": true/false, # Do not show on Homepage
      "event_demote": true/false,
      "published": true/false,
      "terminated": true/false,
      "streaming": true/false,
      "cta_enabled": true/false,
      "cta_text": "TEXT",
      "cta_url": "URL",
      "cta_position": "POSITION",
      "donation_enabled": true/false, # if ?donation=true
      "donation_payment_methods": ["card", "boleto","coupon"],
    },
  “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: /events/[ID]/retrieve?format=thumb
ID: format NUMBER-TEXT

Thumbnails can be shown in more than one resolution, you can choose the resolution using: format=thumb[240p,480p,720p] (available resolutions on media info)

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

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

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

Adding comments can be done using the following method:

method: POST
URL: /events/[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: /events/[MEDIA_ID]/comments/[ID].json # media ID and comment ID consist of NUMBER-TEXT

To get the comment replies:

method: GET
URL: /events/[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: /events/[MEDIA_ID]/ratings.json # ID – NUMBER-TEXT

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

And rating a comment:

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

PARAMETERS:
{
  “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none
}
<< Previous topic Next topic >>