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

Linear channel

Note: Only Movida accounts configured for catch-up will expose linear channels in the API.

A linear channel is a standard channel on a TV network which displays programming sequentially in a non-interactive fashion (i.e. the customer cannot decide what to see when, as opposed to in a platform). Examples of Linear Channels would be BBC 1, LaSexta or National Geographic.

This is how a Linear Channel looks through the API:

<?xml version="1.0" encoding="UTF-8"?>
<linear-channel>
  <id type="integer">3</id>
  <name>Channel 5</name>
  <external-id>C5</external-id>
  <link rel="self" href="https://movida.bebanjo.net/api/linear_channels/3"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/linear_channels/3/linear_schedulings"/>  
</linear-channel>

Get a list of all linear channels in the current account

Linear channels are linked from the root of the API, through the link identified with the rel="linear_channels" attribute:

<?xml version="1.0" encoding="UTF-8"?>
<movida>
  <!-- ... -->
  <link rel="linear_channels" href="https://movida.bebanjo.net/api/linear_channels">
</movida>

Following that link, we can fetch the list of linear channels in the current account.

$ curl --digest -u robot_user:password http://movida.bebanjo.net/api/linear_channels
<?xml version="1.0" encoding="UTF-8"?>
<linear-channels>
  <linear-channel>
    <id type="integer">3</id>
    <name>BBC 1</name>
    <external-id>BBC1</external-id>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_channels/3"/>
    <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/linear_channels/3/linear_schedulings"/>  
  </linear-channel>
  <linear-channel>
    <id type="integer">4</id>
    <name>BBC 2</name>
    <external-id>BBC2</external-id>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_channels/4"/>
    <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/linear_channels/4/linear_schedulings"/>  
  </linear-channel>
</linear-channels>

You can also filter the list using the following attribute:

  • external_id: This attribute can be used to store the ID of that specific channel in an external system.
$ curl --digest -u robot_user http://movida.bebanjo.net/api/linear_channels?external_id=BBC2
<?xml version="1.0" encoding="UTF-8"?>
<linear-channels>
  <linear-channel>
    <id type="integer">4</id>
    <name>BBC 2</name>
    <external-id>BBC2</external-id>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_channels/4"/>
    <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/linear_channels/4/linear_schedulings"/>  
  </linear-channel>
</linear-channels>

Get a single linear channel given its URL

The self link of a Linear Channel contains a URL that will allow us to fetch that individual linear channel:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/linear_channels/4
<?xml version="1.0" encoding="UTF-8"?>
<linear-channel>
  <id type="integer">3</id>
  <name>BBC 1</name>
  <external-id>BBC1</external-id>
  <link rel="self" href="https://movida.bebanjo.net/api/linear_channels/3"/>
  <link rel="linear_schedulings" href="https://movida.bebanjo.net/api/linear_channels/3/linear_schedulings"/>  
</linear-channel>

Last updated March 31st, 2017.