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).

Obtener contenido de tendencias

Las tendencias les permiten a los espectadores descubrir qué vídeos son populares o han cobrado una relevancia significativa durante el período de tiempo que especifique.

Para obtener contenido de tendencias:

  1. Seleccione una de las siguientes opciones:
    • Obtenga los vídeos más populares.

      El siguiente ejemplo devuelve los cinco vídeos más populares del día en todos los países:

      [GET] /v2/discover/trending/top?countries=all&time=now&window=day&limit=5
      
    • Obtenga los vídeos con mayor relevancia.

      El siguiente ejemplo devuelve los cinco vídeos con mayor relevancia del día en todos los países:

      [GET] /v2/discover/trending/momentum?countries=all&time=now&window=day&limit=5
      

    Backlot devuelve una respuesta similar a la siguiente:

    		{
    		  "results": [
    		    {
    		      "name": "Cat Video #145678434",
    		      "description": "More cats!",
    		      "embed_code": "Z2dnRsNDrcK-TYHGlFIZuTlPoDZ_QkW3",
    		      "external_id": "cat:7880638",
    		      "preview_image_url": "http://catscatscats.com/images/catvideo145678434.jpg",
    		      "duration": "91000",
    		      "hostedAtURL": null,
    		      "bucket_info": "1{\"encoded\":\"eNpNjtsKhCAQht9lrmNR1+zwMiElrVAqOhtE27vv2Abr3fynjzkg6GgcDlsY\\n7tyRdfIlHNJw9oQKz5RT3YKDnFQQTRzL0TJI9WF2BXmYfLb7WgUh6TdAf\\nMEft3osmeydkxqBdaQF0pdFHcwMBfSCLhmjRepdy5SyZTl87pB+nRNVoxmGx\\nCa9Pn13N1e/TPislxF+1jZRFJmTRbEVTZG3HbgXnF+k0UNc=\",\"position\":0}",
    		      "reason": "top"
    		    },
    		    {
    		      "name": "Cat Video #145678435",
    		      "description": "Even more cats!",
    		      "embed_code": "Z2dnRsNDrcK-ZaRTYhuTlPoDZ_tyrD",
    		      "external_id": "cat:7880638",
    		      "preview_image_url": "http://catscatscats.com/images/catvideo145678435.jpg",
    		      "duration": "91000",
    		      "hostedAtURL": null,
    		      "bucket_info": "1{\"encoded\":\"eNpNjtsKhCAQht9lrmNR1+zwMiElrVAqOhtE27vv2Abr3fynjzkg6GgcDlsY\\n7tyRdfIlHNJw9oQKz5RT3YKDnFQQTRzL0TJI9WF2BXmYfLb7WgUh6TdAf\\nMEft3osmeydkxqBdaQF0pdFHcwMBfSCLhmjRepdy5SyZTl87pB+nRNVoxmGx\\nCa9Pn13N1e/TPislxF+1jZRFJmTRbEVTZG3HbgXnF+k0UNc=\",\"position\":1}",
    		      "reason": "top"
    		    },
    		    {
    		      "name": "Cat Video #145678436",
    		      "description": "Yet even more cats!",
    		      "embed_code": "Z2dnRsNDrcK-ZaZrlFIZuTlPoDZ_RTfs",
    		      "external_id": "cat:7880638",
    		      "preview_image_url": "http://catscatscats.com/images/catvideo145678436.jpg",
    		      "duration": "91000",
    		      "hostedAtURL": null,
    		      "bucket_info": "1{\"encoded\":\"eNpNjtsKhCAQht9lrmNR1+zwMiElrVAqOhtE27vv2Abr3fynjzkg6GgcDlsY\\n7tyRdfIlHNJw9oQKz5RT3YKDnFQQTRzL0TJI9WF2BXmYfLb7WgUh6TdAf\\nMEft3osmeydkxqBdaQF0pdFHcwMBfSCLhmjRepdy5SyZTl87pB+nRNVoxmGx\\nCa9Pn13N1e/TPislxF+1jZRFJmTRbEVTZG3HbgXnF+k0UNc=\",\"position\":2}",
    		      "reason": "top"
    		    },
    		    {
    		      "name": "Cat Video #145678437",
    		      "description": "Can you believe it?",
    		      "embed_code": "Z2dnRsNDrcK-ZaZrlFITYnrPoDZ_RFtg",
    		      "external_id": "cat:7880638",
    		      "preview_image_url": "http://catscatscats.com/images/catvideo145678437.jpg",
    		      "duration": "91000",
    		      "hostedAtURL": null,
    		      "bucket_info": "1{\"encoded\":\"eNpNjtsKhCAQht9lrmNR1+zwMiElrVAqOhtE27vv2Abr3fynjzkg6GgcDlsY\\n7tyRdfIlHNJw9oQKz5RT3YKDnFQQTRzL0TJI9WF2BXmYfLb7WgUh6TdAf\\nMEft3osmeydkxqBdaQF0pdFHcwMBfSCLhmjRepdy5SyZTl87pB+nRNVoxmGx\\nCa9Pn13N1e/TPislxF+1jZRFJmTRbEVTZG3HbgXnF+k0UNc=\",\"position\":3}",
    		      "reason": "top"
    		    },
    		    {
    		      "name": "Dog Video #0000001",
    		      "description": "Dogs",
    		      "embed_code": "Z2dnRsNDrcK-ZaZrlFIZuTlPoDZ_tyHG",
    		      "external_id": "dog:0000001",
    		      "preview_image_url": "http://catscatscats.com/images/dogvideo0000001.jpg",
    		      "duration": "91000",
    		      "hostedAtURL": null,
    		      "bucket_info": "1{\"encoded\":\"eNpNjtsKhCAQht9lrmNR1+zwMiElrVAqOhtE27vv2Abr3fynjzkg6GgcDlsY\\n7tyRdfIlHNJw9oQKz5RT3YKDnFQQTRzL0TJI9WF2BXmYfLb7WgUh6TdAf\\nMEft3osmeydkxqBdaQF0pdFHcwMBfSCLhmjRepdy5SyZTl87pB+nRNVoxmGx\\nCa9Pn13N1e/TPislxF+1jZRFJmTRbEVTZG3HbgXnF+k0UNc=\",\"position\":4}",
    		      "reason": "top"
    		    }
    		  ]}
        

    Ordenando Pruébelo

  2. Obtenga la información de cada resultado para generar el contenido de la página web. El siguiente ejemplo incluye contenido HTML simple.
    <div class="sidebar">
        <h4 class="sidebar-head">Popular Now</h4>
        <ul>
            <li>
                <p><a href="/video/Z2dnRsNDrcK-TYHGlFIZuTlPoDZ_QkW3">Cat Video #145678434</a></p>
                <p>More cats!</p>
            </li>
            <li>
                <p><a href="/video/Z2dnRsNDrcK-ZaRTYhuTlPoDZ_tyrD">Cat Video #145678435</a></p>
                <p>Even more cats!</p>
            </li>        
            <li>
                <p><a href="/video/Z2dnRsNDrcK-ZaZrlFIZuTlPoDZ_RTfs">Cat Video #145678436</a></p>
                <p>Yet even more cats!</p>
            </li>
            <li>
                <p><a href="/video/Z2dnRsNDrcK-ZaZrlFITYnrPoDZ_RFtg">Cat Video #145678437</a></p>
                <p>Can you believe it?</p>
            </li>
            <li>
                <p><a href="/video/Z2dnRsNDrcK-ZaZrlFIZuTlPoDZ_tyHG">Dog Video #0000001</a></p>
                <p>Dogs.</p>
            </li>
        </ul>
    </div>