Error message

User warning: The following module is missing from the file system: fast_404. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /mnt/www/html/ooyala/docroot/includes/bootstrap.inc).

Lógica del programa para la representación de una pantalla de vista previa del programa

A continuación se presentan las consultas API y el pseudocódigo para crear una pantalla de "vista previa del programa".

Supongamos que desea mostrar en la pantalla "¿Qué ocurre en las próximas 24 horas?". A continuación se presentan las consultas API y la lógica para crearla.

  1. En primer lugar, utilice los parámetros de cadena de consulta para una ventana de tiempo en la ruta GET /v2/track_segments, incluyendo los detalles sobre los vídeos virtuales y sus metadatos. En el siguiente ejemplo, se ha dividido la línea para facilitar la lectura; en realidad, la llamada a la API es una única línea.
              
    [GET] /v2/track_segments?from_time=2013-08-01T00:00:00Z&to_time=2013-08-01T23:11:59&
    include=virtual_asset,virtual_asset.metadata
        

    Backlot devuelve una respuesta similar a la siguiente:

    {
     "items": [   {
       "created_at": "2013-01-28T20:52:12Z",
       "end_time": "2013-08-13T13:30:00Z",
       "track_id": "2162e39c331d40779176895f34e36af8",
       "external_id": "",
       "start_time": "2013-08-13T11:00:00Z",
       "virtual_asset": {
        "name": "Life with the Arts",
        "created_at": "2013-01-28T17:35:53Z",
        "external_id": "",
        "id": "53eed5ed1b734d30b364cf545d2c78c6",
        "metadata": {
         "bottom": "",
         "top": "",
         "middle": ""
        },
        "updated_at": "2013-02-04T16:28:39Z"
       },
       "broadcast_status": "",
       "id": "72b0f6799f664a469a44290993aad849",
       "updated_at": "2013-01-28T20:52:12Z",
       "status": "online"
      },   {
       "created_at": "2013-01-28T20:52:35Z",
       "end_time": "2013-08-24T13:30:00Z",
       "track_id": "2162e39c331d40779176895f34e36af8",
       "external_id": "",
       "start_time": "2013-08-13T11:00:00Z",
       "virtual_asset": {
        "name": "Life with the Arts",
        "created_at": "2013-01-28T17:35:53Z",
        "external_id": "",
        "id": "53eed5ed1b734d30b364cf545d2c78c6",
        "metadata": {
         "bottom": "",
         "top": "",
         "middle": ""
        },
        "updated_at": "2013-02-04T16:28:39Z"
       },
       "broadcast_status": "",
       "id": "8ab517ae4584762a83c212f3e600b10",
       "updated_at": "2013-01-28T21:42:18Z",
       "status": "offline"
      },   {
       "created_at": "2013-01-28T20:47:38Z",
       "end_time": "2013-08-13T13:30:00Z",
       "track_id": "2162e39c331d40779176895f34e36af8",
       "external_id": "",
       "start_time": "2013-08-13T11:00:00Z",
       "virtual_asset": {
        "name": "Life with the Arts",
        "created_at": "2013-01-28T17:35:53Z",
        "external_id": "",
        "id": "53eed5ed1b734d30b364cf545d2c78c6",
        "metadata": {
         "bottom": "",
         "top": "",
         "middle": ""
        },
        "updated_at": "2013-02-04T16:28:39Z"
       },
       "broadcast_status": "",
       "id": "e47b9e5f63d048e283dbbebf3b33f50b",
       "updated_at": "2013-01-28T20:47:38Z",
       "status": "online"
      },   {
       "created_at": "2013-01-28T21:01:57Z",
       "end_time": "2013-08-13T13:30:00Z",
       "track_id": "2162e39c331d40779176895f34e36af8",
       "external_id": "",
       "start_time": "2013-08-13T11:00:00Z",
       "virtual_asset": {
        "name": "Life with the Arts",
        "created_at": "2013-01-28T17:35:53Z",
        "external_id": "",
        "id": "53eed5ed1b734d30b364cf545d2c78c6",
        "metadata": {
         "bottom": "",
         "top": "",
         "middle": ""
        },
        "updated_at": "2013-02-04T16:28:39Z"
       },
       "broadcast_status": "",
       "id": "ecb02d1014bb46fdbcb55cfa87d2c860",
       "updated_at": "2013-01-28T21:01:57Z",
       "status": "online"
      }  ]
    }
         

    Ordenando Pruébelo

  2. Analice la respuesta de JSON para seguir la lógica de este pseudocódigo:
                
    For each track_asset in json.items:
        Render track_asset.virtual_asset.name
        Render track_asset.virtual_asset.metadata.fieldName
        .
        .
        .