Configure default WAStD settings

wastdr_setup(
  wastd_url = get_wastd_url(),
  api_url = get_wastdr_api_url(),
  api_token = NULL,
  api_un = get_wastdr_api_un(),
  api_pw = get_wastdr_api_pw()
)

Arguments

wastd_url

A WAStD URL (optional), default: "https://wastd.dbca.wa.gov.au"

api_url

A WAStD API URL (optional), default: "https://wastd.dbca.wa.gov.au/api/1/"

api_token

A WAStD API token, optionally leading with "Token " (character)

api_un

Alternatively, a WAStD API username (character)

api_pw

The password to the WAStD username (character)

Details

wastdr_setup sets WAStD API connection details. wastdr's functions default to use the default URL, but require an API key to work.

Examples

# WAStD users with a DBCA account can access their WAStD authentication
# token on their profile page on WAStD:
wastdr_setup(api_token = "wastd_token")

# Non-DBCA users will have been given a WAStD username and password:
wastdr_setup(
  api_un = "wastd_username",
  api_pw = "wastd_password"
)

# Not specifying the default WAStD API URL will reset the WAStD URL to its
# default "https://wastd.dbca.wa.gov.au/api/1/":
if (FALSE) {
wastdr_setup(api_token = "c12345asdfqwer")
}