Title: | Interact with the 'Databrary.org' API |
---|---|
Description: | 'Databrary.org' is a restricted access repository for research data, especially video and audio. This package provides commands to interact with the data stored on 'Databrary.org'. |
Authors: | Rick O. Gilmore [aut, cre, cph], Jeffrey Spies [aut], National Science Foundation OAC-2032713 [fnd], National Institutes of Health R01HD094830 [fnd] |
Maintainer: | Rick O. Gilmore <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.6.6.9002 |
Built: | 2025-02-15 05:11:13 UTC |
Source: | https://github.com/databrary/databraryr |
Load Package-wide Constants into Local Environment
API_CONSTANTS
API_CONSTANTS
An object of class character
of length 1.
Download Databrary Constants From API.
assign_constants(vb = options::opt("vb"), rq = NULL)
assign_constants(vb = options::opt("vb"), rq = NULL)
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with the constants.
assign_constants()
assign_constants()
check_ssl_certs
checks the SSL certificates for nyu.databrary.org
and returns a data frame with the relevant information.
check_ssl_certs(host = "nyu.databrary.org")
check_ssl_certs(host = "nyu.databrary.org")
host |
Target URL. Defaults to 'nyu.databrary.org'. |
A data frame with information about the SSL certificates.
check_ssl_certs()
check_ssl_certs()
Returns the Avatar(s) (images) for Authorized User(s).
download_party_avatar( party_id = 6, show_party_info = TRUE, vb = options::opt("vb"), rq = NULL )
download_party_avatar( party_id = 6, show_party_info = TRUE, vb = options::opt("vb"), rq = NULL )
party_id |
A number or range of numbers. Party number or numbers to retrieve information about. Default is 6 (Rick Gilmore). |
show_party_info |
A logical value. Show the person's name and affiliation in the output. Default is TRUE. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
An list with the avatar (image) file and a name_affil string.
## Not run: download_party_avatar() # Show Rick Gilmore's (party 6) avatar. # Download avatars from Databrary's founders (without name/affiliations) download_party_avatar(5:7, show_party_info = FALSE) # Download NYU logo download_party_avatar(party = 8) ## End(Not run)
## Not run: download_party_avatar() # Show Rick Gilmore's (party 6) avatar. # Download avatars from Databrary's founders (without name/affiliations) download_party_avatar(5:7, show_party_info = FALSE) # Download NYU logo download_party_avatar(party = 8) ## End(Not run)
Databrary stores file types (assets) of many types. This function downloads an asset based on its system-unique integer identifer (asset_id) and system-unique session (slot) identifier (session_id).
download_session_asset( asset_id = 1, session_id = 9807, file_name = NULL, target_dir = tempdir(), timeout_secs = REQUEST_TIMEOUT, vb = options::opt("vb"), rq = NULL )
download_session_asset( asset_id = 1, session_id = 9807, file_name = NULL, target_dir = tempdir(), timeout_secs = REQUEST_TIMEOUT, vb = options::opt("vb"), rq = NULL )
asset_id |
An integer. Asset id for target file. Default is 1. |
session_id |
An integer. Slot/session number where target file is stored. Default is 9807. |
file_name |
A character string. Name for downloaded file. Default is NULL. |
target_dir |
A character string. Directory to save the downloaded file.
Default is a temporary directory given by a call to |
timeout_secs |
An integer constant. The default value, defined in CONSTANTS.R is REQUEST_TIMEOUT. This value determines the default timeout value for the httr2 request object. When downloading large files, it can be useful to set this value to a large number. |
vb |
Show verbose messages. (Defaults to |
rq |
A list in the form of an |
Full file name to the asset or NULL.
## Not run: download_session_asset() # Download's 'numbers' file from volume 1. download_session_asset(asset_id = 11643, session_id = 9825, file_name = "rdk.mp4") # Downloads a display with a random dot kinematogram (RDK). ## End(Not run)
## Not run: download_session_asset() # Download's 'numbers' file from volume 1. download_session_asset(asset_id = 11643, session_id = 9825, file_name = "rdk.mp4") # Downloads a display with a random dot kinematogram (RDK). ## End(Not run)
Databrary stores file types (assets) of many types. This function downloads assets in a data frame generated by list_session_assets().
download_session_assets_fr_df( session_df = list_session_assets(), target_dir = tempdir(), add_session_subdir = TRUE, overwrite = TRUE, make_portable_fn = FALSE, timeout_secs = REQUEST_TIMEOUT_VERY_LONG, vb = options::opt("vb"), rq = NULL )
download_session_assets_fr_df( session_df = list_session_assets(), target_dir = tempdir(), add_session_subdir = TRUE, overwrite = TRUE, make_portable_fn = FALSE, timeout_secs = REQUEST_TIMEOUT_VERY_LONG, vb = options::opt("vb"), rq = NULL )
session_df |
A data frame as generated by list_session_assets_2(). |
target_dir |
A character string. Directory to save the downloaded file. Default is directory named after the session_id. |
add_session_subdir |
A logical value. Add add the session name to the file path so that files are in a subdirectory specific to the session. Default is TRUE. |
overwrite |
A logical value. Overwrite an existing file. Default is TRUE. |
make_portable_fn |
A logical value. Replace characters in file names that are not broadly portable across file systems. Default is FALSE. |
timeout_secs |
An integer. The seconds an httr2 request will run before timing out. Default is 600 (10 min). This is to handle very large files. |
vb |
Show verbose messages. (Defaults to |
rq |
A list in the form of an |
Full file names to the downloaded assets or NULL.
## Not run: download_session_assets_fr_df() # Downloads all of the files from session 9807 in Databrary volume 1. # Just the CSVs v1 <- list_session_assets() v1_csv <- dplyr::filter(v1, format_extension == "csv") download_session_assets_fr_df(v1_csv, vb = TRUE) ## End(Not run)
## Not run: download_session_assets_fr_df() # Downloads all of the files from session 9807 in Databrary volume 1. # Just the CSVs v1 <- list_session_assets() v1_csv <- dplyr::filter(v1, format_extension == "csv") download_session_assets_fr_df(v1_csv, vb = TRUE) ## End(Not run)
Databrary generates a CSV-formated spreadsheet that summarizes information about individual sessions. This command downloads that CSV file as a temporary file or with a name specified by the user.
download_session_csv( vol_id = 1, file_name = "test.csv", target_dir = tempdir(), as_df = FALSE, vb = options::opt("vb"), rq = NULL )
download_session_csv( vol_id = 1, file_name = "test.csv", target_dir = tempdir(), as_df = FALSE, vb = options::opt("vb"), rq = NULL )
vol_id |
An integer. Target volume number. Default is 1. |
file_name |
A character string. Name for the output file. Default is 'test.csv'. |
target_dir |
A character string. Directory to save downloaded file.
Default is |
as_df |
A logical value. Convert the data from a list to a data frame. Default is FALSE. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A character string that is the name of the downloaded file or a
data frame if as_df
is TRUE.
## Not run: download_session_csv() # Downloads "session" CSV for volume 1 ## End(Not run)
## Not run: download_session_csv() # Downloads "session" CSV for volume 1 ## End(Not run)
Download Zip Archive From Databrary Session.
download_session_zip( vol_id = 31, session_id = 9803, out_dir = tempdir(), file_name = "test.zip", vb = options::opt("vb"), rq = NULL )
download_session_zip( vol_id = 31, session_id = 9803, out_dir = tempdir(), file_name = "test.zip", vb = options::opt("vb"), rq = NULL )
vol_id |
Volume number. |
session_id |
Slot/session number. |
out_dir |
Directory to save output file. |
file_name |
Name for downloaded file, default is 'test.zip'. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
Full filename of the downloaded file.
## Not run: download_session_zip() # Downloads Zip Archive from volume 31, session 9803 ## End(Not run)
## Not run: download_session_zip() # Downloads Zip Archive from volume 31, session 9803 ## End(Not run)
Databrary stores file types (assets) of many types. This function downloads an asset based on its system-unique integer identifer (asset_id) and system-unique session (slot) identifier (session_id). It is designed to work with download_session_assets_fr_df() so that multiple files can be downloaded simultaneously.
download_single_session_asset_fr_df( i = NULL, session_df = NULL, target_dir = tempdir(), add_session_subdir = TRUE, overwrite = TRUE, make_portable_fn = FALSE, timeout_secs = REQUEST_TIMEOUT_VERY_LONG, vb = options::opt("vb"), rq = NULL )
download_single_session_asset_fr_df( i = NULL, session_df = NULL, target_dir = tempdir(), add_session_subdir = TRUE, overwrite = TRUE, make_portable_fn = FALSE, timeout_secs = REQUEST_TIMEOUT_VERY_LONG, vb = options::opt("vb"), rq = NULL )
i |
An integer. Index into a row of the session asset data frame. Default is NULL. |
session_df |
A row from a data frame from |
target_dir |
A character string. Directory to save the downloaded file.
Default is a temporary directory given by a call to |
add_session_subdir |
A logical value. Add add the session name to the file path so that files are in a subdirectory specific to the session. Default is TRUE. |
overwrite |
A logical value. Overwrite an existing file. Default is TRUE. |
make_portable_fn |
A logical value. Replace characters in file names that are not broadly portable across file systems. Default is FALSE. |
timeout_secs |
An integer. The seconds an httr2 request will run before timing out. Default is 600 (10 min). This is to handle very large files. |
vb |
Show verbose messages. (Defaults to |
rq |
A list in the form of an |
Full file name to the asset or NULL.
## Not run: vol_1 <- list_session_assets(session_id = 9807) a_1 <- vol_1[1,] tmp_dir <- tempdir() fn <- file.path(tmp_dir, paste0(a_1$asset_name, ".", a_1$format_extension)) download_single_session_asset_fr_df(a_1$asset_id, fn, session_id = a_1$session_id, vb = TRUE) ## End(Not run)
## Not run: vol_1 <- list_session_assets(session_id = 9807) a_1 <- vol_1[1,] tmp_dir <- tempdir() fn <- file.path(tmp_dir, paste0(a_1$asset_name, ".", a_1$format_extension)) download_single_session_asset_fr_df(a_1$asset_id, fn, session_id = a_1$session_id, vb = TRUE) ## End(Not run)
Download Video From Databrary.
download_video( asset_id = 1, session_id = 9807, file_name = tempfile(paste0(session_id, "_", asset_id, "_"), fileext = ".mp4"), target_dir = tempdir(), vb = options::opt("vb"), rq = NULL )
download_video( asset_id = 1, session_id = 9807, file_name = tempfile(paste0(session_id, "_", asset_id, "_"), fileext = ".mp4"), target_dir = tempdir(), vb = options::opt("vb"), rq = NULL )
asset_id |
Asset id for target file. |
session_id |
Slot/session number where target file is stored. |
file_name |
Name for downloaded file. |
target_dir |
Directory to save the downloaded file.
Default is a temporary directory given by a call to |
vb |
Show verbose messages. (Defaults to |
rq |
An |
Full file name to the asset.
## Not run: download_video() # Download's 'numbers' file from volume 1. download_video(asset_id = 11643, session_id = 9825, file_name = "rdk.mp4") #' # Downloads a display with a random dot kinematogram (RDK). ## End(Not run)
## Not run: download_video() # Download's 'numbers' file from volume 1. download_video(asset_id = 11643, session_id = 9825, file_name = "rdk.mp4") #' # Downloads a display with a random dot kinematogram (RDK). ## End(Not run)
Download Zip Archive of All Data in a Volume.
download_volume_zip( vol_id = 31, out_dir = tempdir(), file_name = "test.zip", vb = options::opt("vb"), rq = NULL )
download_volume_zip( vol_id = 31, out_dir = tempdir(), file_name = "test.zip", vb = options::opt("vb"), rq = NULL )
vol_id |
Volume number. |
out_dir |
Directory to save output file. |
file_name |
Name for downloaded file, default is 'test.mp4'. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
Full filename of the downloaded file.
## Not run: download_volume_zip() # Zip file of all data from volume 31, the default. ## End(Not run)
## Not run: download_volume_zip() # Zip file of all data from volume 31, the default. ## End(Not run)
Get Time Range For An Asset.
get_asset_segment_range( vol_id = 1, session_id = 9807, asset_id = 1, convert_JSON = TRUE, segment_only = TRUE, vb = options::opt("vb"), rq = NULL )
get_asset_segment_range( vol_id = 1, session_id = 9807, asset_id = 1, convert_JSON = TRUE, segment_only = TRUE, vb = options::opt("vb"), rq = NULL )
vol_id |
Volume ID |
session_id |
Slot/session number. |
asset_id |
Asset number. |
convert_JSON |
A Boolean value. If TRUE, convert JSON to a data frame. Default is TRUE. |
segment_only |
A Boolean value. If TRUE, returns only the segment values. Otherwise returns a data frame with two fields, segment and permission. Default is TRUE. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
The time range (in ms) for an asset, if one is indicated.
get_asset_segment_range()
get_asset_segment_range()
Helper function for list_volume_assets
get_assets_from_session(volume_container, ignore_materials = TRUE)
get_assets_from_session(volume_container, ignore_materials = TRUE)
volume_container |
The 'container' list from a volume. |
ignore_materials |
A logical value. |
get_db_stats
returns basic summary information about
the institutions, people, and data hosted on 'Databrary.org'.
get_db_stats(type = "stats", vb = options::opt("vb"), rq = NULL)
get_db_stats(type = "stats", vb = options::opt("vb"), rq = NULL)
type |
Type of Databrary report to run "institutions", "people", "data" |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with the requested data or NULL if there is no new information.
get_db_stats() get_db_stats("stats") get_db_stats("people") # Information about the newest authorized investigators. get_db_stats("places") # Information about the newest institutions.
get_db_stats() get_db_stats("stats") get_db_stats("people") # Information about the newest authorized investigators. get_db_stats("places") # Information about the newest institutions.
Get Duration (In ms) Of A File.
get_file_duration( asset_id = 1, types_w_durations = c("-600", "-800"), vb = options::opt("vb"), rq = NULL )
get_file_duration( asset_id = 1, types_w_durations = c("-600", "-800"), vb = options::opt("vb"), rq = NULL )
asset_id |
Asset number. |
types_w_durations |
Asset types that have valid durations. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
Duration of a file in ms.
get_file_duration() # default is the test video from databrary.org/volume/1
get_file_duration() # default is the test video from databrary.org/volume/1
List Sessions Info in Databrary Volume Container
get_info_from_session( volume_container, ignore_materials = FALSE, release_levels )
get_info_from_session( volume_container, ignore_materials = FALSE, release_levels )
volume_container |
A component of a volume list returned by get_volume_by_id(). |
ignore_materials |
A logical value specifying whether to ignore "materials" folders. Default is TRUE |
release_levels |
A data frame mapping release level indices to release level text values. |
Download Information About a Party on Databrary as JSON
get_party_by_id( party_id = 6, parents_children_access = TRUE, vb = options::opt("vb"), rq = NULL )
get_party_by_id( party_id = 6, parents_children_access = TRUE, vb = options::opt("vb"), rq = NULL )
party_id |
An integer. The party number to retrieve information about. |
parents_children_access |
A logical value. If TRUE (the default), returns all of the data about the party. If FALSE, only a minimum amount of information about the party is returned. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A nested list with information about the party. This can be readily parsed by other functions.
## Not run: get_party_by_id() ## End(Not run)
## Not run: get_party_by_id() ## End(Not run)
Extract Databrary Permission Levels.
get_permission_levels(vb = options::opt("vb"))
get_permission_levels(vb = options::opt("vb"))
vb |
Show verbose messages. (Defaults to |
An array with the permission levels that can be assigned to data.
get_permission_levels()
get_permission_levels()
Show Databrary Release Levels
get_release_levels(vb = options::opt("vb"))
get_release_levels(vb = options::opt("vb"))
vb |
Show verbose messages. (Defaults to |
A data frame with Databrary's release levels.
get_release_levels()
get_release_levels()
Get Session (Slot) Data From A Databrary Volume
get_session_by_id( session_id = 9807, vol_id = 1, vb = options::opt("vb"), rq = NULL )
get_session_by_id( session_id = 9807, vol_id = 1, vb = options::opt("vb"), rq = NULL )
session_id |
An integer indicating a valid session/slot identifier linked to a volume. Default value is 9807, the materials folder for volume 1. |
vol_id |
An integer indicating the volume identifier. Default is 1. |
vb |
Show verbose messages. (Defaults to |
rq |
An httr2 request object. |
A JSON blob with the session data. If the user has previously logged
in to Databrary via login_db()
, then session(s) that have restricted access
can be downloaded, subject to the sharing release levels on those session(s).
## Not run: get_session_by_id() # Default is Volume 1, Session 9807, the Materials folder ## End(Not run)
## Not run: get_session_by_id() # Default is Volume 1, Session 9807, the Materials folder ## End(Not run)
Get Session (Slot) Data From A Databrary Volume By Session Name.
get_session_by_name( session_name = "Advisory Board Meeting", vol_id = 1, vb = options::opt("vb"), rq = NULL )
get_session_by_name( session_name = "Advisory Board Meeting", vol_id = 1, vb = options::opt("vb"), rq = NULL )
session_name |
A string. The name of the target session. Defaults to "Advisory Board Meeting", the name of several of the sessions in the public Volume 1. |
vol_id |
An integer indicating the volume identifier. Default is 1. |
vb |
Show verbose messages. (Defaults to |
rq |
An httr2 request, such as that generated by |
One or more JSON blobs (as lists) whose session name(s) match
name
in the given volume.
## Not run: # Returns multiple JSON blobs with the name "Advisory Board Meeting" in Volume 1. get_session_by_name() get_session_by_name(name = 'Top-level materials') ## End(Not run)
## Not run: # Returns multiple JSON blobs with the name "Advisory Board Meeting" in Volume 1. get_session_by_name() get_session_by_name(name = 'Top-level materials') ## End(Not run)
Extracts File Types Supported by Databrary.
get_supported_file_types(vb = options::opt("vb"))
get_supported_file_types(vb = options::opt("vb"))
vb |
Show verbose messages. (Defaults to |
A data frame with the file types permitted on Databrary.
get_supported_file_types()
get_supported_file_types()
Get Summary Data About A Databrary Volume
get_volume_by_id(vol_id = 1, vb = options::opt("vb"), rq = NULL)
get_volume_by_id(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Volume ID. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A tibble with summary information about a volume.
get_volume_by_id() # Default is Volume 1
get_volume_by_id() # Default is Volume 1
Convert Timestamp String To ms.
HHMMSSmmm_to_ms(HHMMSSmmm = "01:01:01:333")
HHMMSSmmm_to_ms(HHMMSSmmm = "01:01:01:333")
HHMMSSmmm |
a string in the format "HH:MM:SS:mmm" |
A numeric value in ms from the input string.
HHMMSSmmm_to_ms() # 01:01:01:333 in ms
HHMMSSmmm_to_ms() # 01:01:01:333 in ms
Is This Party An Institution?
is_institution(party_id = 8, vb = options::opt("vb"), rq = NULL)
is_institution(party_id = 8, vb = options::opt("vb"), rq = NULL)
party_id |
Databrary party ID |
vb |
Show verbose messages. (Defaults to |
rq |
An |
TRUE if the party is an institution, FALSE otherwise.
is_institution() # Is party 8 (NYU) an institution.
is_institution() # Is party 8 (NYU) an institution.
Is This Party A Person?
is_person(party_id = 7, vb = options::opt("vb"), rq = NULL)
is_person(party_id = 7, vb = options::opt("vb"), rq = NULL)
party_id |
Databrary party ID |
vb |
Show verbose messages. (Defaults to |
rq |
An |
TRUE if the party is a person, FALSE otherwise.
is_person()
is_person()
List Stored Assets (Files) By Type.
list_asset_formats(vb = options::opt("vb"))
list_asset_formats(vb = options::opt("vb"))
vb |
Show verbose messages. (Defaults to |
A data frame with information about the data formats Databrary supports.
list_asset_formats()
list_asset_formats()
List Authorized Investigators at Institution
list_authorized_investigators( party_id = 12, vb = options::opt("vb"), rq = NULL )
list_authorized_investigators( party_id = 12, vb = options::opt("vb"), rq = NULL )
party_id |
Target party ID. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information the institution's authorized investigators.
## Not run: list_institutional_affiliates() # Default is Penn State (party 12) ## End(Not run)
## Not run: list_institutional_affiliates() # Default is Penn State (party 12) ## End(Not run)
List Affiliates For A Party
list_party_affiliates(party_id = 6, vb = options::opt("vb"), rq = NULL)
list_party_affiliates(party_id = 6, vb = options::opt("vb"), rq = NULL)
party_id |
Target party ID. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about a party's affiliates.
list_party_affiliates() # Default is Rick Gilmore (party 6)
list_party_affiliates() # Default is Rick Gilmore (party 6)
List Sponsors For A Party
list_party_sponsors(party_id = 6, vb = options::opt("vb"), rq = NULL)
list_party_sponsors(party_id = 6, vb = options::opt("vb"), rq = NULL)
party_id |
Target party ID. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about a party's sponsors.
## Not run: list_party_sponsors() # Default is Rick Gilmore (party 6) ## End(Not run)
## Not run: list_party_sponsors() # Default is Rick Gilmore (party 6) ## End(Not run)
List Volumes A Party Has Access To
list_party_volumes(party_id = 6, vb = options::opt("vb"), rq = NULL)
list_party_volumes(party_id = 6, vb = options::opt("vb"), rq = NULL)
party_id |
Target party ID. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about a party's sponsors.
## Not run: list_party_volumes() # Default is Rick Gilmore (party 6) ## End(Not run)
## Not run: list_party_volumes() # Default is Rick Gilmore (party 6) ## End(Not run)
If a user has access to a volume and session, this function returns the history of modifications to that session.
list_session_activity(session_id = 6256, vb = options::opt("vb"), rq = NULL)
list_session_activity(session_id = 6256, vb = options::opt("vb"), rq = NULL)
session_id |
Selected session/slot number. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A list with the activity history on a session/slot.
## Not run: # The following will only return output if the user has write privileges # on the session. list_session_activity(session_id = 6256, vb = FALSE) ## End(Not run)
## Not run: # The following will only return output if the user has write privileges # on the session. list_session_activity(session_id = 6256, vb = FALSE) ## End(Not run)
list_session_assets(session_id = 9807, vb = options::opt("vb"), rq = NULL)
list_session_assets(session_id = 9807, vb = options::opt("vb"), rq = NULL)
session_id |
An integer. A Databrary session number. Default is 9807, the "materials" folder from Databrary volume 1. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
As of v0.6.3 list_session_assets()
replaces an older function that is now
named list_volume_session_assets()
. The older function requires both
a volume ID and a session ID. The new function requires only a session ID.
A data frame with information about all assets in a volume.
## Not run: list_session_assets() # Session 9807 in volume 1 ## End(Not run)
## Not run: list_session_assets() # Session 9807 in volume 1 ## End(Not run)
List Sponsors For A Party
list_sponsors(party_id = 6, vb = options::opt("vb"), rq = NULL)
list_sponsors(party_id = 6, vb = options::opt("vb"), rq = NULL)
party_id |
Target party ID. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about a party's sponsors.
## Not run: list_sponsors() # Default is Rick Gilmore (party 6) ## End(Not run)
## Not run: list_sponsors() # Default is Rick Gilmore (party 6) ## End(Not run)
If a user has access to a volume, this command lists the modification history of the volume as a
list_volume_activity(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_activity(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Selected volume number. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A list with the activity history on a volume.
## Not run: # The following will only return output if the user has write privileges # on the volume. list_volume_activity(vol_id = 1) # Activity on volume 1. ## End(Not run)
## Not run: # The following will only return output if the user has write privileges # on the volume. list_volume_activity(vol_id = 1) # Activity on volume 1. ## End(Not run)
List Assets in Databrary Volume.
list_volume_assets(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_assets(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Target volume number. Default is 1. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about all assets in a volume.
## Not run: list_volume_assets() # Assets in volume 1 ## End(Not run)
## Not run: list_volume_assets() # Assets in volume 1 ## End(Not run)
List Image or Video Excerpts On A Databrary Volume.
list_volume_excerpts(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_excerpts(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Target volume number. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A list with information about any available excerpts.
list_volume_excerpts()
list_volume_excerpts()
Lists Funders Associated With a Databrary Volume.
list_volume_funding( vol_id = 1, add_id = TRUE, vb = options::opt("vb"), rq = NULL )
list_volume_funding( vol_id = 1, add_id = TRUE, vb = options::opt("vb"), rq = NULL )
vol_id |
Target volume number. |
add_id |
A logical value. Include the volume ID in the output. Default is TRUE. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with funder information for the volume.
## Not run: list_volume_funding() # Funding for volume 1 list_volume_funding(vol_id = c(1:10)) ## End(Not run)
## Not run: list_volume_funding() # Funding for volume 1 list_volume_funding(vol_id = c(1:10)) ## End(Not run)
List Basic Volume Info.
list_volume_info(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_info(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Target volume number. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with basic information about a volume.
## Not run: list_volume_info() # Sessions in Volume 1 ## End(Not run)
## Not run: list_volume_info() # Sessions in Volume 1 ## End(Not run)
Retrieves URL Links From A Databrary Volume.
list_volume_links(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_links(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Target volume number. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with the requested data.
## Not run: list_volume_links() # Links from volume 1 ## End(Not run)
## Not run: list_volume_links() # Links from volume 1 ## End(Not run)
List Owners of a Databrary Volume.
list_volume_owners(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_owners(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Selected volume number. Default is volume 1. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about a volume's owner(s).
list_volume_owners() # Lists information about the owners of volume 1.
list_volume_owners() # Lists information about the owners of volume 1.
list_volume_session_assets( vol_id = 1, session_id = 9807, vb = options::opt("vb"), rq = NULL )
list_volume_session_assets( vol_id = 1, session_id = 9807, vb = options::opt("vb"), rq = NULL )
vol_id |
Target volume number. |
session_id |
The session number in the selected volume. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
list_volume_session_assets()
is a new name for the <v0.6.2 list_session_assets()
as
function. There is a new list_session_assets()
function that does not
requre the volume ID. The list_volume_session_assets()
requires a volume
ID.
A data frame with information about all assets in a volume.
## Not run: list_volume_session_assets() # Session 9807 in volume 1 ## End(Not run)
## Not run: list_volume_session_assets() # Session 9807 in volume 1 ## End(Not run)
List Sessions in Databrary Volume.
list_volume_sessions( vol_id = 1, include_vol_data = FALSE, vb = options::opt("vb"), rq = NULL )
list_volume_sessions( vol_id = 1, include_vol_data = FALSE, vb = options::opt("vb"), rq = NULL )
vol_id |
Target volume number. |
include_vol_data |
A Boolean value. Include volume-level metadata or not. Default is FALSE. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about all assets in a volume.
## Not run: list_volume_sessions() # Sessions in Volume 1 ## End(Not run)
## Not run: list_volume_sessions() # Sessions in Volume 1 ## End(Not run)
Lists Keywords And Tags For A Volume.
list_volume_tags(vol_id = 1, vb = options::opt("vb"), rq = NULL)
list_volume_tags(vol_id = 1, vb = options::opt("vb"), rq = NULL)
vol_id |
Target volume number. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with the requested data.
list_volume_tags()
list_volume_tags()
Log In To Databrary.org.
login_db( email = NULL, password = NULL, store = FALSE, overwrite = FALSE, vb = options::opt("vb"), SERVICE = KEYRING_SERVICE, rq = NULL )
login_db( email = NULL, password = NULL, store = FALSE, overwrite = FALSE, vb = options::opt("vb"), SERVICE = KEYRING_SERVICE, rq = NULL )
email |
Databrary account email address. |
password |
Databrary password (not recommended as it will displayed as you type) |
store |
A boolean value. If TRUE store/retrieve credentials from the system keyring/keychain. |
overwrite |
A boolean value. If TRUE and store is TRUE, overwrite/ update stored credentials in keyring/keychain. |
vb |
Show verbose messages. (Defaults to |
SERVICE |
A character label for stored credentials in the keyring. Default is "databrary" |
rq |
An |
Logical value indicating whether log in is successful or not.
login_db() # Queries user for email and password interactively. ## Not run: # The following shows how to use credentials that have been stored previously. login_db(email = "[email protected]", store = TRUE) ## End(Not run)
login_db() # Queries user for email and password interactively. ## Not run: # The following shows how to use credentials that have been stored previously. login_db(email = "[email protected]", store = TRUE) ## End(Not run)
Log Out of Databrary.org.
logout_db(vb = options::opt("vb"), rq = NULL)
logout_db(vb = options::opt("vb"), rq = NULL)
vb |
Show verbose messages. (Defaults to |
rq |
An |
TRUE if logging out succeeds, FALSE otherwise.
logout_db()
logout_db()
make_default_request
sets default parameters for httr requests.
make_default_request()
make_default_request()
An httr2
request object.
make_default_request()
make_default_request()
Make Portable File Names
make_fn_portable( fn, vb = options::opt("vb"), replace_regex = "[ &\\!\\)\\(\\}\\{\\[\\]\\+\\=@#\\$%\\^\\*]", replacement_char = "_" )
make_fn_portable( fn, vb = options::opt("vb"), replace_regex = "[ &\\!\\)\\(\\}\\{\\[\\]\\+\\=@#\\$%\\^\\*]", replacement_char = "_" )
fn |
Databrary party ID |
vb |
Show verbose messages. (Defaults to |
replace_regex |
A character string. A regular expression to capture the "non-portable" characters in fn. |
replacement_char |
A character string. The character(s) that will replace the non-portable characters. |
A "cleaned" portable file name
Log In To Databrary.org.
make_login_client( email = NULL, password = NULL, store = FALSE, overwrite = FALSE, vb = options::opt("vb"), SERVICE = KEYRING_SERVICE, rq = NULL )
make_login_client( email = NULL, password = NULL, store = FALSE, overwrite = FALSE, vb = options::opt("vb"), SERVICE = KEYRING_SERVICE, rq = NULL )
email |
Databrary account email address. |
password |
Databrary password (not recommended as it will displayed as you type) |
store |
A boolean value. If TRUE store/retrieve credentials from the system keyring/keychain. |
overwrite |
A boolean value. If TRUE and store is TRUE, overwrite/ update stored credentials in keyring/keychain. |
vb |
Show verbose messages. (Defaults to |
SERVICE |
A character label for stored credentials in the keyring. Default is "databrary" |
rq |
An |
Logical value indicating whether log in is successful or not.
make_login_client() # Queries user for email and password interactively. ## Not run: # The following shows how to use credentials that have been stored previously. make_login_client(email = "[email protected]", store = TRUE) ## End(Not run)
make_login_client() # Queries user for email and password interactively. ## Not run: # The following shows how to use credentials that have been stored previously. make_login_client(email = "[email protected]", store = TRUE) ## End(Not run)
Internally used, package-specific options. All options will prioritize R options() values, and fall back to environment variables if undefined. If neither the option nor the environment variable is set, a default value is used.
Option values specific to databraryr
can be
accessed by passing the package name to env
.
options::opts(env = "databraryr") options::opt(x, default, env = "databraryr")
Show verbose messages.
FALSE
databraryr.vb
R_DATABRARYR_VB (evaluated if possible, raw string otherwise)
options getOption Sys.setenv Sys.getenv
Report Information About A Funder.
search_for_funder( search_string = "national+science+foundation", vb = options::opt("vb"), rq = NULL )
search_for_funder( search_string = "national+science+foundation", vb = options::opt("vb"), rq = NULL )
search_string |
String to search. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A data frame with information about the funder.
search_for_funder("national+science+foundation")
search_for_funder("national+science+foundation")
Search For Keywords in Databrary Volumes.
search_for_keywords( search_string = "locomotion", vb = options::opt("vb"), rq = NULL )
search_for_keywords( search_string = "locomotion", vb = options::opt("vb"), rq = NULL )
search_string |
String to search. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
A list with the volumes that contain the keyword.
## Not run: search_for_keywords() # searches for volumes with "locomotion" as a keyword. search_for_keywords() # searches for volumes with "adult" as a keyword. search_for_keywords("adult") ## End(Not run)
## Not run: search_for_keywords() # searches for volumes with "locomotion" as a keyword. search_for_keywords() # searches for volumes with "adult" as a keyword. search_for_keywords("adult") ## End(Not run)
Search For Tags on Volumes or Sessions.
search_for_tags(search_string = "ICIS", vb = options::opt("vb"), rq = NULL)
search_for_tags(search_string = "ICIS", vb = options::opt("vb"), rq = NULL)
search_string |
String to search. |
vb |
Show verbose messages. (Defaults to |
rq |
An |
An array of tags that match the tag_string.
## Not run: search_for_tags() # Searches for volumes that have the tag "ICIS" ## End(Not run)
## Not run: search_for_tags() # Searches for volumes that have the tag "ICIS" ## End(Not run)