We use cookies (just for analytics) on this website. If you continue we will assume you are happy with it. ok

BeBanjo

Back to index

Playlist

The playlist resource represents a collection of playlist Entries, which represent the pieces of content that should be played in that list.

A playlist looks like this:

<?xml version='1.0' encoding='utf-8' ?>
<playlist>
  <id type="integer">10</id>
  <link rel="self" href="https://movida.bebanjo.net/api/playlists/10"/>
  <link rel="playlist-entries" href="https://movida.bebanjo.net/api/playlists/10/playlist-entries">
</playlist>

Get a playlist

Playlists are linked in scheduling resource. Like here:

<?xml version='1.0' encoding='utf-8' ?>
<scheduling>
  <!-- ... -->
  <link rel="playlist" href="https://movida.bebanjo.net/api/playlists/10"/>
</scheduling>

Follow that URL:

$ curl --digest -u robot_user https://movida.bebanjo.net/api/playlists/10

Would yield something like:

<?xml version='1.0' encoding='utf-8' ?>
<playlist>
  <id type="integer">10</id>
  <link rel="self" href="https://movida.bebanjo.net/api/playlists/10"/>
  <link rel="playlist-entries" href="https://movida.bebanjo.net/api/playlists/10/playlist-entries">
</playlist>

Get a list of playlist entries from a playlist

To get the list of entries of a playlist, the node with the rel attribute identified with the value playlist-entries should be followed:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/playlists/13/playlist-entries

And would yield something like:

<?xml version='1.0' encoding='utf-8' ?>
<playlist-entries>
  <playlist-entry>
    <id type="integer">10</id>
    <position>1</position>
    <link rel="self" href="https://movida.bebanjo.net/api/playlist-entries/10"/>
    <link rel="playlist" href="https://movida.bebanjo.net/api/playlists/13"/>
    <link rel="asset" href="https://movida.bebanjo.net/api/asset/23"/>
    <link rel="segment" href="https://movida.bebanjo.net/api/segment/2"/>
  </playlist-entry>
  <playlist-entry>
    <id type="integer">11</id>
    <position>2</position>
    <link rel="self" href="https://movida.bebanjo.net/api/playlist-entries/11"/>
    <link rel="playlist" href="https://movida.bebanjo.net/api/playlists/13"/>
    <link rel="asset" href="https://movida.bebanjo.net/api/asset/23"/>
  </playlist-entry>
</playlist-entries>

Last updated September 19th, 2017.