elx_fetch_data: Retrieve additional data on EU documents

Description Usage Arguments Value Examples

View source: R/elx_fetch_data.R

Description

Wraps httr::GET with pre-specified headers to retrieve data.

Usage

1
2
3
4
5
6
7
8
elx_fetch_data(
  url,
  type = c("title", "text", "ids"),
  language_1 = "en",
  language_2 = "fr",
  language_3 = "de",
  include_breaks = TRUE
)

Arguments

url

A valid url as character vector of length one based on a resource identifier such as CELEX or Cellar URI.

type

The type of data to be retrieved. When type = "text", the returned list contains named elements reflecting the source of each text.

language_1

The priority language in which the data will be attempted to be retrieved, in ISO 639 2-char code

language_2

If data not available in 'language_1', try 'language_2'

language_3

If data not available in 'language_2', try 'language_3'

include_breaks

If TRUE, text includes tags showing where pages ("—pagebreak—", for pdfs) and documents ("—documentbreak—") were concatenated

Value

A character vector of length one containing the result.

Examples

1
elx_fetch_data(url = "http://publications.europa.eu/resource/celex/32014R0001", type = "title")

eurlex documentation built on Nov. 8, 2020, 4:37 p.m.