Skip to contents

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 of level below "national", and the column municipality for referendums of level = "local",

plus any additional valid columns containing the values for the corresponding database fields.

email

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.

Value

A character vector of newly created referendum IDs.

Details

Note that adding/editing the column files is not supported, i.e. it is simply dropped from data.

See also