Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Load a CSV with local-first fallback.

      Tries joinURL(csvBaseURL, localPath) first. If the response is non-OK or yields zero rows, falls back to joinURL(fallbackURL, fallbackPath ?? localPath) when a fallbackURL is provided. Network errors are logged as warnings rather than thrown so the page can degrade gracefully when offline.

      URL joining is tolerant of missing trailing slashes on the base URL and leading slashes on the path; callers do not need to worry about the slash boundary.

      Parameters

      • csvBaseURL: string

        Base URL for the local-first CSV directory

      • fallbackURL: string

        Optional remote fallback URL (e.g. raw.githubusercontent.com mirror); empty string disables fallback

      • localPath: string

        Path relative to csvBaseURL

      • OptionalfallbackPath: string

        Optional path on the fallback host (defaults to localPath)

      Returns Promise<CSVRow[]>

      Parsed CSV rows; [] when no source returned data