DEV/DEV4.1/tp3/ex1/js/model.js

10 lines
189 B
JavaScript
Raw Normal View History

2024-03-12 10:45:12 +01:00
let apiKey = 'a776e2df'
let model = {
getMovies(search){
return fetch(`https://www.omdbapi.com/?apikey=${apiKey}&s=${search}`).then(reponse=>reponse.json());
}
}
export default model