Skip to content

Commit

Permalink
Merge pull request #507 from BlairCooper/repeatingFileDownload
Browse files Browse the repository at this point in the history
Remove repeat_instrument param from redcap_file_download_oneshot
  • Loading branch information
wibeasley authored Sep 6, 2024
2 parents 770165e + 0d4f29b commit ad22ca9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
12 changes: 1 addition & 11 deletions R/redcap-file-download-oneshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
#' Required
#' @param event The name of the event where the file is saved in REDCap.
#' Optional
#' @param repeat_instrument The name of the instrument that is repeating
#' for a given event.
#' Optional
#' @param repeat_instance (only for projects with repeating instruments/events)
#' The repeat instance number of the repeating event (if longitudinal) or the
#' repeating instrument (if classic or longitudinal). Default value is '1'.
Expand Down Expand Up @@ -128,7 +125,6 @@ redcap_file_download_oneshot <- function(
record,
field,
event = "",
repeat_instrument = NULL,
repeat_instance = NULL,
verbose = TRUE,
config_options = NULL,
Expand Down Expand Up @@ -162,13 +158,7 @@ redcap_file_download_oneshot <- function(

if (0L < nchar(event)) post_body$event <- event

if (!is.null(repeat_instrument)) {
if (is.null(repeat_instance)) {
stop("You must specify repeat_instance when specified repeat_instrument")
}
post_body$repeat_instrument <- repeat_instrument
post_body$repeat_instance <- repeat_instance
}
if (!is.null(repeat_instance)) post_body$repeat_instance <- repeat_instance

# This is the first of two important lines in the function.
# It retrieves the information from the server and stores it in RAM.
Expand Down
5 changes: 0 additions & 5 deletions man/redcap_file_download_oneshot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad22ca9

Please sign in to comment.