Returns all organisations accessible to the authenticated user as a list of
label/value pairs, suitable for use in Shiny selectInput() choices.
Usage
fetch_org_options(token = NULL, sandbox = is_sandbox_mode())Arguments
- token
Character. Authentication token. When not supplied, it is resolved for the current Shiny session (the token stored by
server_wrapper()) and otherwise falls back to theCSIAPPS_ACCESS_TOKENenvironment variable.- sandbox
Logical. When
TRUE(the default in development), no network call is made and the local dummy registry is returned (the orgs registered withcreate_sport_org()). Set toFALSEto fetch real organisations from the API. Defaults tois_sandbox_mode().
See also
fetch_profiles() to fetch profiles, set_institute() to
configure the target institute.
Examples
if (FALSE) { # \dontrun{
set_institute("csiontario")
orgs <- fetch_org_options(sandbox = FALSE)
selectInput("org", "Organisation", choices = orgs)
} # }
