export type UpdateApiPodcastBotPodcastsPodcastKeyRecordingScheduleEnableArgs = {podcastKey: string}; export type UpdateApiPodcastBotPodcastsPodcastKeyRecordingScheduleEnableOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Enable podcast recording schedule * * PUT /podcast-bot/podcasts/{podcastKey}/recordingSchedule/enable */ export const updateApiPodcastBotPodcastsPodcastKeyRecordingScheduleEnable = async (args: UpdateApiPodcastBotPodcastsPodcastKeyRecordingScheduleEnableArgs, options?: UpdateApiPodcastBotPodcastsPodcastKeyRecordingScheduleEnableOptions) => { const {baseUrl = "https://api.zeno.fm", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/podcast-bot/podcasts/${encodeURIComponent(String(args.podcastKey))}/recordingSchedule/enable${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };