Learn R Programming

dataesgobr (version 1.0.0)

make_url: Loads the file url_params and make urls to extract information from the API

Description

Loads the file url_params and make urls to extract information from the API

Usage

make_url(field, request, params = NULL)

Arguments

field

String to specifies the field that we want to search

request

String with the information to search

params

Optional list with the parameters to add to the query

Value

A string containing the url generated

Examples

Run this code
# NOT RUN {
library(dataesgobr)

# Generates the url associated to the id passed
url <- make_url("id", "a13002908-residentes-en-la-comunidad-de-madrid-por-lugar-de-nacimiento")

# Generates the url associated to the title and the parameters passed
url <- make_url("title", "atestados", c("sort" = "title", "pagesize" = 50, "page" = 1))
# }

Run the code above in your browser using DataLab