hey I was trying to use the api to display the trending movies for the week and it shows in the console but no matter what method I try I can't get it to display in Html
< HTML >
<code text herediv class="moviesContainer">
<div id="trending">
<javaScript>
const options = {
method: 'GET',
headers: {
accept: 'application/json',
Authorization: '<access token>'
}
};
fetch('https://api.themoviedb.org/3/trending/movie/week?language=en-US', options)
.then(response => response.json())
.then(response => console.log(response))
.then(data => {
document.getElementById('trending').textContent = JSON.stringify(data)
})
.catch(error => console.error(error));
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?