download_protocols: Wraps get_protocol_links and download_files to get all...

Description Usage Arguments Value Examples

View source: R/protocol_download.R

Description

This function gets all download links and downloads the linked files into the specified folder. There exist no tests for it, because this function interacts directly with external systems and causing load and expenses for the operator of them. Testing against them is considered bad practice. I could have mocked the server and it's responses, but this is not worth the effort given the fact that this function uses unsupported interfaces anyway.

Usage

1
2
3
4
5
download_protocols(
  base_url = "https://www.bundestag.de",
  registry_url = "/ajax/filterlist/de/services/opendata/543410-543410",
  directory = "./protokolle"
)

Arguments

base_url

The URL of the bundestag.de-domain this should continue to be "https://www.bundestag.de

registry_url

This is the path to the service the "https://www.bundestag.de/protokolle"-frontend hits, to get the links to the protocol files. The current default value is equivalent to the service path for the 19th period. This may change in the future. It is necessary to use the devtools of the browser to get this information.

Value

A vector with all paths to the downloaded files

Examples

1

bockstaller/dbtprotokoll documentation built on Dec. 31, 2020, 8:56 p.m.