Skip to content

Commit

Permalink
Lint and style
Browse files Browse the repository at this point in the history
  • Loading branch information
florianm committed Apr 2, 2024
1 parent df0eb34 commit 72b5a25
Show file tree
Hide file tree
Showing 31 changed files with 245 additions and 232 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ repos:
hooks:
- id: trailing-whitespace
name: Drop trailing whitespace
exclude: man
- id: end-of-file-fixer
name: Fix end of files
- id: check-yaml
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export(get_default_un)
export(get_default_url)
export(get_one_attachment)
export(get_one_submission)
export(get_one_submission_attachment_list)
export(get_one_submission_att_list)
export(get_one_submission_audit)
export(get_retries)
export(get_ru_verbose)
Expand Down
20 changes: 10 additions & 10 deletions R/attachment_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#'
#' sl <- submission_list()
#'
#' al <- get_one_submission_attachment_list(sl$instance_id[[1]])
#' al <- get_one_submission_att_list(sl$instance_id[[1]])
#' al %>% knitr::kable(.)
#'
#' # attachment_list returns a tibble
Expand All @@ -52,13 +52,13 @@
#' names(al)
#' # > "name" "exists"
#' }
get_one_submission_attachment_list <- function(iid,
pid = get_default_pid(),
fid = get_default_fid(),
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
retries = get_retries()) {
get_one_submission_att_list <- function(iid,
pid = get_default_pid(),
fid = get_default_fid(),
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
retries = get_retries()) {
yell_if_missing(url, un, pw)
httr::RETRY(
"GET",
Expand Down Expand Up @@ -114,7 +114,7 @@ get_one_submission_attachment_list <- function(iid,
#' sl <- submission_list()
#'
#' # Step 3a: Get attachment list for first submission
#' al <- get_one_submission_attachment_list(sl$instance_id[[1]])
#' al <- get_one_submission_att_list(sl$instance_id[[1]])
#'
#' # Ste 3b: Get all attachments for all submissions
#' all <- attachment_list(sl$instance_id)
Expand All @@ -136,7 +136,7 @@ attachment_list <- function(iid,
pw = pw,
retries = retries
) %>%
purrr::pmap(ruODK::get_one_submission_attachment_list) %>%
purrr::pmap(ruODK::get_one_submission_att_list) %>%
dplyr::bind_rows()
}

Expand Down
Loading

0 comments on commit 72b5a25

Please sign in to comment.