Skip to content

Add getData() for arbitrary endpoints #116

Closed

Description

@Flosch1006

Summary

Add getData() for arbitrary endpoints

Motivation

impectPy has getData(url, token, method="GET", data=None). It sends a rate-limited request to any endpoint (a relative path is prefixed with the host) and returns the flattened response as a dataframe. impectR has no public equivalent, so users can't reach endpoints the package doesn't wrap without writing their own httr code and rate limiting.

Proposed Solution

  • Exported getData(url, token, method = "GET", data = NULL, host = "https://api.impect.com").
  • Reuse the existing .callAPIlimited() (token bucket + retry) so it respects the same rate limits.
  • Flatten $data with jsonlite::flatten() / .cleanData() so the output matches impectPy's flattened dataframe.
  • Add roxygen docs with an example that calls an endpoint the package doesn't wrap.

Alternatives Considered

No response

Additional Context

Parity with impectPy.

Activity

  1. Flosch1006 commented on Oct 7, 2026

    @Flosch1006
    CollaboratorAuthor

    Resolved by #122, released in 2.6.0 via #123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions