This function provides a situational report (sitrep) for the Nettskjema R package. It outputs detailed information on the package version, API configuration, environment variables, and tests API connectivity when credentials are available.
Value
No return value; the function outputs diagnostic and configuration status messages to the console.
Details
The function performs the following: - Displays the installed version of the `nettskjemar` package. - Validates the `NETTSKJEMA_CLIENT_ID` and `NETTSKJEMA_CLIENT_SECRET` environment variables. - Checks the API base URL for connectivity and attempts a test request if credentials are configured. - Displays system environment details such as R version and operating system.
Examples
ns_sitrep()
#>
#> ── Nettskjema API Sitrep ───────────────────────────────────────────────────────
#> ✔ nettskjemar version: 1.0.4
#>
#>
#> ── Nettskjema API Configuration ──
#>
#> ℹ API URL is set to: "https://nettskjema.no/api/v3/"
#> ✔ Client ID: Valid format and length.
#> ✔ Client Secret: Valid format and length.
#>
#>
#> ── API Connectivity ──
#>
#> ✔ Successfully connected to API
#> ℹ Tested by fetching client profile
#>
#>
#> ── Environment ──
#>
#> ✔ R version: "R version 4.5.1 (2025-06-13)"
#> ✔ OS: "Linux" "6.11.0-1018-azure"
#> ────────────────────────────────────────────────────────────────────────────────