Closed Captions
Closed Captions – All for a video
Request URL: http://api.buto.tv/captions/video/{#video id}
Request Method: GET
Requires Authentication: Yes
This request returns all captions (along with transcript) for the media file associated with the passed video id. If no video id is passed a status code in the 400 range will be returned. Returned XML structure is shown below:
<!--
// Buto Closed Captions API
// http://buto.tv/api/captions/video/{#video id}
// Success returns 200 OK status
// Error returns 404 Not Found
-->
<? xml version="1.0" encoding="UTF-8" ?>
<captions>
<caption>
...
</caption>
<caption>
...
</caption>
</captions>
Closed Captions – Single caption transcript
Request URL: http://api.buto.tv/captions/{#caption id}
Request Method: GET
Requires Authentication: No
Returns all details for the caption specified, if an incorrect caption id is passed a status code in the 400 range will be returned as well as an error message. Returned XML structure is shown below:
<!--
// Buto Closed Captions API
// http://buto.tv/api/captions/{#caption id}
// Success returns 200 OK status
// Error returns 404 Not Found
-->
<? xml version="1.0" encoding="UTF-8" ?>
<caption>
</caption>
Closed Captions – Returned XML structure
All caption responses will be returned in the structure shown below, the transcript tag can have 0 or more caption line entries, all are ordered by timecode
<caption>
<id>'String - 7 char id'</id>
<name>'String'</name>
<created_at>'ISO date'</created_at>
<creator_id>'String'</creator_id>
<transcript_url>'String'</transcript_url>
<transcript>
<line start="5" end="15">'String - body of the caption'</line>
<line start="25" end="30">'String - body of the caption'</line>
</transcript>
</caption>