Learn R Programming

trud (version 0.2.0)

get_item_metadata: Retrieve metadata for a NHS TRUD item

Description

Sends a request to the release list endpoint, returning a list of metadata pertaining to the specified NHS TRUD item. Use the item numbers from trud_items() or get_subscribed_metadata().

Subscription Required

You must subscribe to TRUD items individually through the NHS TRUD website before you can access them using get_item_metadata() or download_item(). Simply having an API key is not sufficient. To see items you're already subscribed to, use get_subscribed_metadata(). To browse all available items, use trud_items().

Usage

get_item_metadata(item, release_scope = c("all", "latest"))

Value

A list containing item metadata, including release information that can be used with download_item(). Release IDs for specific downloads are in the id field of each release.

Arguments

item

An integer, the item to be downloaded. Get these from trud_items() or get_subscribed_metadata().

release_scope

Which releases to retrieve metadata for. Use "all" to get all releases, or "latest" to get only the most recent release.

See Also

  • trud_items() to find item numbers

  • get_subscribed_metadata() to see items you can access

  • download_item() to download files using this metadata