diff --git a/test.js b/test.js deleted file mode 100644 index 3f91394..0000000 --- a/test.js +++ /dev/null @@ -1,47 +0,0 @@ - -function getBestFilm() { - let bestFilmTitle = document.querySelector(".title h2") - console.log(bestFilmTitle.textContent) -} - -getBestFilm() - -async function afficherFilms() { - for (let j = 1; j<10; j++) { - const response = await fetch(`http://localhost:8000/api/v1/titles/?format=json&page=${j}`); - const film = await response.json(); - for (let i in film.results) { - console.log(film.results[i].title); - } -//return response.json(); - } -} - -bestFilm() -let bestTitle = document.querySelector(".title h2") -console.log(bestTitle) -let bestPic = document.querySelector(".affiche img") -let bestDesc = document.getElementById("description") -console.log(bestPic) - -async function bestFilm() { - const response = await fetch("http://localhost:8000/api/v1/titles/118710") - const film = await response.json(); - bestTitle.innerText = film.original_title - bestPic.setAttribute("src", film.image_url) - bestDesc.innerText = film.description - let detailHeader = ` -