Skip to content

Developers

How can we help you?

← Go back

Schedule

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

The schedule contains all the scheduled titles for a given platform, title_group, title or asset.

This is how the schedule, as seen from a platform looks:

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
  <link rel="schedulings" href="https://movida.bebanjo.net/api/platforms/1/schedule/schedulings"/>
  <link rel="platform" href="https://movida.bebanjo.net/api/platforms/1"/>
</schedule>
{
  "resource_type": "schedule",
  "schedulings_link": "https://movida.bebanjo.net/api/platforms/1/schedule/schedulings",
  "platform_link": "https://movida.bebanjo.net/api/platforms/1"
}

This is how it would look, if you would access the schedule of a title group:

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
  <link rel="schedulings" href="https://movida.bebanjo.net/api/title_groups/181/schedule/schedulings"/>
  <link rel="title_group" href="https://movida.bebanjo.net/api/title_groups/181"/>
</schedule>
{
  "resource_type": "schedule",
  "schedulings_link": "https://movida.bebanjo.net/api/title_groups/181/schedule/schedulings",
  "title_group_link": "https://movida.bebanjo.net/api/title_groups/181"
}

This is how it would look, if you would access the schedule of a title:

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
  <link rel="schedulings" href="https://movida.bebanjo.net/api/titles/578/schedule/schedulings"/>
  <link rel="title" href="https://movida.bebanjo.net/api/titles/578"/>
</schedule>
{
  "resource_type": "schedule",
  "schedulings_link": "https://movida.bebanjo.net/api/titles/578/schedule/schedulings",
  "title_link": "https://movida.bebanjo.net/api/titles/578"
}

And finally, from a asset:

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
  <link rel="schedulings" href="https://movida.bebanjo.net/api/assets/4328/schedule/schedulings"/>
  <link rel="asset" href="https://movida.bebanjo.net/api/assets/4328"/>
</schedule>
{
  "resource_type": "schedule",
  "schedulings_link": "https://movida.bebanjo.net/api/assets/4328/schedule/schedulings",
  "asset_link": "https://movida.bebanjo.net/api/assets/4328"
}

Notice how, in each case, it references its scope; whether you are looking at the schedule of a platform, a title, a title group or an asset.

Most of the time you access the schedule it will be to take a look at its schedulings. Remember you can use the expand parameter in the same request to obtain the schedulings in the same response.

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/titles/578/schedule?expand=schedulings
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/titles/578/schedule?expand=schedulings

Would yield something like:

<?xml version='1.0' encoding='utf-8' ?>
<schedule>
  <link rel="schedulings" href="https://movida.bebanjo.net/api/titles/578/schedule/schedulings">
    <schedulings type="array">
      <scheduling>
        <id type="integer">14167160</id>
        <!-- ... -->
      </scheduling>
    <!-- ... -->
    </schedulings>
  </link>
  <link rel="title" href="https://movida.bebanjo.net/api/titles/578"/>
</schedule>
{
  "resource_type": "schedule",
  "schedulings_link": "https://movida.bebanjo.net/api/titles/578/schedule/schedulings",
  "schedulings": {
    "entries": [
      {
        "resource_type": "scheduling",
        "id": 14167160,
        // ...
      },
      // ...
    ]
  },
  "title_link": "https://movida.bebanjo.net/api/titles/578"
}

Browsing all schedules at once

Also if you would want to browse the whole schedule for many platforms at once, you would be able to do it from the root resource (https://movida.bebanjo.net/api/schedule). This time, the schedule is not scoped like in the examples above.

<?xml version="1.0" encoding="UTF-8"?>
<schedule>
  <link rel="schedulings" href="https://movida.bebanjo.net/api/schedule/schedulings"/>
</schedule>
{
  "resource_type": "schedule",
  "schedulings_link": "https://movida.bebanjo.net/api/schedule/schedulings"
}

However, when browsing the schedule, it’s not possibe to expand in the same request its schedulings.

<link rel="schedulings" href="https://movida.bebanjo.net/api/schedule/schedulings"/>
  "schedulings_link": "https://movida.bebanjo.net/api/schedule/schedulings"

To see all the schedule’s schedulings, you would to issue a new request to the schedulings link. And its response, unlike with titles, title_groups, platforms or assets’ schedules, will be paginated:

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/schedule/schedulings
$ curl --digest -u robot_user:password -H "Accept: application/json" https://movida.bebanjo.net/api/schedule/schedulings
<?xml version="1.0" encoding="UTF-8"?>
<schedulings type="array">
  <total-entries>125000</total-entries>
  <link rel="next" href="https://movida.bebanjo.net/api/schedule/schedulings?after=12345"/>
  <scheduling>
    <!-- ... -->
  </scheduling>
  <!-- ... -->
</schedulings>
{
  "total_entries": 125000,
  "next_link": "https://movida.bebanjo.net/api/schedule/schedulings?after=12345",
  "entries": [
    {
      "resource_type": "scheduling",
      "id": 1,
      // ...
    },
    // ...
  ]
}