Adds new referendum entries to the Referendum Database (RDB) via its API.
Usage
add_rfrnds(
data,
email = pal::pkg_config_val(key = "api_username", pkg = this_pkg),
password = pal::pkg_config_val(key = "api_password", pkg = this_pkg),
use_testing_server = pal::pkg_config_val(key = "use_testing_server", pkg = this_pkg),
quiet = FALSE
)
Arguments
- data
The new referendum data. A tibble that in any case must contain the columns
plus the column
subnational_entity_name
for referendums oflevel
below"national"
, and the columnmunicipality
for referendums oflevel = "local"
,plus any additional valid columns containing the values for the corresponding database fields.
The e-mail address of the RDB API user account to be used for authentication. A character scalar.
- password
The password of the RDB API user account to be used for authentication. A character scalar.
- use_testing_server
Whether or not to use the testing servers instead of the production servers for RDB Services API calls etc.
- quiet
Whether or not to print the newly created referendum IDs to console.
Details
Note that adding/editing the column files
is not supported, i.e. it is simply dropped from data
.
See also
Other referendum data functions:
assert_vars()
,
count_rfrnds()
,
delete_rfrnds()
,
download_file_attachment()
,
edit_rfrnds()
,
rfrnd()
,
rfrnd_exists()
,
rfrnds()
,
rfrnds_bkp()
,
validate_rfrnds()