gp_api_unit_replace: Replace a GP unit in the database

gp_api_unit_replaceR Documentation

Replace a GP unit in the database

Description

Completely deletes and re-inserts a LESSON.json for the mini-unit on the MongoDB database (aka gp-catalog). There are 2 catalogs:

  • dev (not public-facing; viewable through the dev.galacticpolymath.com)

  • production (public facing; live on galacticpolymath.com)

Usage

gp_api_unit_replace(
  WD = "?",
  prompt_user = TRUE,
  dev = NULL,
  verbosity = 1,
  print_output = TRUE
)

Arguments

WD

working directory, passed to parse_wd();default="?"

prompt_user

logical; ask user before deleting and replacing the unit? default=TRUE

dev

logical; default (NULL) modifies both production and dev gp-catalogs. FALSE modifies the production gp-catalog. TRUE modifies only the dev catalog. supplying c(TRUE,TRUE) is the same as NULL

verbosity

passed to httr2::req_perform(); default=1

print_output

logical; print result to user? default=TRUE

Details

Which catalog you're modifying is controlled by the dev parameter. Default is to modify both (so they don't get out of sync). Shallow wrapper for internal functions gp_api_unit_delete() and gp_api_unit_insert()

Value

success (logical)

See Also

Other GP API: gp_api_get_token(), gp_api_query(), gp_api_query_users(), gp_api_unit_delete(), gp_api_unit_insert()


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.