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

Platform

Note: This resource links can be expanded using the expand option.

A platform is something like YouTube. Think of it as a place where videos can be published to. Sometimes these platforms are governed by a set of requirements (like under what business models it operates, or for what devices), but it is too early to talk about that.

Note: The metadata link is a deprecated feature, it is no longer supported and it will be removed soon.

In Movida land, a platform looks like this:

<?xml version='1.0' encoding='utf-8' ?>
<platform>
  <name>BeBanjo Movies</name>
  <link href="https://movida.bebanjo.net/api/platforms/1/schedule" rel="schedule"></link>
  <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/1/draft_schedules"/>
  <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/1/requirements"/>
  <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/1/metadata"/>
  <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/2"/>
</platform>

Get a list of all platforms

As you would expect, just do a GET /api/platforms:

$ curl --digest -u robot_user https://movida.bebanjo.net/api/platforms?pagination=true&per_page=10&page=1

And:

<?xml version='1.0' encoding='utf-8' ?>
<platforms type='array'>
  <platform>
    <name>BeBanjo Movies</name>
    <link href="https://movida.bebanjo.net/api/platforms/1/schedule" rel="schedule"></link>
    <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/1/draft_schedules"/>
    <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/1/requirements"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/1/metadata"/>
    <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/2"/>
  </platform>
  <platform>
    <name>YouTube</name>
    <link href="https://movida.bebanjo.net/api/platforms/2/schedule" rel="schedule"></link>
    <link rel="draft_schedules" href="https://movida.bebanjo.net/api/platforms/2/draft_schedules"/>
    <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/2/requirements"/>
    <link rel="metadata" href="https://movida.bebanjo.net/api/platforms/2/metadata"/>
    <link rel="outlet" href="https://movida.bebanjo.nett/api/outlets/3"/>
  </platform>
</platforms>

You can then follow the links to access their respective schedules.

Note: With pagination enabled, only 50 platforms will be included in each page by default. But you can override this by using the per_page parameter. The total-entries attribute will show the total number of entries and the links rel="next" and rel="prev" should be used to get to the next and the previous pages.

Valid attributes

  • pagination: If you want to enable pagination you need to provide a pagination parameter with a value of true. Note that by default, pagination is not enabled for this endpoint.

  • per_page: The number of elements returned in each page. The maximum value allowed is 200 and the default is 50. Only effective with pagination enabled.

  • page: The number of the page you want to get. Only effective with pagination enabled.

Last updated May 05th, 2017.