Skip to content

Developers

How can we help you?

← Go back

Requirement

The requirement resource describes some high level attributes of a platform, such as the business model, or the territory.

A requirement looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<requirement>
  <id type="integer">123</id>
  <category>business_model</category>
  <value>SVOD</value>
  <link rel="self" href="https://movida.bebanjo.net/api/requirements/123"/>
</requirement>
{
  "resource_type": "requirement",
  "id": 123,
  "category": "business_model",
  "value": "SVOD",
  "self_link": "https://movida.bebanjo.net/api/requirements/123"
}

Valid attributes

  • category (required): Type of requirement.

  • value (required): Value for that type of requirement.

Get the requirements from a company

In the root resource, just do a GET to the URL in the requirements link:

<?xml version='1.0' encoding='utf-8' ?>
<movida>
  ...
  <link rel="requirements" href="https://movida.bebanjo.net/api/requirements"/>
  ...
</movida>
{
  "resource_type": "movida",
  // ...
  "requirements_link": "https://movida.bebanjo.net/api/requirements",
  // ...
}
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/requirements
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/requirements

And:

<?xml version="1.0" encoding="UTF-8"?>
<requirements type="array">
  <total-entries>326</total-entries>
  <link rel="next" href="https://movida.bebanjo.net/api/requirements?page=2"/>
  <requirement>
    <id type="integer">9</id>
    <category>business_model</category>
    <value>TVOD</value>
    <link rel="self" href="https://movida.bebanjo.net/api/requirements/9"/>
  </requirement>
  <requirement>
    <id type="integer">10</id>
    <category>business_model</category>
    <value>SVOD</value>
    <link rel="self" href="https://movida.bebanjo.net/api/requirements/10"/>
  </requirement>
  <requirement>
    <id type="integer">11</id>
    <category>network</category>
    <value>Disney Channel</value>
    <link rel="self" href="https://movida.bebanjo.net/api/requirements/11"/>
  </requirement>
  <requirement>
    <id type="integer">12</id>
    <category>network</category>
    <value>Disney Junior</value>
    <link rel="self" href="https://movida.bebanjo.net/api/requirements/12"/>
  </requirement>
  <!-- ... -->
</requirements>
{
  "total_entries": 326,
  "next_link": "https://movida.bebanjo.net/api/requirements?page=2",
  "entries": [
    {
      "resource_type": "requirement",
      "id": 9,
      "category": "business_model",
      "value": "TVOD",
      "self_link": "https://movida.bebanjo.net/api/requirements/9"
    },
    {
      "resource_type": "requirement",
      "id": 10,
      "category": "business_model",
      "value": "SVOD",
      "self_link": "https://movida.bebanjo.net/api/requirements/10"
    },
    {
      "resource_type": "requirement",
      "id": 11,
      "category": "network",
      "value": "Disney Channel",
      "self_link": "https://movida.bebanjo.net/api/requirements/11"
    },
    {
      "resource_type": "requirement",
      "id": 12,
      "category": "network",
      "value": "Disney Channel",
      "self_link": "https://movida.bebanjo.net/api/requirements/12"
    },
    // ...
  ]
}

Get the requirements from a platform

Given an existing platform, just do a GET to the URL in the requirements link:

<?xml version='1.0' encoding='utf-8' ?>
<platform>
  <id type="integer">1</id>
  <name>Mediagenix On-Demand Movies</name>
  <link rel="requirements" href="https://movida.bebanjo.net/api/platforms/1/requirements"/>
  ...
</platform>

{
  "resource_type": "platform",
  "id": 1,
  "name": "Mediagenix On-Demand Movies",
  // ...
  "requirements_link": "https://movida.bebanjo.net/api/platforms/1/requirements",
  // ...
}
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/platforms/1/requirements
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/platforms/1/requirements

And:

<?xml version="1.0" encoding="UTF-8"?>
<requirements type="array">
  <requirement>
    <id type="integer">10</id>
    <category>business_model</category>
    <value>SVOD</value>
    <link rel="self" href="https://movida.bebanjo.net/api/requirements/10"/>
  </requirement>
  <requirement>
    <id type="integer">11</id>
    <category>network</category>
    <value>Disney Channel</value>
    <link rel="self" href="https://movida.bebanjo.net/api/requirements/11"/>
  </requirement>
</requirements>
{
  "entries": [
    {
      "resource_type": "requirement",
      "id": 10,
      "category": "business_model",
      "value": "SVOD",
      "self_link": "https://movida.bebanjo.net/api/requirements/10"
    },
    {
      "resource_type": "requirement",
      "id": 11,
      "category": "network",
      "value": "Disney Channel",
      "self_link": "https://movida.bebanjo.net/api/requirements/11"
    }
  ]
}