Skip to contents

Call an API operation and return tidy data

Usage

bunddev_call_tidy(api, operation_id, params = list(), ...)

Arguments

api

Registry id.

operation_id

OpenAPI operationId.

params

Named list of parameters forwarded to bunddev_call().

...

Additional arguments passed to the tidier.

Value

A tibble with tidied endpoint data when a tidier is registered for api. Otherwise a one-row tibble with a single list-column raw containing the parsed response object.

Details

This helper calls bunddev_call() and then applies the adapter-specific tidier for the API. If no tidier is registered, a tibble containing the raw response is returned.

Examples

if (FALSE) { # \dontrun{
# Tidy Autobahn roadworks
bunddev_call_tidy("autobahn", "list-roadworks", params = list(roadId = "A1"))
} # }