import type { APIResponse, Vod } from "../types.ts"; import { API_URL, apiFetch } from "./client.ts"; const getVods = async (): Promise => { const result = await apiFetch(API_URL + '/api/v1/vods'); if (result.status === 'error') throw new Error(`Failed to fetch vods: ${result.message}`); return result.data; }; const getVodById = async (id: string): Promise => { const result = await apiFetch(API_URL + `/api/v1/vods/${id}`); if (result.status === 'error') throw new Error(`Failed to fetch vod: ${result.message}`); return result.data; }; // URL for the raw media stream. The