You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.5 KiB
47 lines
1.5 KiB
<html>
|
|
<head>
|
|
<title>
|
|
Search Movies
|
|
</title>
|
|
<!--<link rel="stylesheet" href="searchstyle.css">-->
|
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
<script src="movies.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<div id="Container"></div>
|
|
</div>
|
|
<script>
|
|
async function moviePage(e){
|
|
|
|
var Token=window.localStorage.getItem('Token');
|
|
const searchParams = new URLSearchParams(window.location.search);
|
|
const movieId = searchParams.get("movieId");
|
|
try {
|
|
const response = await fetch('https://mkr.thefeathers.in/movie/'+movieId, {
|
|
method: 'GET',
|
|
headers: new Headers({'Authentication': Token }),
|
|
});
|
|
const data3 = await response.json();
|
|
//Success code goes here
|
|
alert(JSON.stringify(data3));
|
|
var results1 =data3.results;
|
|
|
|
document.getElementById("Container").append(results1.movieId);
|
|
document.getElementById("Container").append(results1.title);
|
|
document.getElementById("Container").append(results1.overview);
|
|
document.getElementById("Container").append(results1.poster);
|
|
document.getElementById("Container").append(results1.release);
|
|
document.getElementById("Container").append(results1.watchStatus);
|
|
document.getElementById("Container").append(results1.rating);
|
|
|
|
window.addEventListener("load", moviePage);
|
|
|
|
}
|
|
catch (err) {
|
|
//Failure
|
|
alert('Error');
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|