Skip to content

116 add getData() for arbitrary endpoints - #122

Merged
Flosch1006 merged 1 commit into
releasefrom
116-add-getdata-for-arbitrary-endpoints
Oct 7, 2026
Merged

Flosch1006 merged 1 commit into
releasefrom
116-add-getdata-for-arbitrary-endpoints

Conversation

@Flosch1006

Copy link
Copy Markdown
Collaborator

Closes #116

  • Add exported getData(url, token, method = "GET", data = NULL, host) to send a request to any endpoint and return the flattened data of the response as a dataframe
  • Endpoint paths are prefixed with host; full URLs are only accepted if they start with host, so the bearer token is never sent to another host
  • Nested fields are flattened into camelCase columns (e.g. squadHome.id → squadHomeId), matching impectPy; arrays stay list columns and single objects become one row
  • Returns an empty dataframe for responses without content (e.g. 204), errors on an empty data list as in impectPy
  • .callAPI() / .callAPIlimited() gain method and body arguments (default GET, body sent as JSON) so getData() reuses the same token bucket and retry logic; any 2xx status is accepted
  • The token bucket is only created if the rate limit headers are valid
  • Add roxygen docs with an example for an endpoint the package doesn't wrap, and a NEWS entry

🤖 Generated with Claude Code

@Flosch1006 Flosch1006 self-assigned this Oct 7, 2026
@Flosch1006 Flosch1006 added the enhancement New feature or request label Oct 7, 2026
@Flosch1006
Flosch1006 merged commit 06e8a71 into release Oct 7, 2026
@Flosch1006
Flosch1006 deleted the 116-add-getdata-for-arbitrary-endpoints branch October 7, 2026 10:01
This was referenced Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant