Helper function to package API results as a tibble
Examples
m <- riddle::resource_metadata(type = "data",
url = "mtcars.csv",
# upload = httr::upload_file(system.file("extdata/mtcars.csv", package = "readr")),
name = "mtcars.csv",
format = "csv",
file_type = "microdata",
date_range_start = "1973-01-01",
date_range_end = "1973-12-31",
version = "1",
visibility = "public",
process_status = "raw",
identifiability = "anonymized_public")
m1 <- riddle::resource_tibblify(m)
m1
#> # A tibble: 1 × 11
#> type url name format file_type date_range_start date_range_end visibility
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 data mtcar… mtca… csv microdata 1973-01-01 1973-12-31 public
#> # ℹ 3 more variables: version <chr>, process_status <chr>,
#> # identifiability <chr>