Fetch the summary for a version of an asset of a project. This will call the REST API if the caller is not on the same filesystem as the registry.
fetchSummary(
project,
asset,
version,
registry,
url,
cache = NULL,
forceRemote = FALSE,
overwrite = FALSE
)
String containing the project name.
String containing the asset name.
String containing the version name.
String containing a path to the registry.
String containing the URL to the Gobbler REST API. Only used for remote access.
String containing a path to a cache directory.
If NULL
, an appropriate location is automatically chosen.
Only used for remote access.
Logical scalar indicating whether to force remote access.
This will download all files in the path
via the REST API and cache them locally,
even if registry
is on the same filesystem as the caller.
Logical scalar indicating whether to overwrite the existing cache. Only used for remote access.
List containing the summary for this version, with the following fields:
upload_user_id
, string containing the identity of the uploader.
upload_start
, a POSIXct object containing the upload start time.
upload_finish
, a POSIXct object containing the upload finish time.
on_probation
(optional), a logical scalar indicating whether the upload is probational.
If missing, this can be assumed to be FALSE
.
info <- startGobbler()
removeProject("test", info$staging, url=info$url) # start with a clean slate.
createProject("test", info$staging, url=info$url)
# Mocking up an upload.
src <- allocateUploadDirectory(info$staging)
write(file=file.path(src, "foo"), "BAR")
uploadDirectory("test", "simple", "v1", src, staging=info$staging, url=info$url)
# Obtain a summary for this version.
fetchSummary("test", "simple", "v1", registry=info$registry, url=info$url)
#> $upload_user_id
#> [1] "root"
#>
#> $upload_start
#> [1] "2024-10-28 00:28:16 UTC"
#>
#> $upload_finish
#> [1] "2024-10-28 00:28:16 UTC"
#>
# Force remote access.
fetchSummary(
"test",
"simple",
"v1",
registry=info$registry,
url=info$url,
forceRemote=TRUE
)
#> $upload_user_id
#> [1] "root"
#>
#> $upload_start
#> [1] "2024-10-28 00:28:16 UTC"
#>
#> $upload_finish
#> [1] "2024-10-28 00:28:16 UTC"
#>