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 program

Note: Only Movida accounts configured for Planning will expose linear categories in the API.

The linear program resource represents a planned program to be emitted in a given channel.

This is how a Linear program looks through the API:

<?xml version="1.0" encoding="UTF-8"?>
<linear-program>
  <id type="integer">258071</id>
  <name>Claude, E28: PC Princess</name>
  <start type="datetime">2021-01-04T10:40:00+00:00</start>
  <end type="datetime">2021-01-04T10:55:00+00:00</end>
  <collection-position nil="true"/>
  <link rel="self" href="https://staging-movida.bebanjo.net/api/linear_programs/258071"/>
  <link rel="channel" href="https://staging-movida.bebanjo.net/api/linear_channels/497"/>
  <link rel="collection" href="https://staging-movida.bebanjo.net/api/linear_collections/5254"/>
  <link rel="category" href="https://staging-movida.bebanjo.net/api/linear_categories/119"/>
  <link rel="title" href="https://staging-movida.bebanjo.net/api/titles/1927539"/>
  <link rel="series" href="https://staging-movida.bebanjo.net/api/title_groups/10048989"/>
</linear-program>

Valid attributes

  • id (read only): Movida internal identifier of the linear program.

  • name (read only): the name of the linear program.

  • start (read only): timestamp representing when the linear program starts.

  • end (read only): timestamp representing when the linear program ends.

  • collection-position (read only, optional): define the position of the episode on the collection. The attribute is only present for episodes not linked to the catalog.

  • channel: The linear channel the linear program belongs to.

  • collection: The linear collection the linear program belongs to. This link is only present for episodes.

  • category: The linear category the linear program belongs to. This link is optional and it is only present when a category is associated.

  • title: The catalog title the linear program belongs to. This link is optional.

  • series: The catalog series the linear program belongs to. This link is optional.

Get a list of all linear programs in a linear channel for a range of dates

Linear programs are linked from a linear channel resource, through the link identified with the rel="linear_programs" attribute:

Note it is mandatory to filter the list of linear programs using the following parameters:

  • from: It will return only linear programs which start before the given date. The value has to be a valid ISO 8601 datetime (e.g. 2010-10-10T10:30:20Z). The Timezone is optional and when omitted the timezone of the channel will be used. When the timezone of the channel is missing, the timezone of the account will be used.

  • to: It will return only linear programs which end after the given date. The value has to be a valid ISO 8601 datetime (e.g. 2010-10-10T10:30:20Z). The Timezone is optional and when omitted the timezone of the channel will be used. When the timezone of the channel is missing, the timezone of the account will be used. The Time is also optional and when omitted the end time of the later day part or 23:59:59 will be used. If that day part is after midnight the date will be relative to the next day.

The both attributes can be combined and, when so, only the linear programs satisfying all the filters will be returned.

$ curl --digest -u robot_user:password "https://movida.bebanjo.net/api/linear_channels/497/linear_programs?from=2021-01-01&to=2021-01-15"

And would yield something like:

<?xml version="1.0" encoding="UTF-8"?>
<linear-programs type="array">
  <link rel="next" href="https://movida.bebanjo.net/api/linear_channels/497/linear_programs?after=eyJ2YWx1ZXMiOnsic3RhcnRzX2F0IjoiMjAyMS0wMS0wNVQwOTowMDowMCswMDowMCIsImlkIjoyNTU5NzB9fQ==&amp;&amp;from=2021-01-01&amp;to=2021-01-15"/>
  <linear-program>
    <id type="integer">255969</id>
    <name>Engie Benjy: S04, E01: Share and Share Alike</name>
    <start type="datetime">2021-01-04T09:00:00+00:00</start>
    <end type="datetime">2021-01-04T09:15:00+00:00</end>
    <collection-position nil="true"/>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_programs/255969"/>
    <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
    <link rel="collection" href="https://movida.bebanjo.net/api/linear_collections/5217"/>
    <link rel="category" href="https://movida.bebanjo.net/api/linear_categories/113"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/2025579"/>
    <link rel="series" href="https://movida.bebanjo.net/api/title_groups/10052924"/>
  </linear-program>
  <linear-program>
    <id type="integer">255970</id>
    <name>Engie Benjy: S04, E02: Hide and See Saw</name>
    <start type="datetime">2021-01-05T09:00:00+00:00</start>
    <end type="datetime">2021-01-05T09:15:00+00:00</end>
    <collection-position nil="true"/>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_programs/255970"/>
    <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
    <link rel="collection" href="https://movida.bebanjo.net/api/linear_collections/5217"/>
    <link rel="category" href="https://movida.bebanjo.net/api/linear_categories/113"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/2025591"/>
    <link rel="series" href="https://movida.bebanjo.net/api/title_groups/10052924"/>
  </linear-program>
  <!-- ... -->

Get a list of all linear programs in a linear collection

Linear programs are linked from a linear collection resource, through the link identified with the rel="linear_programs" attribute:

$ curl --digest -u robot_user:password "https://movida.bebanjo.net/api/linear_collections/5219/linear_programs?from=2021-01-01&to=2021-01-15"

And would yield something like:

<?xml version="1.0" encoding="UTF-8"?>
<linear-programs type="array">
  <link rel="next" href="https://movida.bebanjo.net/api/linear_collection/497/linear_programs?after=eyJ2YWx1ZXMiOnsic3RhcnRzX2F0IjoiMjAyMS0wMS0wNVQwOTowMDowMCswMDowMCIsImlkIjoyNTU5NzB9fQ==&amp;&amp;from=2021-01-01&amp;to=2021-01-15"/>
  <linear-program>
    <id type="integer">255969</id>
    <name>Engie Benjy: S04, E01: Share and Share Alike</name>
    <start type="datetime">2021-01-04T09:00:00+00:00</start>
    <end type="datetime">2021-01-04T09:15:00+00:00</end>
    <collection-position nil="true"/>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_programs/255969"/>
    <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
    <link rel="collection" href="https://movida.bebanjo.net/api/linear_collections/5219"/>
    <link rel="category" href="https://movida.bebanjo.net/api/linear_categories/113"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/2025579"/>
    <link rel="series" href="https://movida.bebanjo.net/api/title_groups/10052924"/>
  </linear-program>
  <linear-program>
    <id type="integer">255970</id>
    <name>Engie Benjy: S04, E02: Hide and See Saw</name>
    <start type="datetime">2021-01-05T09:00:00+00:00</start>
    <end type="datetime">2021-01-05T09:15:00+00:00</end>
    <collection-position nil="true"/>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_programs/255970"/>
    <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
    <link rel="collection" href="https://movida.bebanjo.net/api/linear_collections/5219"/>
    <link rel="category" href="https://movida.bebanjo.net/api/linear_categories/113"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/2025591"/>
    <link rel="series" href="https://movida.bebanjo.net/api/title_groups/10052924"/>
  </linear-program>
  <!-- ... -->

Last updated April 01th, 2021.