call_api: Call the API directly

Description Usage Arguments Details Value

View source: R/call-api.R

Description

All the other functions call this one - it's exported only for debugging purposes - so use them instead.

Usage

1
call_api(endpoint, ...)

Arguments

endpoint

Function name e.g. 'getConstituencies'

...

endpoint's (often optional) named arguments

Details

If you're really curious about implementation, read on. Each API function introspects to see what its function name is, bundles up its named arguments, and calls this function with them. Consequently, aside from a bit of argument checking and/or return value massaging, every function is implemented exactly the same way.

Value

Response content, as unserialized by jsonlite::fromJSON


tobiasziegler/openaustralia documentation built on May 4, 2019, 4:25 p.m.