EiTV CLOUD supports adding different types of files on the platform, using a file ID, you can get all information about this content.
method: GET
URL: /archives/ID.json
PARAMETERS: { “comment_page”: “NUMBER” # Pagination of comments, starting on 1 } RETURN: { "page": "archive", "media": { "id": "ID", "name": "NAME", "description": "DESCRIPTION", "html_description": "HTML ADDITIONAL DESCRIPTION", "date": "DATE", "type": "archive", "time_ago_in_words": "FULL DATE", "views": NUMBER, "impressions": NUMBER, "last_view_time: NUMBER, "likes": NUMBER, "deslikes": NUMBER, "comments": NUMBER, “comment_perm”: true/false, “rating_perm”: true/false, }, “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: /archives/[ID]/retrieve?format=thumb
ID: format NUMBER-TEXT
To get the specific player (iframe) for a file, you should request:
URL: /archives/[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: /archives/[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: /archives/[MEDIA_ID]/comments/[ID].json # media ID and comment ID consist of NUMBER-TEXT
To get the comment replies:
method: GET
URL: /archives/[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: /archives/[MEDIA_ID]/ratings.json # ID – NUMBER-TEXT
PARAMETERS: { “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none }
And rating a comment:
method: POST
URL: /archives/[MEDIA_ID]/comments/[ID]/ratings.json # ID – NUMBER-TEXT
PARAMETERS: { “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none }
Method: get archives#embed URL: /archives/:id/embed.json Parameters: Return:
Method: post annotations#create URL: /archives/:archive_id/annotations Parameters: Return:
Method: delete annotations#destroy URL: /archives/:archive_id/annotations/:id.json Parameters: Return:
Method: URL: Parameters: Return:
<< Previous topic | Next topic >> |
---|