Skip to contents

Retrieve contracts

Usage

get_contracts(
  ...,
  page = 1L,
  page_size = 50L,
  all_pages = FALSE,
  page_limit = Inf,
  base_url = .obrasgovr_base_url()
)

obter_contratos(
  ...,
  pagina = 1L,
  tamanho_da_pagina = 50L,
  todas_paginas = FALSE,
  limite_paginas = Inf,
  base_url = .obrasgovr_base_url()
)

Arguments

...

Named filters. See list_filters("contracts").

page

First page to retrieve, starting at 1.

page_size

Number of records per page, between 1 and 200.

all_pages

If TRUE, retrieves successive pages starting at page.

page_limit

Maximum number of pages to retrieve when all_pages is TRUE. Use Inf to retrieve every available page.

base_url

HTTPS base URL. By default, uses the obrasgovr.base_url option or the official API environment.

pagina, tamanho_da_pagina, todas_paginas, limite_paginas

Portuguese aliases for page, page_size, all_pages, and page_limit, respectively. These arguments are available only in the Portuguese function alias.

Value

A tibble containing contracts linked to infrastructure projects.

Examples

if (interactive()) {
  get_contracts(id_projeto_investimento = "134851.26-07")
}