All the other functions call this one - it's exported only for debugging purposes - so use them instead.
call_api(endpoint, ...)
endpoint | Function name e.g. 'getConstituencies' |
---|---|
... |
|
Response content, as unserialized by jsonlite::fromJSON
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.