Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: epidatr
Title: Client for Delphi's 'Epidata' API
Version: 1.2.2
Version: 1.2.3
Authors@R: c(
person("Logan", "Brooks", , "lcbrooks@andrew.cmu.edu", role = "aut"),
person("Dmitry", "Shemetov", , "dshemeto@andrew.cmu.edu", role = "aut"),
Expand Down Expand Up @@ -57,7 +57,9 @@ Suggests:
readr,
rmarkdown,
testthat (>= 3.1.5),
withr
withr,
base64enc,
curl
VignetteBuilder:
knitr
Remotes:
Expand Down
13 changes: 12 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# epidatr 1.3.0

## Changes

- Improve documentation, including descriptions for `save_api_key()` and endpoint parameters, and standardize parameter information (#324).

## Features

## Patches


# epidatr 1.2.2

## Changes
Expand All @@ -14,7 +25,7 @@
integers rather than Dates. Because these fields can mix YYYYMMDD and YYYYWW
values, we recommend you parse them yourself.
- add new fields for `flusurv` endpoint.

# epidatr 1.2.1

## Patches
Expand Down
15 changes: 9 additions & 6 deletions R/auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
#' key](https://api.delphi.cmu.edu/epidata/admin/registration_form).
#'
#' API keys are strings read from the environment variable `DELPHI_EPIDATA_KEY`.
#' We recommend setting your key with `save_api_key()`, which will modify an
#' applicable `.Renviron` file, which will be read in automatically when you
#' start future R sessions (see [`?Startup`][base::Startup] for details on
#' `.Renviron` files). Alternatively, you can modify the environment variable at
#' the command line before/while launching R, or inside an R session with
#' [`Sys.setenv()`], but these will not persist across sessions.
#' We recommend setting your key with `save_api_key()`, which will open your
#' `.Renviron` file in a text editor. You will need to write
#' `DELPHI_EPIDATA_KEY=yourkeyhere` (without quotes) in the file and save it.
#' Once the `.Renviron` file has been saved as instructed, it will be read
#' automatically when you start future R sessions
#' (see [`?Startup`][base::Startup] for details on `.Renviron` files).
#' Alternatively, you can modify the environment variable at the command line
#' before/while launching R, or inside an R session with [`Sys.setenv()`],
#' but these will not persist across sessions.
#'
#' Once an API key is set, it is automatically used for all requests made by
#' functions in this package.
Expand Down
2 changes: 1 addition & 1 deletion R/covidcast.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ covidcast_epidata <- function(base_url = global_base_url, timeout_seconds = 30)
if (httr::http_type(response) == "text/html" && length(response$content) > 0) {
# grab the error information out of the returned HTML document
msg <- paste(msg, ":", xml2::xml_text(xml2::xml_find_all(
xml2::read_html(content(response, "text")),
xml2::read_html(httr::content(response, "text")),
"//p"
)))
}
Expand Down
Loading
Loading