Skip to content

Commit d653d1f

Browse files
authored
Merge pull request #324 from cmu-delphi/adj-doc-issue
docs: Adds details to attend issues #295, #287, #221, #199
2 parents 63624a2 + 9a92314 commit d653d1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+799
-443
lines changed

DESCRIPTION

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: epidatr
33
Title: Client for Delphi's 'Epidata' API
4-
Version: 1.2.2
4+
Version: 1.2.3
55
Authors@R: c(
66
person("Logan", "Brooks", , "lcbrooks@andrew.cmu.edu", role = "aut"),
77
person("Dmitry", "Shemetov", , "dshemeto@andrew.cmu.edu", role = "aut"),
@@ -57,7 +57,9 @@ Suggests:
5757
readr,
5858
rmarkdown,
5959
testthat (>= 3.1.5),
60-
withr
60+
withr,
61+
base64enc,
62+
curl
6163
VignetteBuilder:
6264
knitr
6365
Remotes:

NEWS.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# epidatr 1.3.0
2+
3+
## Changes
4+
5+
- Improve documentation, including descriptions for `save_api_key()` and endpoint parameters, and standardize parameter information (#324).
6+
7+
## Features
8+
9+
## Patches
10+
11+
112
# epidatr 1.2.2
213

314
## Changes
@@ -14,7 +25,7 @@
1425
integers rather than Dates. Because these fields can mix YYYYMMDD and YYYYWW
1526
values, we recommend you parse them yourself.
1627
- add new fields for `flusurv` endpoint.
17-
28+
1829
# epidatr 1.2.1
1930

2031
## Patches

R/auth.R

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
#' key](https://api.delphi.cmu.edu/epidata/admin/registration_form).
1212
#'
1313
#' API keys are strings read from the environment variable `DELPHI_EPIDATA_KEY`.
14-
#' We recommend setting your key with `save_api_key()`, which will modify an
15-
#' applicable `.Renviron` file, which will be read in automatically when you
16-
#' start future R sessions (see [`?Startup`][base::Startup] for details on
17-
#' `.Renviron` files). Alternatively, you can modify the environment variable at
18-
#' the command line before/while launching R, or inside an R session with
19-
#' [`Sys.setenv()`], but these will not persist across sessions.
14+
#' We recommend setting your key with `save_api_key()`, which will open your
15+
#' `.Renviron` file in a text editor. You will need to write
16+
#' `DELPHI_EPIDATA_KEY=yourkeyhere` (without quotes) in the file and save it.
17+
#' Once the `.Renviron` file has been saved as instructed, it will be read
18+
#' automatically when you start future R sessions
19+
#' (see [`?Startup`][base::Startup] for details on `.Renviron` files).
20+
#' Alternatively, you can modify the environment variable at the command line
21+
#' before/while launching R, or inside an R session with [`Sys.setenv()`],
22+
#' but these will not persist across sessions.
2023
#'
2124
#' Once an API key is set, it is automatically used for all requests made by
2225
#' functions in this package.

R/covidcast.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ covidcast_epidata <- function(base_url = global_base_url, timeout_seconds = 30)
150150
if (httr::http_type(response) == "text/html" && length(response$content) > 0) {
151151
# grab the error information out of the returned HTML document
152152
msg <- paste(msg, ":", xml2::xml_text(xml2::xml_find_all(
153-
xml2::read_html(content(response, "text")),
153+
xml2::read_html(httr::content(response, "text")),
154154
"//p"
155155
)))
156156
}

0 commit comments

Comments
 (0)