Skip to content

Commit

Permalink
Fix: pequena correção do stf_baixar_cjsg.R
Browse files Browse the repository at this point in the history
  • Loading branch information
jjesusfilho committed Aug 1, 2024
1 parent feb8abb commit 115b2f7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export(stf_download_lawsuit)
export(stf_download_parties)
export(stf_download_sheet)
export(stf_extract_date)
export(stf_read_cjsg)
export(stf_ler_cjsg)
export(stf_read_document_table)
export(stf_read_information)
export(stf_read_parties)
Expand Down
5 changes: 4 additions & 1 deletion R/stf_download_cjsg.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ stf_baixar_cjsg <- function(corpo = NULL,
body <- body |>
jqr::jq(glue::glue('.size = {tamanho}'))

dt_arquivo <- ""

} else {

stop("Voc\u00EA deve informar um caminho v\u00E1lido para o corpo(json)")
Expand Down Expand Up @@ -163,7 +165,8 @@ stf_baixar_cjsg <- function(corpo = NULL,
body <- body |>
jqr::jq(glue::glue(".from = {.x}"))

arquivo <- file.path(dir, paste0("stf_",dt_arquivo,"_search_page_",.x, ".json") )
arquivo <- file.path(dir, paste0("stf_",dt_arquivo,"_search_page_",.x, ".json") ) |>
stringr::str_replace("__","_")

httr::POST(url,
encode = "json",
Expand Down
2 changes: 1 addition & 1 deletion R/stf_read_cjsg.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @return tibble
#' @export
#'
stf_read_cjsg <- function(files = NULL, dir = "."){
stf_ler_cjsg <- function(files = NULL, dir = "."){

if (is.null(files)){

Expand Down
6 changes: 3 additions & 3 deletions man/stf_read_cjsg.Rd → man/stf_ler_cjsg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 115b2f7

Please sign in to comment.