R/data.R

Defines functions markdown_quiz_path encrypt_creds_path key_encrypt_creds_path default_creds_path

Documented in markdown_quiz_path

#' Get file path to an default credentials RDS
default_creds_path <- function() {
  list.files(
    pattern = "default_creds.rds",
    recursive = TRUE,
    system.file("extdata", package = "rgoogleclassroom"),
    full.names = TRUE
  )
}
#' Get file path to an key encryption RDS
key_encrypt_creds_path <- function() {
  list.files(
    pattern = "encrypt_pass.rds",
    recursive = TRUE,
    system.file("extdata", package = "rgoogleclassroom"),
    full.names = TRUE
  )
}
#' Get file path to an encrypted credentials RDS
encrypt_creds_path <- function() {
  list.files(
    pattern = "encrypt.rds",
    recursive = TRUE,
    system.file("extdata", package = "rgoogleclassroom"),
    full.names = TRUE
  )
}

#' Get file path to an example quiz
#'
#' @return A file path to a markua markdown quiz example you can use for testing
#' @export
#' @examples \dontrun{
#'
#' # Find quiz path
#'
#' quiz_path <- markdown_quiz_path()
#' }
#'
markdown_quiz_path <- function() {
  list.files(
    pattern = "quiz.md",
    recursive = TRUE,
    system.file("extdata", package = "rgoogleclassroom"),
    full.names = TRUE
  )
}

Try the rgoogleclassroom package in your browser

Any scripts or data that you put into this service are public.

rgoogleclassroom documentation built on April 4, 2025, 1:17 a.m.