Enhanced parameter design with enum validation:
get_item_metadata() andget_subscribed_metadata() now userelease_scope = c("all", "latest") parameter instead oflatest_only boolean. This makes function calls moreexpressive and eliminates boolean ambiguity.download_item() now usesfile_type = c("archive", "checksum", "signature", "publicKey")parameter instead ofdownload_file.Addedoverwrite parameter todownload_item() allowing users to explicitly controlwhether existing files should be overwritten.
Breaking changes:
TRUD_API_KEY parameter from all exportedfunctions. API keys must now be set via theTRUD_API_KEYenvironment variable only.download_item() parameterdownload_filerenamed tofile_type with enhanced validation.get_item_metadata() andget_subscribed_metadata() parameterlatest_only replaced withrelease_scope.purrr::map_at() pattern is usedin examples to avoid exposing API keys.get_item_metadata() for downloading specific releases.trud_items() to detectchanges in NHS TRUD website structure that might break the scraper.withr::local_tempdir() forbetter test isolation and cleanup.TRUD_USER_AGENT environment variable.download_item()with clearer warning messages.download_item().