SAE temp api file change

This commit is contained in:
Simon SAYE BABU 2024-03-13 10:53:49 +01:00
parent 8ad139de87
commit 67a5cd7df0

View File

@ -5,7 +5,7 @@ key = "92f0f56afffd55f39d43937ed6899e00";
let URL = "https://api.themoviedb.org/3/";
function recherche(input,page_index) {
function research(input,page_index) {
return fetch(URL + "search/multi?query="+ input +"&api_key=" + key + "&page=" + page_index + "&language=fr")
.then(response => response.json())
.then(data => data);
@ -51,20 +51,6 @@ function popTV(page_index) {
console.log(response.json)
}
function trendTV(page_index) {
return fetch(URL + "trending/tv/day?&api_key=" + key + "&page=" + page_index + "&language=fr")
.then(response => response.json())
.then(data => data);
console.log(response.json)
}
function topTV(page_index) {
return fetch(URL + "tv/top_rated?&api_key=" + key + "&page=" + page_index + "&language=fr")
.then(response => response.json())
.then(data => data);
console.log(response.json)
}
function todayTV(page_index) {
return fetch(URL + "tv/airing_today?&api_key=" + key + "&page=" + page_index + "&language=fr")
.then(response => response.json())
@ -79,6 +65,28 @@ function todayTV(page_index) {
console.log(response.json)
}
function topTV(page_index) {
return fetch(URL + "tv/top_rated?&api_key=" + key + "&page=" + page_index + "&language=fr")
.then(response => response.json())
.then(data => data);
console.log(response.json)
}
//People
function findPeopleID(id) {
return fetch(URL + "person/"+ id +"?&api_key=" + key + "&language=fr")
.then(response => response.json())
.then(data => data);
console.log(response.json)
}
function findPeopleName(name,page_index) {
return fetch(URL + "search/person?query="+ name +"?&api_key=" + key + "&page=" + page_index + "&language=fr")
.then(response => response.json())
.then(data => data);
console.log(response.json)
}
</script>