Liking cljdoc? Tell your friends :D

com.eldrix.trud.core


downloadclj

(download {:keys [api-key cache-dir items] :as opts})
source

download-releaseclj

(download-release dir release)

Get an archive file either from the cache or downloaded from TRUD. In most circumstances, using get-latest is more appropriate. Parameters:

  • cache-dir : cache directory
  • release : release information from TRUD, as returned by get-releases. Returns result as a java.nio.file.Path
Get an archive file either from the cache or downloaded from TRUD.
In most circumstances, using `get-latest` is more appropriate.
Parameters:
- cache-dir : cache directory
- release   : release information from TRUD, as returned by `get-releases`.
Returns result as a `java.nio.file.Path`
sourceraw docstring

get-latestclj

(get-latest config item-identifier)
(get-latest {:keys [api-key cache-dir] :as config}
            item-identifier
            existing-date)

Returns the latest release of the specified item, if existing is outdated. Currently only uses release date and does not use archive timestamp.

Parameters:

  • config : a configuration map containing: - api-key : your NHS Digital TRUD api key - cache-dir : where to download and cache distributions

  • item-identifier : the TRUD API item identifier you want.

  • existing-date : (optional) existing date of this item you have

Result is the data from the source TRUD API with except that dates are parsed into java LocalDates to simplify sorting and comparison and the following keys are added:

  • :needsUpdate? : indicates if your current version (existing-date) is outdated.
  • :archiveFilePath : a java.nio.files.Path to the downloaded distribution, if an update is required.
Returns the latest release of the specified item, if existing is outdated.
Currently only uses release date and does not use archive timestamp.

Parameters:
- config : a configuration map containing:
           - api-key        : your NHS Digital TRUD api key
           - cache-dir      : where to download and cache distributions

- item-identifier : the TRUD API item identifier you want.
- existing-date   : (optional) existing date of this item you have

Result is the data from the source [TRUD API](https://isd.digital.nhs.uk/trud3/user/guest/group/0/api)
with except that dates are parsed into java LocalDates to simplify sorting and
comparison and the following keys are added:

- :needsUpdate?     : indicates if your current version (`existing-date`) is
                      outdated.
- :archiveFilePath  : a `java.nio.files.Path` to the downloaded
                      distribution, if an update is required.
sourceraw docstring

get-releasesclj

(get-releases api-key item-identifier)

Returns a sequence of structured metadata about each release of the distribution files. Data are returned as-is from the source API, except that dates are parsed and the item-identifier is included using the key 'itemIdentifier'.

Returns a sequence of structured metadata about each release of the
distribution files. Data are returned as-is from the source API, except that
dates are parsed and the item-identifier is included using the key
'itemIdentifier'.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close