Skip to content

Commit 9aa0cf2

Browse files
authored
Merge f28ae6e into 46d2d54
2 parents 46d2d54 + f28ae6e commit 9aa0cf2

7 files changed

+14
-34
lines changed

R/check.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#' Allows character vectors
22
#' @importFrom checkmate assert_character assert_integerish
3+
#' @keywords internal
34
assert_character_param <- function(name, value, len = NULL, required = TRUE) {
45
null.ok <- !required
56
assert_integerish(len, null.ok = TRUE, .var.name = "len")
@@ -8,6 +9,7 @@ assert_character_param <- function(name, value, len = NULL, required = TRUE) {
89

910
#' Allows integer-like vectors
1011
#' @importFrom checkmate assert_integerish
12+
#' @keywords internal
1113
assert_integerish_param <- function(name, value, len = NULL, required = TRUE) {
1214
null.ok <- !required
1315
assert_integerish(len, null.ok = TRUE, .var.name = "len")
@@ -16,6 +18,7 @@ assert_integerish_param <- function(name, value, len = NULL, required = TRUE) {
1618

1719
#' Allows a vector of date_like params: date, character, or integer-like
1820
#' @importFrom checkmate check_date check_character check_integerish
21+
#' @keywords internal
1922
assert_date_param <- function(name, value, len = NULL, required = TRUE) {
2023
null.ok <- !required
2124
assert_integerish(len, null.ok = TRUE, .var.name = "len")

R/epidatacall.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fetch <- function(epidata_call, fields = NULL, disable_date_parsing = FALSE) {
128128
}
129129

130130
#' Fetches the data and returns a tibble
131-
#' @rdname epidata_call
131+
#' @rdname fetch_tbl
132132
#'
133133
#' @param epidata_call an instance of `epidata_call`
134134
#' @param fields a list of epidata fields to return, or NULL to return all
@@ -142,7 +142,7 @@ fetch <- function(epidata_call, fields = NULL, disable_date_parsing = FALSE) {
142142
#' @return
143143
#' - For `fetch_tbl`: a [`tibble::tibble`]
144144
#' @importFrom tibble as_tibble
145-
#'
145+
#' @keywords internal
146146
fetch_tbl <- function(epidata_call, fields = NULL, disable_date_parsing = FALSE) {
147147
stopifnot(inherits(epidata_call, "epidata_call"))
148148
stopifnot(is.null(fields) || is.character(fields))
@@ -162,7 +162,7 @@ fetch_tbl <- function(epidata_call, fields = NULL, disable_date_parsing = FALSE)
162162
#' Fetches the data, raises on epidata errors, and returns the results as a
163163
#' JSON-like list
164164
#'
165-
#' @rdname epidata_call
165+
#' @rdname fetch_classic
166166
#'
167167
#' @param epidata_call an instance of `epidata_call`
168168
#' @param fields a list of epidata fields to return, or NULL to return all
@@ -176,7 +176,7 @@ fetch_tbl <- function(epidata_call, fields = NULL, disable_date_parsing = FALSE)
176176
#' @importFrom jsonlite fromJSON
177177
#' @return
178178
#' - For `fetch_classic`: a JSON-like list
179-
#'
179+
#' @keywords internal
180180
fetch_classic <- function(epidata_call, fields = NULL, disable_data_frame_parsing = TRUE) {
181181
stopifnot(inherits(epidata_call, "epidata_call"))
182182
stopifnot(is.null(fields) || is.character(fields))
@@ -224,7 +224,7 @@ full_url <- function(epidata_call) {
224224
}
225225

226226
#' Returns the full request url for the given epidata_call
227-
#' @rdname epidata_call
227+
#' @rdname request_url
228228
#'
229229
#' @param epidata_call an instance of `epidata_call`
230230
#' @param format_type format to return one of classic,json,csv
@@ -235,6 +235,7 @@ full_url <- function(epidata_call) {
235235
#' @importFrom httr modify_url
236236
#' @return
237237
#' - For `request_url`: string containing the URL
238+
#' @keywords internal
238239
request_url <- function(epidata_call, format_type = "classic", fields = NULL) {
239240
stopifnot(inherits(epidata_call, "epidata_call"))
240241
url <- full_url(epidata_call)

R/utils.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Helper function to cast values, non-list vectors, and/or EpiRanges to strings
22
#'
3-
#' @noRd
3+
#' @keywords internal
44
format_item <- function(value) {
55
if (inherits(value, "EpiRange")) {
66
paste0(toString(value$from), "-", toString(value$to))
@@ -13,7 +13,7 @@ format_item <- function(value) {
1313

1414
#' Helper function to build a list of values and/or ranges
1515
#'
16-
#' @noRd
16+
#' @keywords internal
1717
format_list <- function(values) {
1818
paste(vapply(values, format_item, character(1L)), collapse = ",")
1919
}

man/assert_character_param.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/assert_date_param.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/assert_integerish_param.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epidata_call.Rd

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)