Obtention d'informations à propos d'une oeuvre ; Channel Dailymotion = music.
Importation de JQuery depuis code.jquery.com (nécessité connexion internet).
<!DOCTYPE html>
<html>
<head>
<!--<script src="./jquery-2.1.1.js"></script>-->
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
//https://api.dailymotion.com/video/xxt41x_glenn-gould-little-prelude-in-c-minor-bwv-934_music?fields=ratings_total,country,comments_total,created_time,description,geoloc,isrc,upc,views_last_day
//https://api.dailymotion.com/videos?channel=music&country=FR&sort=visited-hour
$.getJSON("https://api.dailymotion.com/video/xxt41x_glenn-gould-little-prelude-in-c-minor-bwv-934_music?fields=ratings_total,country,comments_total,created_time,description,geoloc,isrc,upc,views_last_day",
function( data ) {
console.log(data);
var items = [];
$.each( data, function( key, val ) {
console.log(key);
items.push( "<li id='" + key + "'>" + key + " : [" + val + "]</li>" );
});
$( "<ul/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "body" );
});
});</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>