Skip to content

DRAFT (phase 3): depend on apifetch — bdpe_* become thin wrappers#1

Draft
milkway wants to merge 1 commit into
mainfrom
feat/depend-on-apifetch
Draft

DRAFT (phase 3): depend on apifetch — bdpe_* become thin wrappers#1
milkway wants to merge 1 commit into
mainfrom
feat/depend-on-apifetch

Conversation

@milkway

@milkway milkway commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactors BigDataPE to depend on the new generic apifetch package. Every bdpe_* function becomes a thin wrapper over its apifetch::af_* counterpart, supplying only the Big Data PE service conventions via an internal .bdpe_api() profile:

  • af_auth_raw() — token sent verbatim in the Authorization header
  • af_paginate_offset("header")limit/offset as HTTP headers
  • drop_cols = "Mensagem" — status column dropped when combining chunks
  • connect_hint — PE Conectado network / VPN guidance

Backward compatibility

  • Public API unchanged: same bdpe_* signatures, defaults, and exports.
  • Token storage unchanged: env-var names remain BigDataPE_<dataset> (verified by a store→get→list round-trip), so existing code and already-stored tokens keep working.

Dependency changes

  • Imports: now just apifetch (>= 0.1.0) (cli/dplyr/tibble/httr2 are inherited transitively).
  • dplyr/tibble moved to Suggests (used only by the vignette).
  • Fixes author spellings (André, Vasconcelos).

⚠️ Do not merge/release yet

This cannot be submitted to CRAN until apifetch is accepted on CRAN (CRAN requires all hard dependencies to be available there). Kept as a draft until then.

🤖 Generated with Claude Code

BigDataPE now delegates all token management and data fetching to the generic
apifetch package, supplying only the Big Data PE service conventions (raw
Authorization token, limit/offset as headers, drop "Mensagem", PE Conectado
hint). Public API and the BigDataPE_<dataset> env-var token names are unchanged
(verified by a round-trip), so existing code and stored tokens keep working.

Imports trimmed to apifetch; dplyr/tibble moved to Suggests (vignette only).
Also fixes author spellings (André, Vasconcelos).

NOTE: cannot be released to CRAN until apifetch is accepted on CRAN.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant