Learn R Programming

plug (version 0.2.0)

plug_download_base: Download all data from a specific base

Description

This function downloads all data from a specified base using the query SELECT * FROM base_name.

Usage

plug_download_base(
  base_name,
  endpoint = "https://plug.der.pe.gov.br/MadrixApi/executeQuery",
  verbosity = 0,
  auth_endpoint = "https://plug.der.pe.gov.br/MadrixApi/authenticate/"
)

Value

A tibble containing all data from the specified base.

Arguments

base_name

The name of the base from which to download all data. It can include the schema, as in "dbo.Contratos_VIEW".

endpoint

The endpoint URL for executing queries.

verbosity

The verbosity level of the API request (0 = none, 1 = minimal, 2 = detailed).

auth_endpoint

The endpoint URL for generating the token.

Examples

Run this code
if (FALSE) {
data <- plug_download_base(
  base_name = "Contratos_VIEW"
)
}

Run the code above in your browser using DataLab