@maschinenlesbar.org/govdata-cli
    Preparing search index...

    Class GovDataClient

    Index
    • Call any CKAN action by name and return its unwrapped result. Throws a GovDataActionError if the envelope reports success: false. An invalid action name, a blank parameter name or a blank parameter value (or list entry) rejects with GovDataValidationError before any request.

      Type Parameters

      Parameters

      Returns Promise<T>

    • Dataset names, paged with limit/offset (a positive limit; omit it for all).

      Parameters

      • params: Pick<ListParams, "limit" | "offset"> = {}

      Returns Promise<string[]>

    • Full-text / faceted dataset search.

      Filters always go out as CKAN's fq_list, each applied as its own Solr filter query (all must match). Not as fq: CKAN reads a repeated fq= key as a Python list and fails with HTTP 409, and it puts +capacity:public in front of a single fq, so a top-level OR in it (organization:a OR groups:b) stopped filtering at all and the whole catalogue came back. CKAN splits a lone fq_list value into characters, so a single filter is sent twice (the same filter applied twice selects the same datasets). Wrapping it in parentheses instead would break a negated filter: Solr matches nothing for a nested (-organization:x). Facet fields go out as the JSON list CKAN expects in facet.field; it rejects facet_field with HTTP 400.

      Parameters

      Returns Promise<PackageSearchResult>

    • Tags, optionally filtered by a query substring.

      Parameters

      • Optionalquery: string

      Returns Promise<string[]>