To retrieve all channels available on your instance, you may perform the call:
method: GET
URL: /channels.json
PARAMETERS: { “media_page”: “NUMBER” # Pagination, starting on 1 (if 0 or null, no pagination) } RETURN: { "page": "channels", "channels": [ { “CHANNEL INFO” } ], "pagination": { "current": “NUMBER”, # Current page "last": true/false # If last page, true } }
Instead of get info about all channels, you can retrieve all information related with a specific channel
method: GET
URL: /channels/ID.json # ID format: NUMBER-TEXT
PARAMETERS: { “media_page”: “NUMBER” # Pagination, starting on 1 (if 0 or null, no pagination) } RETURN: { "page": "channel", “channel”: { "id": "ID", # ID format: NUMBER-TEXT "name": "NAME", "description": "DESCRIPTION", "html_description": "HTML DESCRIPTION", "promote": true/false, # Promote at Home Page "demote": true/false, # Do not show at Home Page "live_linear": true/false, # Channel with a stream 24/7 }, "medias": [ { “MEDIA INFO" } ], "pagination": { "current": “NUMBER”, # Current page "last": true/false # If last page, true }, "quizzes": [ { “QUIZ INFO" } ], "quiz_pagination": { "current": “NUMBER”, # Current page "last": true/false # If last page, true }, "subchannels": [ { “SUBCHANNEL INFO" } ] }
And the information about a specific subchannel:
method: GET
URL: /channels/ID/subchannels/ID.json
PARAMETERS: { “media_page”: “NUMBER” # Pagination, starting on 1 } RETURN: { "page": "subchannel", "subchannel": { "id": "ID", # ID: NUMBER-TEXT "name": "NAME", "type": "subchannel", }, "medias": [ { “MEDIA INFO" } ], "pagination": { "current": “NUMBER”, # Current page "last": true/false # If last page, true } }
Following, you can get the information about all programs of a channel with a live (24/7) stream:
method: GET
URL: /channels/ID/guide.json?date=yyyy-mm-dd # ID: NUMBER-TEXT, if no date specified, using current date
PARAMETERS: { “media_page”: “NUMBER” # Pagination, starting on 1 (if 0 or null, no pagination) } RETURN: { "page": "guide", "programs": [ { “PROGRAM INFORMATION” } ], }
Here you can retrieve the information about a specific program, or current program:
method: GET
URL: /channels/ID/program.json?program=ID # ID: NUMBER-TEXT, if no program specified, using current program
PARAMETERS: { “comment_page”: “NUMBER” # Pagination, starting on 1 (if 0 or null, no pagination) } RETURN: { "page": "program", "program": { "id": "ID", # ID: NUMBER-TEXT "name": "NAME", "description": "DESCRIPTION", “start”: “START DATE”, “end”: “FINAL DATE”, "date": "DATE", "type": "program", "time_ago_in_words": "FULL DATE", "views": NUMBER, "impressions": NUMBER, "likes": NUMBER, "deslikes": NUMBER, "comments": NUMBER, “comment_perm”: true/false, “rating_perm”: true/false, “has_dvr”: 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 } } Performing the following calls, you can subscribe or unsubscribe to a specific channel
method: POST
URL: /channels/ID/subscribe.json # ID format: NUMBER-TEXT
method: POST
URL: /channels/ID/unsubscribe.json # ID format: NUMBER-TEXT
To get the channel thumbnail, the URL should be:
URL: /channels/ID/retrieve?format=thumb
ID format: NUMBER-TEXT
To get the specific player (iframe) for an channel with a linear stream, you should request:
URL: /channels/[ID]/play?format=auto
ID: format NUMBER-TEXT
You can add the parameter “program=ID”, when you wish to open a specific program if the channel has DVR enabled
To view channels with live events, you may perform the call:
method: GET
URL: /management/channels/live_streams.json
RETURN: { "code": "ok", "error": true/false, "live_streams": [ { "LIVE STREAMS INFO" } ] }
Adding comments to a program on a live channel can be done using the following method:
method: POST
URL: /channels/[CHANNEL_ID]/programs/[PROGRAM_ID]/comments.json # ID consists of NUMBER-TEXT
PARAMETERS: { “comment”: { “content”: “COMMENTS CONTENT” } }
You can remove a comment using the request:
method: DELETE
URL: /channels/[CHANNEL_ID]/programs/[PROGRAM_ID]/comments/[ID].json # Channel ID, program ID and comment ID consist of NUMBER-TEXT
To get the comment replies:
method: GET
URL: /channels/[CHANNEL_ID]/programs/[PROGRAM_ID]/comments/[ID].json # Channel ID, program 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: /channels/[CHANNEL_ID]/programs/[PROGRAM_ID]/ratings.json # ID – NUMBER-TEXT
PARAMETERS: { “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none }
And rating a comment:
method: POST
URL: /channels/[CHANNEL_ID]/programs/[PROGRAM_ID]/comments/[ID]/ratings.json # ID – NUMBER-TEXT
PARAMETERS: { “rating”: [“”|”up”|”down”] # “up” = like, “down” = dislike, “” = none }
Performing the following calls, you can add or remove user groups to a specific channel:
method: POST
URL: /management/channels/[CHANNEL_ID]/add_user_group/[USER_GROUP_ID].json # ID consists of NUMBER-TEXT
method: POST
URL: /management/channels/[CHANNEL_ID]/remove_user_group/[USER_GROUP_ID].json # ID consists of NUMBER-TEXT
It is also possible to add or remove a contributor user from a channel:
method: POST
URL: /management/channels/[CHANNEL_ID]/add_contributor/[CONTRIBUTOR_ID].json
RETURN: { "code": "ok", #In case of an error, a message will be displayed "error": true/false }
method: POST
URL: /management/channels/[CHANNEL_ID]/remove_contributor/[CONTRIBUTOR_ID].json
RETURN: { "code": "ok", #In case of an error, a message will be displayed "error": true/false }
Performing the following calls, you can add or remove media to a specific channel:
method: POST
URL: /management/channels/[CHANNEL_ID]/add_media/[MEDIA_ID].json # ID consists of NUMBER-TEXT
PARAMETERS: { "media_type": ["Audio" | "Video" | "Embed" | "Event" | "Archive" | "Page" | "Playlist"| "Quiz"] } RETURN: { "code": "ok", #In case of an error, a message will be displayed "error": true/false, "status": true/false }
method: POST
URL: /management/channels/[CHANNEL_ID]/remove_media/[MEDIA_ID].json
PARAMETERS: { "media_type": ["Audio" | "Video" | "Embed" | "Event" | "Archive" | "Page" | "Playlist"| "Quiz"] } RETURN: { "code": "ok", #In case of an error, a message will be displayed "error": true/false, "status": true/false }
To delete a channel:
method: DELETE
URL: /management/channels/[CHANNEL_ID].json # ID consists of NUMBER-TEXT
To update a channel:
method: PUT
URL: /management/channels/[CHANNEL_ID].json # ID consists of NUMBER-TEXT
PARAMETERS: { "channel": { "name": "UPDATED NAME" "description": "UPDATED DESCRIPTION" } } RETURN: { "channel": { "CHANNEL INFORMATION" } }
To create a new channel:
method: POST
URL: /management/channels.json
PARAMETERS: { "channel": { "name": "NAME", "description": "DESCRIPTION", "promote": true/false, # Promote at Home Page "demote": true/false, # Do not show at Home Page "security": ["public" | "private" | "restricted"] "status": ["available" | "unavailable"] } } RETURN: { "code": "ok", #In case of an error, a message will be displayed "error" true/false, "channel": { "CHANNEL INFORMATION" } }
<< Previous topic | Next topic >> |
---|