Skip to content

Commit

Permalink
Remove timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
asadow committed Sep 4, 2024
1 parent f0d1e4e commit 6d3c18c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions R/pull.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ mm_data <- function(endpoint, ..., allfields = TRUE) {
}
}

## Add ts timestamp column
timestamps <- successes |>
purrr::map(\(x) x |> purrr::pluck("headers", "Date") |> parse_header_date())
pages <- purrr::map2(
pages,
timestamps,
\(x, y) if(!is.null(x)) {
x |> dplyr::mutate(ts = !!y)
} else x
)

data <- pages |> mm_pagebind()
data |>
remove_api_urls() |>
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-get.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with_mock_dir("mm_data", {
got <- mm_data("status")

expect_s3_class(got, "tbl_df")
expect_named(got, c("ampc_required", "description", "status", "ts"))
expect_named(got, c("ampc_required", "description", "status"))
})
})

Expand Down

0 comments on commit 6d3c18c

Please sign in to comment.