Files
TD_Portfolio/Movie/assets/js/api.js
T
Tomas Dvorak 882f91ebf6 first commit
2025-01-04 11:45:15 +01:00

12 lines
349 B
JavaScript

'use strict';
const api_key = '054582e9ee66adcbe911e0008aa482a8';
const imageBaseURL = 'https://image.tmdb.org/t/p/';
const fetchDataFromServer = function (url, callback, optionalParam) {
fetch(url)
.then(response => response.json())
.then(data => callback(data, optionalParam));
}
export { imageBaseURL, api_key, fetchDataFromServer };