Skip to content

Commit

Permalink
Merge branch 'main' into init-testthat
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Nov 13, 2023
2 parents 3268764 + 56a0bb0 commit f7a6e1d
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ RoxygenNote: 7.2.3
Imports:
askpass,
assertthat,
dplyr,
httr2,
magrittr,
openssl,
purrr
Suggests:
testthat (>= 3.0.0)
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
export("%>%")
export(get_access_token)
export(get_fields)
export(get_records)
importFrom(magrittr,"%>%")
4 changes: 2 additions & 2 deletions R/get_access_token.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#' @return Invisibily, an access token upon succes
#' @export
#'
#' @examples
#' @examples \dontrun{get_access_token("my_username")}
get_access_token <-
function(username = "phuybrechts", quiet = FALSE) {
function(username, quiet = FALSE) {
# check input params
assertthat::assert_that(assertthat::is.string(username))
assertthat::assert_that(assertthat::is.flag(quiet))
Expand Down
2 changes: 1 addition & 1 deletion R/get_fields.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' inspection
#' @export
#'
#' @examples
#' @examples \dontrun{get_fields("Vespa-Watch")}
get_fields <- function(name = "Vespa-Watch", access_token = get_access_token(quiet = TRUE)) {
# check input params
assertthat::assert_that(assertthat::is.string(access_token))
Expand Down
4 changes: 2 additions & 2 deletions R/get_records.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#' @param inspection_name name of the custom inspection to return records for
#' @param access_token access token from `get_access_token()`
#'
#' @return
#' @return a tibble with the records from the selected inspection.
#' @export
#'
#' @examples
#' @examples \dontrun{get_records("Vespa-Watch")}
get_records <- function(inspection_name = "Vespa-Watch",
access_token = get_access_token(quiet = TRUE)) {
# check input params
Expand Down
5 changes: 4 additions & 1 deletion man/get_access_token.Rd

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

17 changes: 13 additions & 4 deletions man/get_fields.Rd

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

25 changes: 25 additions & 0 deletions man/get_records.Rd

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

0 comments on commit f7a6e1d

Please sign in to comment.