| Support |

Playlists

Playlists – All playlists

Request URL: http://api.buto.tv/playlists/
Request Method: GET
Requires Authentication: Yes

Returns all playlists and smart playlists for an authenticated user’s account. These responses do not return full details of each video in the playlist, only the video id. For full details use the individual playlist API call. Successful requests return XML data and a 200 status code. Malformed or incorrect requests return a 400 range status code and error output.

<playlists>
<playlist>
<id>'String - 5 char ID'</id>
<name>'String'</name>
<playlist_type>'String - either standard or smart'
</playlist_type>
<start_with_playlist_selector>'Boolean'
</start_with_playlist_selector>
<randomise>'Boolean'</randomise>
<videos>
<video>'Video ID'</video>
<video>'Video ID'</video>
...
...
</videos>
</playlist>
<playlist>
...
</playlist>
</playlists>


Playlist – Individual Playlist

Request URL: http://api.buto.tv/playlists/{#playlist id}
Request Method: GET
Requires Authentication: No

An individual playlist, containing complete details for each video inside the playlist, can be returned by passing a valid playlist id in the URL. Passing an incorrect playlist id will return a 404 status code. A valid playlist id will return a 200 OK status code. Playlists are returned in the format below. Videos follow the full video XML structure detailed on the Videos page.

<!--
// Buto Playlists API - Playlist
// http://buto.tv/api/playlists/{#playlist id}
// Returns 200 status code for success
// Returns 404 Not Found for error
-->
<?xml version="1.0"?>
<playlist>
<id>'String'</id>
<name>'String'</name>
<playlist_type>'String - either standard or smart'
</playlist_type>
<start_with_playlist_selector>'Boolean'
</start_with_playlist_selector>
<randomise>'Boolean'</randomise>
<videos>
<video>
...
</video>
<video>
...
</video>
</videos>
</playlist>


Playlist – Create

Request URL: http://api.buto.tv/playlists/create
Request Method: POST
Requires Authentication: Yes

This API creates a new standard playlist on the system for the authenticated user. A title can optionally be passed as well as a list of videos to add to the playlist. Videos must be specified in the order they will appear in the playlist. A successful request will generate a 200 status code with XML output of the created playlist in full (including video details). Please note playlists are limited to 25 videos in length, any more will be disregarded. Sample implementation is shown below:

Request

XML Should be POSTed to the API in the format below, invalid or incorrectly formed requests will generate a 404 error code.

<!--
// Buto Playlists API - Create
// http://buto.tv/api/playlists/create
// Returns 200 status code for success
// Returns 404 Not Found for error
-->
<?xml version="1.0"?>
<playlist>
<name>'String'</name>
<playlist_type>'String - either standard or smart'
</playlist_type>
<start_with_playlist_selector>'Boolean'
</start_with_playlist_selector>
<randomise>'Boolean'</randomise>
<videos>
<video>'String - video ID'</video>
<video>'String - video ID'</video>
</videos>
</playlist>

Response

<!--
// Buto Playlists API - Create
// http://buto.tv/api/playlists/create
// Returns 200 status code for success
// Returns 404 Not Found for error
-->
<?xml version="1.0"?>
<playlist>
<id>'String'</id>
<name>'String'</name>
<videos>
<video>
...
</video>
<video>
...
</video>
</videos>
</playlist>