Skip to content

Developers

How can we help you?

← Go back

Linear category

Note: Only Mediagenix On-Demand accounts configured for Planning will expose linear categories in the API.

The linear category resource refers to the category a linear program belongs to. Linear categories belong to a specific channel.

This is how a Linear program looks through the API:

<?xml version="1.0" encoding="UTF-8"?>
<linear-category>
  <id type="integer">128</id>
  <name>Drama</name>
  <link rel="self" href="https://movida.bebanjo.net/api/linear_categories/128"/>
  <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
</linear-category>
{
  "resource_type": "linear_category",
  "id": 128,
  "name": "Drama",
  "self_link": "https://movida.bebanjo.net/api/linear_categories/128",
  "channel_link": "https://movida.bebanjo.net/api/linear_channels/497"
}

Valid attributes

  • id (read only): Mediagenix On-Demand internal identifier of the linear category.

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

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

Get a list of all linear categories in a linear channel

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

$ curl --digest -u robot_user:password "https://movida.bebanjo.net/api/linear_channels/497/linear_categories"
$ curl --digest -u robot_user:password -H "Accept: application/json" "https://movida.bebanjo.net/api/linear_channels/497/linear_categories"

And would yield something like:

<?xml version="1.0" encoding="UTF-8"?>
<linear-categories type="array">
  <linear-category>
    <id type="integer">113</id>
    <name>Engie Benjy</name>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_categories/113"/>
    <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
  </linear-category>
  <linear-category>
    <id type="integer">114</id>
    <name>Florrie's Dragon's</name>
    <link rel="self" href="https://movida.bebanjo.net/api/linear_categories/114"/>
    <link rel="channel" href="https://movida.bebanjo.net/api/linear_channels/497"/>
  </linear-category>
  <!-- ... -->
{
  "entries": [
    {
      "resource_type": "linear_category",
      "id": 113,
      "name": "Engie Benjy",
      "self_link": "https://movida.bebanjo.net/api/linear_categories/113",
      "channel_link": "https://movida.bebanjo.net/api/linear_channels/497"
    },
    {
      "resource_type": "linear_category",
      "id": 114,
      "name": "Florrie's Dragon's",
      "self_link": "https://movida.bebanjo.net/api/linear_categories/114",
      "channel_link": "https://movida.bebanjo.net/api/linear_channels/497"
    }
  ]
}