I am trying to access specific locations (time-zone) tv series, i have done something like this on the url but however even I change the time zone string to different place
I get te same response for Airing Today and On Air(TV) Api calls
interface FetchParams {
pageParam: number;
// NEW: Optional timezone parameter
timezone?: "Europe/Istanbul"; // e.g., "Europe/London", "America/New_York"
}
const fetchTVSeries = async (
endpoint: string,
{ pageParam, timezone }: FetchParams // Destructure timezone here
): Promise<TVShow[]> => {
// Construct the base URL with language and page
let url = `https://api.themoviedb.org/3/tv/${endpoint}?language=en-US&page=${pageParam}`;
// NEW: Conditionally add timezone if provided
if (timezone) {
url += `&timezone=${encodeURIComponent(timezone)}`;
}
export const fetchOnTheAirTVSeries = (params: FetchParams) =>
fetchTVSeries("on_the_air", params);
export const fetchAiringTodayTVSeries = (params: FetchParams) =>
fetchTVSeries("airing_today", params);
How can I find solution to this ?
Es fehlt ein Film oder eine Serie? Logge dich ein zum Ergänzen.
Diesen Eintrag bewerten oder zu einer Liste hinzufügen?
Kein Mitglied?