Learn R Programming

eudata (version 0.1.3)

get_content_length: Get the content length of a file to download

Description

This function retrieves the content length of a file to be downloaded from the API.

Usage

get_content_length(api, file_to_download)

Value

An integer vector of content lengths, named by the file names.

Arguments

api

An endpoint to the dataset variants.

file_to_download

A character vector of file names to download.

Examples

Run this code
api <- get_topic("Postal")
files <- get_latest_files(api)$csv
purrr::map(
  files,
  get_content_length,
  api = api) |>
  tibble::as_tibble()

Run the code above in your browser using DataLab