Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fejlrettelser #14

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ Config/testthat/edition: 3
URL: https://kubdatalab.github.io/KBAPI/
Imports:
httr2,
rlang
magrittr,
rlang,
tibble,
xml2
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(get_aerial)
importFrom(httr2,req_perform)
importFrom(httr2,req_url_query)
importFrom(httr2,request)
importFrom(magrittr,"%>%")
importFrom(rlang,abort)
importFrom(rlang,warn)
14 changes: 7 additions & 7 deletions R/get_aerial.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ get_aerial <- function(lat=56.007514636317666, lon=12.228840190005485, format =
httr2::req_perform()
# Her bør der nok være noget tjek af om ting gik godt.
response <- response %>%
resp_body_xml()
tibble(navn =response %>%
xml_child(1) %>%
xml_children() %>%
xml_name(),
httr2::resp_body_xml()
tibble::tibble(navn =response %>%
xml2::xml_child(1) %>%
xml2::xml_children() %>%
xml2::xml_name(),
indhold = response %>%
xml_child() %>%
xml_children() %>%
xml2::xml_child() %>%
xml2::xml_children() %>%
lapply(function(x) x))

}
Expand Down
14 changes: 14 additions & 0 deletions R/utils-pipe.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#' Pipe operator
#'
#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
#' @param lhs A value or the magrittr placeholder.
#' @param rhs A function call using the magrittr semantics.
#' @return The result of calling `rhs(lhs)`.
NULL
20 changes: 20 additions & 0 deletions man/pipe.Rd

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