Skip to contents

Registers a sport org so that sandbox reads (fetch_org_options(), and fetch_profiles(filters = list(sport_org_id = ...))) behave like production. The org's name becomes the sport$name of every athlete created under it with create_profile().

Usage

create_sport_org(name, id = NULL)

Arguments

name

Character. Name of the sport organization (e.g. "Rowing Canada"). Required.

id

Integer. Optional org id. If NULL (default) an unused id in 1:999 is generated. If supplied, it must be a positive integer in 1:999 that does not collide with an existing sandbox org.

Value

The created org (list(id, name, annual_cycle_start)), invisibly.

See also

create_profile() to add athletes, csiapps-sandbox for an overview

Examples

org <- create_sport_org("Rowing Canada")
#> csiapps sandbox: created sport org 452 ('Rowing Canada')
create_profile(5, org$id)
#> csiapps sandbox: created 5 athlete(s) under sport org 452 (5 total)
clear_sandbox()
#> csiapps sandbox: entire sandbox cleared