dawa {dawaR} | R Documentation |
Base API function
Description
This function is the foundation of all communication with the api in this package. Not intended for end-users, but it provides all the flexibility of the api without the nice conveniences of the other functions in this package. By default it reformats the api response (which is json) to a list object.
Usage
dawa(
section,
...,
append_to_url = NULL,
format = NULL,
verbose = TRUE,
cache = TRUE,
dry_run = FALSE,
func_params = list()
)
Arguments
section |
Defines what section of the api should be called.
|
... |
< |
append_to_url |
This options enables you to append a string to the url.
It is inserted in the request after the |
format |
The format to provide as a query parameter for the api call. By
default it has value |
verbose |
whether or not to provide |
cache |
Option to use caching in a |
dry_run |
With this option enabled, the function will output the request that has been created - Without sending it to the api. This is useful for debugging. |
func_params |
Option to include extra parameters (just like |
Value
By default returns the API response as a list output. For
geojson(z)
formats it returns the raw json. When dry_run = TRUE
it
returns the request that has been created but does not run it.
Examples
x <- dawa(section = "sogne")
x[[1]]