% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tceper-package.R
\docType{package}
\name{tceper-package}
\alias{tceper}
\alias{tceper-package}
\title{tceper: Access the Open Data API of TCE-PE}
\description{
An R interface to the Open Data API of the Tribunal de Contas do Estado
de Pernambuco (TCE-PE), the Court of Accounts of the State of Pernambuco,
Brazil. Provides tidy, ready-to-use functions to query public data on
revenues, expenditures, commitments, procurement, contracts, agreements,
public works, legal processes, personnel and reference tables for all
state and municipal government entities in Pernambuco.
}
\section{Access to the API}{


The TCE-PE API host (\code{sistemas.tcepe.tc.br}) is \strong{geo-restricted}
and only accepts requests from Brazilian IP addresses. Users outside
Brazil will see connection or TLS errors. The discovery functions
(\code{\link[=tce_catalog]{tce_catalog()}}, \code{\link[=tce_endpoint]{tce_endpoint()}}, \code{\link[=tce_params]{tce_params()}}, \code{\link[=tce_fields]{tce_fields()}})
are unaffected -- they read from a built-in catalog and work offline
from any location.
}

\section{Recommended workflow}{

\enumerate{
\item \strong{Discover} endpoints with \code{\link[=tce_catalog]{tce_catalog()}} (filter with \verb{search =}).
\item \strong{Inspect} input parameters with \code{\link[=tce_params]{tce_params()}} and output fields
with \code{\link[=tce_fields]{tce_fields()}}.
\item \strong{Query} using a wrapper function (e.g. \code{\link[=tce_contracts]{tce_contracts()}}) or the
low-level \code{\link[=tce_request]{tce_request()}}.
}
}

\section{Parameter names}{


All query parameters are passed through \code{...} using the names shown
by \code{\link[=tce_params]{tce_params()}}. You can use either the original API name (e.g.
\code{CodigoEfiscoUG}) or its \code{snake_case} equivalent (e.g.
\code{codigo_efisco_ug}); the package maps them automatically.
}

\section{Options}{


\describe{
\item{\code{tceper.verbose}}{If \code{TRUE}, all functions print the final API
URL. Default: \code{FALSE}.}
\item{\code{tceper.progress}}{If \code{FALSE}, suppresses progress messages.
Default: \code{TRUE}.}
\item{\code{tceper.cache_ttl}}{Cache time-to-live in seconds.
Default: \code{3600} (1 hour).}
}
}

\seealso{
\itemize{
\item \code{\link[=tce_catalog]{tce_catalog()}}, \code{\link[=tce_params]{tce_params()}}, \code{\link[=tce_fields]{tce_fields()}} — endpoint discovery
\item \code{\link[=tce_request]{tce_request()}} — low-level query function
\item \code{\link[=tce_cache_info]{tce_cache_info()}}, \code{\link[=tce_cache_clear]{tce_cache_clear()}} — cache management
}
}
\author{
\strong{Maintainer}: Andre Leite \email{leite@castlab.org}

Authors:
\itemize{
  \item Andre Leite \email{leite@castlab.org}
  \item Marcos Wasilew \email{marcos.wasilew@gmail.com}
  \item Hugo Vasconcelos \email{hugo.vasconcelos@ufpe.br}
  \item Carlos Amorin \email{carlos.agaf@ufpe.br}
  \item Diogo Bezerra \email{diogo.bezerra@ufpe.br}
}

}
\keyword{internal}
