@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 parameter name or value the rules refuse (prune: a blank or invisible name, a name given twice once trimmed, a blank value, a control or format character, an empty list or one with a null entry) rejects with GovDataValidationError before any request. Names go out trimmed, string values trimmed and in NFC.

      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. facet_limit goes out as facet.limit (a positive integer or -1 for every value), only with facet fields. The search text q and each filter go out as text, trimmed and in NFC (textProblem, normalizeText); the sort expression (sortProblem: <field> asc|desc, …) and each facet field (fieldProblem: a Solr field name) as tokens (normalizeToken). A parameter given as null means "not given", like undefined.

      Parameters

      Returns Promise<PackageSearchResult>

    • Tags, optionally filtered by a query substring (refused like q; sent trimmed, in NFC; null means none).

      Parameters

      • Optionalquery: string

      Returns Promise<string[]>